/** * Returns class probabilities for all given instances if the class is nominal or corresponding predicted * numeric values if the class is numeric. The meta classifier must implement BatchPredictor, otherwise an * exception will be thrown. * * @param instances the instance sto be classified * @return the distributions * @throws Exception if instances could not be classified successfully */ public double[][] distributionsForInstances(Instances instances) throws Exception { Instances data; if (!baseClassifiersImplementMoreEfficientBatchPrediction()) { data = new Instances(m_MetaFormat, 0); for (Instance inst : instances) { data.add(metaInstance(inst)); } } else { data = metaInstances(instances); } return ((BatchPredictor)m_MetaClassifier).distributionsForInstances(data); }
metaData.addAll(metaInstances(test)); } else { for (int i = 0; i < test.numInstances(); i++) {