NumericToNominal filter=new NumericToNominal();
String options[]=new String[2];
options[0]="-R";
options[1]="3,10";
filter.setOptions(options);
DataSource dataSource=new DataSource(trainFile[0].getAbsolutePath());
Instances instances=dataSource.getDataSet();
filter.setInputFormat(instances);
Instances newInstances = Filter.useFilter(instances, filter);
System.out.println(newInstances.toSummaryString());