/** * Resets to defaults. */ protected void resetOptions() { m_trainInstances = null; m_wrapperTemplate = new WrapperSubsetEval(); m_wrapperSetup = ""; }
/** * Resets to defaults. */ protected void resetOptions() { m_trainInstances = null; m_wrapperTemplate = new WrapperSubsetEval(); m_wrapperSetup = ""; }
/** * Main method for testing this class. * * @param args the options */ public static void main(String[] args) { runEvaluator(new WrapperSubsetEval(), args); } }
/** * Main method for testing this class. * * @param args the options */ public static void main(String[] args) { runEvaluator(new WrapperSubsetEval(), args); } }
@Override public double[] call() throws Exception { double[] eval = new double[2]; eval[0] = attIndex; WrapperSubsetEval evaluator = new WrapperSubsetEval(); evaluator.setOptions(m_wrapperTemplate.getOptions()); evaluator.buildEvaluator(data); if (m_wrapperSetup.length() == 0) { m_wrapperSetup = evaluator.toString(); } BitSet b = new BitSet(data.numAttributes()); if (m_leaveOneOut) { b.set(0, data.numAttributes()); b.set(data.classIndex(), false); } if (attIndex >= 0) { b.set(attIndex, !m_leaveOneOut); } eval[1] = evaluator.evaluateSubset(b); return eval; } });
@Override public double[] call() throws Exception { double[] eval = new double[2]; eval[0] = attIndex; WrapperSubsetEval evaluator = new WrapperSubsetEval(); evaluator.setOptions(m_wrapperTemplate.getOptions()); evaluator.buildEvaluator(data); if (m_wrapperSetup.length() == 0) { m_wrapperSetup = evaluator.toString(); } BitSet b = new BitSet(data.numAttributes()); if (m_leaveOneOut) { b.set(0, data.numAttributes()); b.set(data.classIndex(), false); } if (attIndex >= 0) { b.set(attIndex, !m_leaveOneOut); } eval[1] = evaluator.evaluateSubset(b); return eval; } });
/** Creates a WrapperSubsetEval with J48 */ public ASEvaluation getEvaluator() { WrapperSubsetEval eval = new WrapperSubsetEval(); eval.setClassifier(new weka.classifiers.trees.J48()); return eval; }
/** Creates a WrapperSubsetEval with J48 */ public ASEvaluation getEvaluator() { WrapperSubsetEval eval = new WrapperSubsetEval(); eval.setClassifier(new weka.classifiers.trees.J48()); return eval; }
WrapperSubsetEval wrapper = new WrapperSubsetEval();