public class MultiSearch extends weka.classifiers.RandomizableSingleClassifierEnhancer implements MultiSearchCapable, weka.core.AdditionalMeasureProducer, weka.core.Summarizable, TraceableOptimizer
-E <CC|MCC|RMSE|RRSE|MAE|RAE|COMB|ACC|KAP|PREC|WPREC|REC|WREC|AUC|WAUC|PRC|WPRC|FM|WFM|TPR|TNR|FPR|FNR> Determines the parameter used for evaluation: CC = Correlation coefficient MCC = Matthews correlation coefficient RMSE = Root mean squared error RRSE = Root relative squared error MAE = Mean absolute error RAE = Root absolute error COMB = Combined = (1-abs(CC)) + RRSE + RAE ACC = Accuracy KAP = Kappa PREC = Precision (per class) WPREC = Weighted precision REC = Recall (per class) WREC = Weighted recall AUC = Area under ROC (per class) WAUC = Weighted area under ROC PRC = Area under PRC (per class) WPRC = Weighted area under PRC FM = F-Measure (per class) WFM = Weighted F-Measure TPR = True positive rate (per class) TNR = True negative rate (per class) FPR = False positive rate (per class) FNR = False negative rate (per class) (default: CC)
-class-label "<1-based index>" The class label index to retrieve the metric for (if applicable).
-search "<classname options>" A property search setup.
-algorithm "<classname options>" A search algorithm.
-log-file <filename> The log file to log the messages to. (default: none)
-S <num> Random number seed. (default 1)
-W Full name of base classifier. (default: weka.classifiers.functions.LinearRegression)
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
-num-decimal-places The number of decimal places for the output of numbers in the model (default 2).
-batch-size The desired batch size for batch prediction (default 100).
Options specific to classifier weka.classifiers.functions.LinearRegression:
-S <number of selection method> Set the attribute selection method to use. 1 = None, 2 = Greedy. (default 0 = M5' method)
-C Do not try to eliminate colinear attributes.
-S <number of selection method> Set the attribute selection method to use. 1 = None, 2 = Greedy. (default 0 = M5' method)
-R <double> Set ridge parameter (default 1.0e-8).
-minimal Conserve memory, don't keep dataset header and means/stdevs. Model cannot be printed out if this option is enabled. (default: keep data)
-additional-stats Output additional statistics.
-output-debug-info If set, classifier is run in debug mode and may output additional info to the console
-do-not-check-capabilities If set, classifier capabilities are not checked before classifier is built (use with caution).
-num-decimal-places The number of decimal places for the output of numbers in the model (default 4).
-batch-size The desired batch size for batch prediction (default 100).
| Constructor and Description |
|---|
MultiSearch()
the default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
algorithmTipText()
Returns the tip text for this property.
|
void |
buildClassifier(weka.core.Instances data)
builds the classifier.
|
String |
classLabelTipText()
Returns the tip text for this property.
|
AbstractSearch |
defaultAlgorithm()
Creates the default search algorithm.
|
double[] |
distributionForInstance(weka.core.Instance instance)
Returns the distribution for the given instance.
|
Enumeration |
enumerateMeasures()
Returns an enumeration of the measure names.
|
String |
evaluationTipText()
Returns the tip text for this property.
|
AbstractSearch |
getAlgorithm()
Returns the search algorithm.
|
weka.classifiers.Classifier |
getBestClassifier()
returns the best Classifier setup.
|
Point<Object> |
getBestCoordinates()
returns the points that were found to work best.
|
Point<Object> |
getBestValues()
returns the parameter values that were found to work best.
|
weka.core.Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
String |
getClassLabel()
Returns the class label to retrieve the metrics for (if applicable).
|
int |
getClassLabelIndex(int upper)
Returns the integer index.
|
String |
getCommandline(Object obj)
Returns the commandline of the given object.
|
weka.core.SelectedTag |
getEvaluation()
Gets the criterion used for evaluating the classifier performance.
|
AbstractEvaluationFactory |
getFactory()
Returns the factory instance.
|
SetupGenerator |
getGenerator()
Returns the setup generator.
|
File |
getLogFile()
Gets current log file.
|
double |
getMeasure(String measureName)
Returns the value of the named measure.
|
AbstractEvaluationMetrics |
getMetrics()
Returns the evaluation metrics.
|
weka.core.Tag[] |
getMetricsTags()
Returns the underlying tags.
|
String[] |
getOptions()
returns the options of the current setup.
|
String |
getRevision()
Returns the revision string.
|
AbstractParameter[] |
getSearchParameters()
Returns the search parameters.
|
List<Map.Entry<Integer,Performance>> |
getTrace()
Returns the full trace.
|
String |
getTraceClassifierAsCli(int index)
Returns the CLI string of a given item in the trace.
|
Integer |
getTraceFolds(int index)
Returns the folds of a given item in the trace.
|
List<Map.Entry<String,Object>> |
getTraceParameterSettings(int index)
Returns the parameter settings in structured way
|
int |
getTraceSize()
Returns the size of m_Trace, which is technically the amount of
setups that where tested in order to find the best.
|
Double |
getTraceValue(int index)
Returns the performance score of a given item in the trace.
|
String |
globalInfo()
Returns a string describing classifier.
|
Enumeration |
listOptions()
Gets an enumeration describing the available options.
|
void |
log(String message)
prints the specified message to stdout if debug is on and can also dump
the message to a log file.
|
void |
log(String message,
boolean onlyLog)
prints the specified message to stdout if debug is on and can also dump
the message to a log file.
|
String |
logFileTipText()
Returns the tip text for this property.
|
void |
logPerformances(Space space,
Vector<Performance> performances)
aligns all performances in the space and prints those tables to the log
file.
|
String |
logPerformances(Space space,
Vector<Performance> performances,
weka.core.Tag type)
generates a table string for all the performances in the space and returns
that.
|
static void |
main(String[] args)
Main method for running this classifier from commandline.
|
String |
searchParametersTipText()
Returns the tip text for this property.
|
void |
setAlgorithm(AbstractSearch value)
Sets the search algorithm.
|
void |
setClassifier(weka.classifiers.Classifier newClassifier)
Set the base learner.
|
void |
setClassLabel(String value)
Sets the class label to retrieve the metrics for (if applicable).
|
void |
setEvaluation(weka.core.SelectedTag value)
Sets the criterion to use for evaluating the classifier performance.
|
void |
setLogFile(File value)
Sets the log file to use.
|
void |
setOptions(String[] options)
Parses the options for this object.
|
void |
setSearchParameters(AbstractParameter[] value)
Sets the search parameters.
|
String |
toString()
returns a string representation of the classifier.
|
String |
toSummaryString()
Returns a string that summarizes the object.
|
getSeed, seedTipText, setSeedclassifierTipText, getClassifier, postExecution, preExecutionbatchSizeTipText, classifyInstance, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlacesequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetClassifier, getSeedpublic String globalInfo()
public Enumeration listOptions()
listOptions in interface weka.core.OptionHandlerlistOptions in class weka.classifiers.RandomizableSingleClassifierEnhancerpublic String[] getOptions()
getOptions in interface weka.core.OptionHandlergetOptions in class weka.classifiers.RandomizableSingleClassifierEnhancerpublic void setOptions(String[] options) throws Exception
setOptions in interface weka.core.OptionHandlersetOptions in class weka.classifiers.RandomizableSingleClassifierEnhanceroptions - the options to useException - if setting of options failspublic void setClassifier(weka.classifiers.Classifier newClassifier)
setClassifier in class weka.classifiers.SingleClassifierEnhancernewClassifier - the classifier to use.public String searchParametersTipText()
public void setSearchParameters(AbstractParameter[] value)
value - the parameterspublic AbstractParameter[] getSearchParameters()
public String algorithmTipText()
public void setAlgorithm(AbstractSearch value)
value - the algorithmpublic AbstractSearch getAlgorithm()
getAlgorithm in interface MultiSearchCapablepublic String classLabelTipText()
public void setClassLabel(String value)
value - the class lable index (1-based)public String getClassLabel()
public int getClassLabelIndex(int upper)
getClassLabelIndex in interface MultiSearchCapableupper - the maximum to usepublic AbstractSearch defaultAlgorithm()
public String evaluationTipText()
public weka.core.Tag[] getMetricsTags()
public void setEvaluation(weka.core.SelectedTag value)
value - the evaluation criterionpublic weka.core.SelectedTag getEvaluation()
getEvaluation in interface MultiSearchCapablepublic String logFileTipText()
public File getLogFile()
public void setLogFile(File value)
value - the log file.public weka.classifiers.Classifier getBestClassifier()
getBestClassifier in interface MultiSearchCapablepublic SetupGenerator getGenerator()
getGenerator in interface MultiSearchCapablepublic Enumeration enumerateMeasures()
enumerateMeasures in interface weka.core.AdditionalMeasureProducerpublic double getMeasure(String measureName)
getMeasure in interface weka.core.AdditionalMeasureProducermeasureName - the name of the measure to query for its valuepublic AbstractEvaluationFactory getFactory()
getFactory in interface MultiSearchCapablepublic AbstractEvaluationMetrics getMetrics()
getMetrics in interface MultiSearchCapablepublic Point<Object> getBestValues()
getBestValues in interface MultiSearchCapablepublic Point<Object> getBestCoordinates()
getBestCoordinates in interface MultiSearchCapablepublic weka.core.Capabilities getCapabilities()
getCapabilities in interface weka.classifiers.ClassifiergetCapabilities in interface weka.core.CapabilitiesHandlergetCapabilities in class weka.classifiers.SingleClassifierEnhancerpublic String getCommandline(Object obj)
getCommandline in interface MultiSearchCapableobj - the object to create the commandline forpublic void log(String message)
log in interface MultiSearchCapablemessage - the message to print or store in a log filepublic void log(String message, boolean onlyLog)
log in interface MultiSearchCapablemessage - the message to print or store in a log fileonlyLog - if true the message will only be put into the log file
but not to stdoutpublic String logPerformances(Space space, Vector<Performance> performances, weka.core.Tag type)
logPerformances in interface MultiSearchCapablespace - the current space to align the performances toperformances - the performances to aligntype - the type of performancepublic void logPerformances(Space space, Vector<Performance> performances)
logPerformances in interface MultiSearchCapablespace - the current space to align the performances toperformances - the performances to alignpublic int getTraceSize()
getTraceSize in interface TraceableOptimizerpublic String getTraceClassifierAsCli(int index)
getTraceClassifierAsCli in interface TraceableOptimizerindex - the index of the trace item to obtainpublic Double getTraceValue(int index)
getTraceValue in interface TraceableOptimizerindex - the index of the trace item to obtainpublic List<Map.Entry<String,Object>> getTraceParameterSettings(int index)
getTraceParameterSettings in interface TraceableOptimizerindex - the index of the trace item to obtainpublic Integer getTraceFolds(int index)
getTraceFolds in interface TraceableOptimizerindex - the index of the trace item to obtainpublic List<Map.Entry<Integer,Performance>> getTrace()
getTrace in interface TraceableOptimizerpublic void buildClassifier(weka.core.Instances data)
throws Exception
buildClassifier in interface weka.classifiers.Classifierdata - the training instancesException - if something goes wrongpublic double[] distributionForInstance(weka.core.Instance instance)
throws Exception
distributionForInstance in interface weka.classifiers.ClassifierdistributionForInstance in class weka.classifiers.AbstractClassifierinstance - the test instanceException - if distribution can't be computed successfullypublic String toString()
public String toSummaryString()
toSummaryString in interface weka.core.Summarizablepublic String getRevision()
getRevision in interface weka.core.RevisionHandlergetRevision in class weka.classifiers.AbstractClassifierpublic static void main(String[] args)
args - the optionsCopyright © 2021 University of Waikato, Hamilton, NZ. All Rights Reserved.