public class AutoWEKAClassifier
extends weka.classifiers.AbstractClassifier
implements weka.core.AdditionalMeasureProducer
| Modifier and Type | Field and Description |
|---|---|
protected weka.attributeSelection.AttributeSelection |
as
The chosen attribute selection method.
|
protected java.lang.String[] |
attributeEvalArgs
The arguments of the chosen attribute evaluation method.
|
protected java.lang.String |
attributeEvalClass
The class of the chosen attribute evaluation.
|
protected java.lang.String[] |
attributeSearchArgs
The arguments of the chosen attribute search method.
|
protected java.lang.String |
attributeSearchClass
The class of the chosen attribute search method.
|
protected ConfigurationCollection |
bestConfigsCollection
The best configurations.
|
protected weka.classifiers.Classifier |
classifier
The chosen classifier.
|
protected java.lang.String[] |
classifierArgs
The arguments of the chosen classifier.
|
protected java.lang.String |
classifierClass
The class of the chosen classifier.
|
static java.lang.String |
configurationHashSetPath
The path for the log with the hashcodes for the configs we have
|
static java.lang.String |
configurationInfoDirPath
The path for the directory with the configuration data and score
|
static java.lang.String |
configurationRankingPath
The path for the sorted best configurations
|
protected int |
DEFAULT_PARALLEL_RUNS
The default number of parallel threads.
|
protected double |
estimatedMetricValue
The estimated metric value of the method chosen out of the parallel runs.
|
protected double[] |
estimatedMetricValues
The estimated metric values of the chosen methods for each parallel run.
|
protected weka.classifiers.Evaluation |
eval
The evaluation for the best classifier.
|
protected static java.lang.String |
expName
The internal name of the experiment.
|
protected java.lang.String |
extraArgs
The extra arguments for Auto-WEKA.
|
protected double |
finalTrainTime
The time it took to train the final classifier.
|
protected int |
memLimit
The memory limit for running classifiers.
|
protected weka.classifiers.meta.AutoWEKAClassifier.Metric |
metric
The error metric.
|
protected java.lang.String[] |
msExperimentPaths
The paths to the internal Auto-WEKA files.
|
protected int |
nBestConfigs
The number of best configurations to return as output.
|
protected int |
parallelRuns
The number of parallel threads.
|
protected weka.classifiers.meta.AutoWEKAClassifier.Resampling |
resampling
The internal evaluation method.
|
protected java.lang.String |
resamplingArgs
The arguments to the evaluation method.
|
protected int |
seed
The random seed.
|
protected int |
timeLimit
The time limit for running Auto-WEKA.
|
int |
totalTried |
| Constructor and Description |
|---|
AutoWEKAClassifier()
Constructs a new AutoWEKAClassifier.
|
| Modifier and Type | Method and Description |
|---|---|
void |
buildClassifier(weka.core.Instances is)
Find the best classifier, arguments, and attribute selection for the data.
|
double |
classifyInstance(weka.core.Instance i)
Calculates the class membership for the given test instance.
|
double[] |
distributionForInstance(weka.core.Instance i)
Calculates the class membership probabilities for the given test instance.
|
java.util.Enumeration |
enumerateMeasures()
Returns an enumeration of the additional measure names
|
weka.core.Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
double |
getMeasure(java.lang.String additionalMeasureName)
Returns the value of the named measure
|
int |
getMemLimit()
Get the memory limit.
|
weka.classifiers.meta.AutoWEKAClassifier.Metric |
getMetric()
Get the metric.
|
int |
getnBestConfigs()
Get the memory limit.
|
java.lang.String[] |
getOptions()
Returns the options of the current setup.
|
int |
getParallelRuns()
Get the number of runs to do in parallel.
|
int |
getSeed()
Get the random seed.
|
weka.core.TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing
detailed information about the technical background of this class,
e.g., paper reference or book this class is based on.
|
int |
getTimeLimit()
Get the time limit.
|
java.lang.String |
globalInfo()
This will return a string describing the classifier.
|
java.util.Enumeration<weka.core.Option> |
listOptions()
Gets an enumeration describing the available options.
|
static void |
main(java.lang.String[] argv)
Main method for testing this class.
|
double |
measureEstimatedMetricValue()
Returns the metric value estimated during Auto-WEKA's internal evaluation.
|
java.lang.String |
memLimitTipText()
Returns the tip text for this property.
|
java.lang.String |
metricTipText()
Returns the tip text for this property.
|
java.lang.String |
nBestConfigsTipText()
Returns the tip text for this property.
|
java.lang.String |
parallelRunsTipText()
Returns the tip text for this property.
|
java.lang.String |
seedTipText()
Returns the tip text for this property.
|
void |
setLog(weka.gui.Logger log)
Set the WEKA logger.
|
void |
setMemLimit(int ml)
Set the memory limit.
|
void |
setMetric(weka.classifiers.meta.AutoWEKAClassifier.Metric m)
Set the metric.
|
void |
setnBestConfigs(int nbc)
Set the amount of configurations that will be given as output
|
void |
setOptions(java.lang.String[] options)
Set the options for the current setup.
|
void |
setParallelRuns(int n)
Set the number of parallel runs.
|
void |
setSeed(int s)
Set the random seed.
|
void |
setTimeLimit(int tl)
Set the time limit.
|
java.lang.String |
timeLimitTipText()
Returns the tip text for this property.
|
java.lang.String |
toString()
This will return a string describing the classifier.
|
batchSizeTipText, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, getRevision, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlacespublic static final java.lang.String configurationRankingPath
public static final java.lang.String configurationHashSetPath
public static final java.lang.String configurationInfoDirPath
protected weka.classifiers.Classifier classifier
protected weka.attributeSelection.AttributeSelection as
protected java.lang.String classifierClass
protected java.lang.String[] classifierArgs
protected java.lang.String attributeSearchClass
protected java.lang.String[] attributeSearchArgs
protected java.lang.String attributeEvalClass
protected java.lang.String[] attributeEvalArgs
protected java.lang.String[] msExperimentPaths
protected static java.lang.String expName
protected int seed
protected int timeLimit
protected int memLimit
protected int nBestConfigs
protected ConfigurationCollection bestConfigsCollection
protected weka.classifiers.meta.AutoWEKAClassifier.Resampling resampling
protected java.lang.String resamplingArgs
protected java.lang.String extraArgs
protected weka.classifiers.meta.AutoWEKAClassifier.Metric metric
protected double[] estimatedMetricValues
protected double estimatedMetricValue
protected weka.classifiers.Evaluation eval
protected final int DEFAULT_PARALLEL_RUNS
protected int parallelRuns
protected double finalTrainTime
public int totalTried
public AutoWEKAClassifier()
public static void main(java.lang.String[] argv)
argv - should contain command line options (see setOptions)public void buildClassifier(weka.core.Instances is)
throws java.lang.Exception
buildClassifier in interface weka.classifiers.Classifieris - the training data to be used for selecting and tuning the
classifier.java.lang.Exception - if the classifier could not be built successfully.public double classifyInstance(weka.core.Instance i)
throws java.lang.Exception
classifyInstance in interface weka.classifiers.ClassifierclassifyInstance in class weka.classifiers.AbstractClassifieri - the instance to be classifiedjava.lang.Exception - if instance could not be classified successfullypublic double[] distributionForInstance(weka.core.Instance i)
throws java.lang.Exception
distributionForInstance in interface weka.classifiers.ClassifierdistributionForInstance in class weka.classifiers.AbstractClassifieri - the instance to be classifiedjava.lang.Exception - if instance could not be classified successfully.public java.util.Enumeration<weka.core.Option> listOptions()
listOptions in interface weka.core.OptionHandlerlistOptions in class weka.classifiers.AbstractClassifierpublic java.lang.String[] getOptions()
getOptions in interface weka.core.OptionHandlergetOptions in class weka.classifiers.AbstractClassifierpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
setOptions in interface weka.core.OptionHandlersetOptions in class weka.classifiers.AbstractClassifieroptions - the new optionsjava.lang.Exceptionpublic void setSeed(int s)
s - The random seed.public int getSeed()
public java.lang.String seedTipText()
public void setParallelRuns(int n)
n - The number of parallel runs.public int getParallelRuns()
public java.lang.String parallelRunsTipText()
public void setMetric(weka.classifiers.meta.AutoWEKAClassifier.Metric m)
m - The metric.public weka.classifiers.meta.AutoWEKAClassifier.Metric getMetric()
public java.lang.String metricTipText()
public void setTimeLimit(int tl)
tl - The time limit in minutes.public int getTimeLimit()
public java.lang.String timeLimitTipText()
public void setMemLimit(int ml)
ml - The memory limit in MiB.public int getMemLimit()
public java.lang.String memLimitTipText()
public void setnBestConfigs(int nbc)
nbc - The amount of best configurations desired by the userpublic int getnBestConfigs()
public java.lang.String nBestConfigsTipText()
public void setLog(weka.gui.Logger log)
log - The logger.public weka.core.Capabilities getCapabilities()
getCapabilities in interface weka.classifiers.ClassifiergetCapabilities in interface weka.core.CapabilitiesHandlergetCapabilities in class weka.classifiers.AbstractClassifierpublic weka.core.TechnicalInformation getTechnicalInformation()
public java.lang.String globalInfo()
public java.lang.String toString()
toString in class java.lang.Objectpublic double measureEstimatedMetricValue()
public java.util.Enumeration enumerateMeasures()
enumerateMeasures in interface weka.core.AdditionalMeasureProducerpublic double getMeasure(java.lang.String additionalMeasureName)
getMeasure in interface weka.core.AdditionalMeasureProduceradditionalMeasureName - the name of the measure to query for its valuejava.lang.IllegalArgumentException - if the named measure is not supported