/** * Main method for testing this class * * @param argv commandline options */ public static void main(String[] argv) { runClassifier(new SimpleLogistic(), argv); }
/** * Returns the value of the named measure * * @param additionalMeasureName the name of the measure to query for its value * @return the value of the named measure * @throws IllegalArgumentException if the named measure is not supported */ public double getMeasure(String additionalMeasureName) { if (additionalMeasureName.compareToIgnoreCase("measureAttributesUsed") == 0) { return measureAttributesUsed(); } else if (additionalMeasureName .compareToIgnoreCase("measureNumIterations") == 0) { return getNumRegressions(); } else { throw new IllegalArgumentException(additionalMeasureName + " not supported (SimpleLogistic)"); } }
/** * 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("-I"); options.add("" + getNumBoostingIterations()); if (!getUseCrossValidation()) { options.add("-S"); } if (getErrorOnProbabilities()) { options.add("-P"); } options.add("-M"); options.add("" + getMaxBoostingIterations()); options.add("-H"); options.add("" + getHeuristicStop()); options.add("-W"); options.add("" + getWeightTrimBeta()); if (getUseAIC()) { options.add("-A"); } Collections.addAll(options, super.getOptions()); return options.toArray(new String[0]); }
/** Creates a default SimpleLogistic */ public Classifier getClassifier() { return new SimpleLogistic(); }
/** * Returns a string describing classifier * * @return a description suitable for displaying in the explorer/experimenter * gui */ public String globalInfo() { return "Classifier for building linear logistic regression models. LogitBoost with simple regression " + "functions as base learners is used for fitting the logistic models. The optimal number of LogitBoost " + "iterations to perform is cross-validated, which leads to automatic attribute selection. " + "For more information see:\n" + getTechnicalInformation().toString(); }
getCapabilities().testWithFail(data);
/** * 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("-I"); options.add("" + getNumBoostingIterations()); if (!getUseCrossValidation()) { options.add("-S"); } if (getErrorOnProbabilities()) { options.add("-P"); } options.add("-M"); options.add("" + getMaxBoostingIterations()); options.add("-H"); options.add("" + getHeuristicStop()); options.add("-W"); options.add("" + getWeightTrimBeta()); if (getUseAIC()) { options.add("-A"); } Collections.addAll(options, super.getOptions()); return options.toArray(new String[0]); }
/** Creates a default SimpleLogistic */ public Classifier getClassifier() { return new SimpleLogistic(); }
/** * Returns a string describing classifier * * @return a description suitable for displaying in the explorer/experimenter * gui */ public String globalInfo() { return "Classifier for building linear logistic regression models. LogitBoost with simple regression " + "functions as base learners is used for fitting the logistic models. The optimal number of LogitBoost " + "iterations to perform is cross-validated, which leads to automatic attribute selection. " + "For more information see:\n" + getTechnicalInformation().toString(); }
getCapabilities().testWithFail(data);
/** * Main method for testing this class * * @param argv commandline options */ public static void main(String[] argv) { runClassifier(new SimpleLogistic(), argv); }
/** * Returns the value of the named measure * * @param additionalMeasureName the name of the measure to query for its value * @return the value of the named measure * @throws IllegalArgumentException if the named measure is not supported */ public double getMeasure(String additionalMeasureName) { if (additionalMeasureName.compareToIgnoreCase("measureAttributesUsed") == 0) { return measureAttributesUsed(); } else if (additionalMeasureName .compareToIgnoreCase("measureNumIterations") == 0) { return getNumRegressions(); } else { throw new IllegalArgumentException(additionalMeasureName + " not supported (SimpleLogistic)"); } }