/** * runs the filter with the given arguments. * * @param args the commandline arguments */ public static void main(String[] args) { runFilter(new RemoveByName(), args); } }
/** * runs the filter with the given arguments. * * @param args the commandline arguments */ public static void main(String[] args) { runFilter(new RemoveByName(), args); } }
Instances dataset1_x=new Instances(dataset1); RemoveByName filterX=new RemoveByName(); filterX.setInvertSelection(true); filterX.setExpression(Pattern.quote("^.*i$")); filterX.setInputFormat(dataset1_x); Instances dataset1_=Filter.useFilter(dataset1_x,filterX);
/** * returns a custom filter. * * @param expression the expression to use * @param invert whether to invert the matching sense * @return the configured filter */ protected Filter getFilter(String expression, boolean invert) { RemoveByName filter; filter = new RemoveByName(); filter.setExpression(expression); filter.setInvertSelection(invert); return filter; }
/** * returns a custom filter. * * @param expression the expression to use * @param invert whether to invert the matching sense * @return the configured filter */ protected Filter getFilter(String expression, boolean invert) { RemoveByName filter; filter = new RemoveByName(); filter.setExpression(expression); filter.setInvertSelection(invert); return filter; }