/** Creates a default CfsSubsetEval */ public ASEvaluation getEvaluator() { return new CfsSubsetEval(); }
/** * Gets the current settings of CfsSubsetEval * * @return an array of strings suitable for passing to setOptions() */ @Override public String[] getOptions() { Vector<String> options = new Vector<String>(); if (getMissingSeparate()) { options.add("-M"); } if (!getLocallyPredictive()) { options.add("-L"); } if (getPreComputeCorrelationMatrix()) { options.add("-Z"); } options.add("-P"); options.add("" + getPoolSize()); options.add("-E"); options.add("" + getNumThreads()); if (getDebug()) { options.add("-D"); } return options.toArray(new String[0]); }
/** * Main method for testing this class. * * @param args the options */ public static void main(String[] args) { runEvaluator(new CfsSubsetEval(), args); } }
public void setOptions(String[] options) throws Exception { resetOptions(); setMissingSeparate(Utils.getFlag('M', options)); setLocallyPredictive(!Utils.getFlag('L', options)); setPreComputeCorrelationMatrix(Utils.getFlag('Z', options)); setPoolSize(Integer.parseInt(PoolSize)); } else { setPoolSize(1); setNumThreads(Integer.parseInt(NumThreads)); } else { setNumThreads(1); setDebug(Utils.getFlag('D', options));
/** * Select attributes using BestFirst search to reduce * the number of parameters per instance of a dataset * * @param data input set of instances * @return resampled set of instances */ public static Instances selectAttributes(Instances data) { final AttributeSelection filter = new AttributeSelection(); Instances filteredIns = null; // Evaluator final CfsSubsetEval evaluator = new CfsSubsetEval(); evaluator.setMissingSeparate(true); // Assign evaluator to filter filter.setEvaluator(evaluator); // Search strategy: best first (default values) final BestFirst search = new BestFirst(); filter.setSearch(search); // Apply filter try { filter.setInputFormat(data); filteredIns = Filter.useFilter(data, filter); } catch (Exception e) { IJ.log("Error when resampling input data with selected attributes!"); e.printStackTrace(); } return filteredIns; }
getCapabilities().testWithFail(data);
public void setOptions(String[] options) throws Exception { resetOptions(); setMissingSeparate(Utils.getFlag('M', options)); setLocallyPredictive(!Utils.getFlag('L', options)); setPreComputeCorrelationMatrix(Utils.getFlag('Z', options)); setPoolSize(Integer.parseInt(PoolSize)); } else { setPoolSize(1); setNumThreads(Integer.parseInt(NumThreads)); } else { setNumThreads(1); setDebug(Utils.getFlag('D', options));
/** * Select attributes using BestFirst search to reduce * the number of parameters per instance of a dataset * * @param data input set of instances * @return resampled set of instances */ public static Instances selectAttributes(Instances data) { final AttributeSelection filter = new AttributeSelection(); Instances filteredIns = null; // Evaluator final CfsSubsetEval evaluator = new CfsSubsetEval(); evaluator.setMissingSeparate(true); // Assign evaluator to filter filter.setEvaluator(evaluator); // Search strategy: best first (default values) final BestFirst search = new BestFirst(); filter.setSearch(search); // Apply filter try { filter.setInputFormat(data); filteredIns = Filter.useFilter(data, filter); } catch (Exception e) { IJ.log("Error when resampling input data with selected attributes!"); e.printStackTrace(); } return filteredIns; }
/** * Main method for testing this class. * * @param args the options */ public static void main(String[] args) { runEvaluator(new CfsSubsetEval(), args); } }
addLocallyPredictive(bestGroup);
getCapabilities().testWithFail(data);
/** Creates a default CfsSubsetEval */ public ASEvaluation getEvaluator() { return new CfsSubsetEval(); }
/** * Gets the current settings of CfsSubsetEval * * @return an array of strings suitable for passing to setOptions() */ @Override public String[] getOptions() { Vector<String> options = new Vector<String>(); if (getMissingSeparate()) { options.add("-M"); } if (!getLocallyPredictive()) { options.add("-L"); } if (getPreComputeCorrelationMatrix()) { options.add("-Z"); } options.add("-P"); options.add("" + getPoolSize()); options.add("-E"); options.add("" + getNumThreads()); if (getDebug()) { options.add("-D"); } return options.toArray(new String[0]); }
/** Creates a default CfsSubsetEval */ public ASEvaluation getEvaluator() { return new CfsSubsetEval(); }
/** Creates a default CfsSubsetEval */ public ASEvaluation getEvaluator() { return new CfsSubsetEval(); }