/** * Main method for testing this class. * * @param argv the options */ public static void main(String [] argv) { runClassifier(new MultiClassClassifier(), argv); } }
@Override public void buildClassifier(Instances insts) throws Exception { if (m_Classifier == null) { throw new Exception("No base classifier has been set!"); } if (!(m_Classifier instanceof UpdateableClassifier)) { throw new Exception("Base classifier must be updateable!"); } super.buildClassifier(insts); }
/** * Gets the current settings of the Classifier. * * @return an array of strings suitable for passing to setOptions */ public String [] getOptions() { Vector<String> options = new Vector<String>(); options.add("-M"); options.add("" + m_Method); if (getUsePairwiseCoupling()) { options.add("-P"); } if (getLogLossDecoding()) { options.add("-L"); } options.add("-R"); options.add("" + m_RandomWidthFactor); Collections.addAll(options, super.getOptions()); return options.toArray(new String[0]); }
setMethod(new SelectedTag(Integer.parseInt(errorString), TAGS_METHOD)); } else { setMethod(new SelectedTag(METHOD_1_AGAINST_ALL, TAGS_METHOD)); setRandomWidthFactor((new Double(rfactorString)).doubleValue()); } else { setRandomWidthFactor(2.0); setUsePairwiseCoupling(Utils.getFlag('P', options)); setLogLossDecoding(Utils.getFlag('L', options));
/** Creates a default MultiClassClassifier */ public Classifier getClassifier() { return new MultiClassClassifier(); }
return pairwiseCoupling(n, r); if (getLogLossDecoding()) { Arrays.fill(probs, 1.0); for (int i = 0; i < m_ClassFilters.length; i++) {
probs = super.distributionForInstance(inst);
return weka.classifiers.meta.MultiClassClassifier.pairwiseCoupling(n, r);
getCapabilities().testWithFail(insts);
setMethod(new SelectedTag(Integer.parseInt(errorString), TAGS_METHOD)); } else { setMethod(new SelectedTag(METHOD_1_AGAINST_ALL, TAGS_METHOD)); setRandomWidthFactor((new Double(rfactorString)).doubleValue()); } else { setRandomWidthFactor(2.0); setUsePairwiseCoupling(Utils.getFlag('P', options)); setLogLossDecoding(Utils.getFlag('L', options));
/** Creates a default MultiClassClassifier */ public Classifier getClassifier() { return new MultiClassClassifier(); }
return pairwiseCoupling(n, r); if (getLogLossDecoding()) { Arrays.fill(probs, 1.0); for (int i = 0; i < m_ClassFilters.length; i++) {
probs = super.distributionForInstance(inst);
return weka.classifiers.meta.MultiClassClassifier.pairwiseCoupling(n, r);
getCapabilities().testWithFail(insts);
/** * Main method for testing this class. * * @param argv the options */ public static void main(String [] argv) { runClassifier(new MultiClassClassifier(), argv); } }
/** * Gets the current settings of the Classifier. * * @return an array of strings suitable for passing to setOptions */ public String [] getOptions() { Vector<String> options = new Vector<String>(); options.add("-M"); options.add("" + m_Method); if (getUsePairwiseCoupling()) { options.add("-P"); } if (getLogLossDecoding()) { options.add("-L"); } options.add("-R"); options.add("" + m_RandomWidthFactor); Collections.addAll(options, super.getOptions()); return options.toArray(new String[0]); }
@Override public void buildClassifier(Instances insts) throws Exception { if (m_Classifier == null) { throw new Exception("No base classifier has been set!"); } if (!(m_Classifier instanceof UpdateableClassifier)) { throw new Exception("Base classifier must be updateable!"); } super.buildClassifier(insts); }