List of usage examples for weka.classifiers.trees M5P classifyInstance
@Override public double classifyInstance(Instance inst) throws Exception
From source file:cn.ict.zyq.bestConf.COMT2.COMT2.java
License:Open Source License
private static double computeOmegaDelta(M5P model, M5P modelPi, Instances omega) throws Exception { double retval = 0., y; Enumeration<Instance> enu = omega.enumerateInstances(); int idxClass = omega.classIndex(); Instance ins;/*from www . j a va2 s. c om*/ while (enu.hasMoreElements()) { ins = enu.nextElement(); y = ins.value(idxClass); retval += Math.pow(y - model.classifyInstance(ins), 2) - Math.pow(y - modelPi.classifyInstance(ins), 2); } return retval; }