Q:

Weka discretising attribute where one value is most common by far

I have a dataset in which there's a numerical attribute for the 'number of days since last contact' but the value -1 is being used to indicate that there hasn't been a last contact.  It is by far the largest value for this attribute. 
My idea is to discretise this attribute but how can I ensure there is a 'no contact'/-1 bin? 
Also, is this the correct approach to this problem? 

A:

If anyone else has this question and can't find an answer, here's how I did it based on Anony-Mousse's method.  The filter documentation for MathExpression gives a good example of splitting into arbitrary bins. 

Split using the MathExpression filter e.g. ifelse(A>0, 2, 1)  to split into two bins: above and below 0.  I used ifelse(A>0, ifelse(A>400, 21, ceil(A/20)+1), 1) to bin my -1 and >400 values, and for in between values to be in bins of width 20. 
Convert using numericToNominal

