|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.experiment.LearningRateResultProducer
public class LearningRateResultProducer
Tells a sub-ResultProducer to reproduce the current run for varying sized subsamples of the dataset. Normally used with an AveragingResultProducer and CrossValidationResultProducer combo to generate learning curve results. For non-numeric result fields, the first value is used.
Valid options are:-X <num steps> The number of steps in the learning rate curve. (default 10)
-W <class name> The full class name of a ResultProducer. eg: weka.experiment.CrossValidationResultProducer
Options specific to result producer weka.experiment.AveragingResultProducer:
-F <field name> The name of the field to average over. (default "Fold")
-X <num results> The number of results expected per average. (default 10)
-S Calculate standard deviations. (default only averages)
-W <class name> The full class name of a ResultProducer. eg: weka.experiment.CrossValidationResultProducer
Options specific to result producer weka.experiment.CrossValidationResultProducer:
-X <number of folds> The number of folds to use for the cross-validation. (default 10)
-D Save raw split evaluator output.
-O <file/directory name/path> The filename where raw output will be stored. If a directory name is specified then then individual outputs will be gzipped, otherwise all output will be zipped to the named file. Use in conjuction with -D. (default splitEvalutorOut.zip)
-W <class name> The full class name of a SplitEvaluator. eg: weka.experiment.ClassifierSplitEvaluator
Options specific to split evaluator weka.experiment.ClassifierSplitEvaluator:
-W <class name> The full class name of the classifier. eg: weka.classifiers.bayes.NaiveBayes
-C <index> The index of the class for which IR statistics are to be output. (default 1)
-I <index> The index of an attribute to output in the results. This attribute should identify an instance in order to know which instances are in the test set of a cross validation. if 0 no output (default 0).
-P Add target and prediction columns to the result for each fold.
Options specific to classifier weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the consoleAll options after -- will be passed to the result producer.
| Field Summary | |
|---|---|
static String |
STEP_FIELD_NAME
The name of the key field containing the learning rate step number |
| Constructor Summary | |
|---|---|
LearningRateResultProducer()
|
|
| Method Summary | |
|---|---|
void |
acceptResult(ResultProducer rp,
Object[] key,
Object[] result)
Accepts results from a ResultProducer. |
String[] |
determineColumnConstraints(ResultProducer rp)
Determines if there are any constraints (imposed by the destination) on the result columns to be produced by resultProducers. |
void |
doRun(int run)
Gets the results for a specified run number. |
void |
doRunKeys(int run)
Gets the keys for a specified run number. |
Enumeration |
enumerateMeasures()
Returns an enumeration of any additional measure names that might be in the result producer |
String |
getCompatibilityState()
Gets a description of the internal settings of the result producer, sufficient for distinguishing a ResultProducer instance from another with different settings (ignoring those settings set through this interface). |
String[] |
getKeyNames()
Gets the names of each of the columns produced for a single run. |
Object[] |
getKeyTypes()
Gets the data types of each of the columns produced for a single run. |
int |
getLowerSize()
Get the value of LowerSize. |
double |
getMeasure(String additionalMeasureName)
Returns the value of the named measure |
String[] |
getOptions()
Gets the current settings of the result producer. |
String[] |
getResultNames()
Gets the names of each of the columns produced for a single run. |
ResultProducer |
getResultProducer()
Get the ResultProducer. |
Object[] |
getResultTypes()
Gets the data types of each of the columns produced for a single run. |
String |
getRevision()
Returns the revision string. |
int |
getStepSize()
Get the value of StepSize. |
int |
getUpperSize()
Get the value of UpperSize. |
String |
globalInfo()
Returns a string describing this result producer |
boolean |
isResultRequired(ResultProducer rp,
Object[] key)
Determines whether the results for a specified key must be generated. |
Enumeration |
listOptions()
Returns an enumeration describing the available options.. |
String |
lowerSizeTipText()
Returns the tip text for this property |
void |
postProcess()
When this method is called, it indicates that no more requests to generate results for the current experiment will be sent. |
void |
postProcess(ResultProducer rp)
When this method is called, it indicates that no more results will be sent that need to be grouped together in any way. |
void |
preProcess()
Prepare to generate results. |
void |
preProcess(ResultProducer rp)
Prepare for the results to be received. |
String |
resultProducerTipText()
Returns the tip text for this property |
void |
setAdditionalMeasures(String[] additionalMeasures)
Set a list of method names for additional measures to look for in SplitEvaluators. |
void |
setInstances(Instances instances)
Sets the dataset that results will be obtained for. |
void |
setLowerSize(int newLowerSize)
Set the value of LowerSize. |
void |
setOptions(String[] options)
Parses a given list of options. |
void |
setResultListener(ResultListener listener)
Sets the object to send results of each run to. |
void |
setResultProducer(ResultProducer newResultProducer)
Set the ResultProducer. |
void |
setStepSize(int newStepSize)
Set the value of StepSize. |
void |
setUpperSize(int newUpperSize)
Set the value of UpperSize. |
String |
stepSizeTipText()
Returns the tip text for this property |
String |
toString()
Gets a text descrption of the result producer. |
String |
upperSizeTipText()
Returns the tip text for this property |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static String STEP_FIELD_NAME
| Constructor Detail |
|---|
public LearningRateResultProducer()
| Method Detail |
|---|
public String globalInfo()
public String[] determineColumnConstraints(ResultProducer rp)
throws Exception
determineColumnConstraints in interface ResultListenerrp - the ResultProducer to which the constraints will apply
Exception - if constraints can't be determined
public void doRunKeys(int run)
throws Exception
doRunKeys in interface ResultProducerrun - the run number to get keys for.
Exception - if a problem occurs while getting the keys
public void doRun(int run)
throws Exception
doRun in interface ResultProducerrun - the run number to get results for.
Exception - if a problem occurs while getting the results
public void preProcess(ResultProducer rp)
throws Exception
preProcess in interface ResultListenerrp - the ResultProducer that will generate the results
Exception - if an error occurs during preprocessing.
public void preProcess()
throws Exception
preProcess in interface ResultProducerException - if an error occurs during preprocessing.
public void postProcess(ResultProducer rp)
throws Exception
postProcess in interface ResultListenerrp - the ResultProducer that generated the results
Exception - if an error occurs
public void postProcess()
throws Exception
postProcess in interface ResultProducerException - if an error occurs
public void acceptResult(ResultProducer rp,
Object[] key,
Object[] result)
throws Exception
acceptResult in interface ResultListenerrp - the ResultProducer that generated the resultskey - an array of Objects (Strings or Doubles) that uniquely
identify a result for a given ResultProducer with given compatibilityStateresult - the results stored in an array. The objects stored in
the array may be Strings, Doubles, or null (for the missing value).
Exception - if the result could not be accepted.
public boolean isResultRequired(ResultProducer rp,
Object[] key)
throws Exception
isResultRequired in interface ResultListenerrp - the ResultProducer wanting to generate the resultskey - an array of Objects (Strings or Doubles) that uniquely
identify a result for a given ResultProducer with given compatibilityState
Exception - if it could not be determined if the result
is needed.
public String[] getKeyNames()
throws Exception
getKeyNames in interface ResultProducerException - if key names cannot be generated
public Object[] getKeyTypes()
throws Exception
getKeyTypes in interface ResultProducerException - if the key types could not be determined (perhaps
because of a problem from a nested sub-resultproducer)
public String[] getResultNames()
throws Exception
getResultNames in interface ResultProducerException - if the result names could not be determined (perhaps
because of a problem from a nested sub-resultproducer)
public Object[] getResultTypes()
throws Exception
getResultTypes in interface ResultProducerException - if the result types could not be determined (perhaps
because of a problem from a nested sub-resultproducer)public String getCompatibilityState()
getCompatibilityState in interface ResultProducerpublic Enumeration listOptions()
listOptions in interface OptionHandler
public void setOptions(String[] options)
throws Exception
-X <num steps> The number of steps in the learning rate curve. (default 10)
-W <class name> The full class name of a ResultProducer. eg: weka.experiment.CrossValidationResultProducer
Options specific to result producer weka.experiment.AveragingResultProducer:
-F <field name> The name of the field to average over. (default "Fold")
-X <num results> The number of results expected per average. (default 10)
-S Calculate standard deviations. (default only averages)
-W <class name> The full class name of a ResultProducer. eg: weka.experiment.CrossValidationResultProducer
Options specific to result producer weka.experiment.CrossValidationResultProducer:
-X <number of folds> The number of folds to use for the cross-validation. (default 10)
-D Save raw split evaluator output.
-O <file/directory name/path> The filename where raw output will be stored. If a directory name is specified then then individual outputs will be gzipped, otherwise all output will be zipped to the named file. Use in conjuction with -D. (default splitEvalutorOut.zip)
-W <class name> The full class name of a SplitEvaluator. eg: weka.experiment.ClassifierSplitEvaluator
Options specific to split evaluator weka.experiment.ClassifierSplitEvaluator:
-W <class name> The full class name of the classifier. eg: weka.classifiers.bayes.NaiveBayes
-C <index> The index of the class for which IR statistics are to be output. (default 1)
-I <index> The index of an attribute to output in the results. This attribute should identify an instance in order to know which instances are in the test set of a cross validation. if 0 no output (default 0).
-P Add target and prediction columns to the result for each fold.
Options specific to classifier weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the consoleAll options after -- will be passed to the result producer.
setOptions in interface OptionHandleroptions - the list of options as an array of strings
Exception - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlerpublic void setAdditionalMeasures(String[] additionalMeasures)
setAdditionalMeasures in interface ResultProduceradditionalMeasures - an array of measure names, null if nonepublic Enumeration enumerateMeasures()
enumerateMeasures in interface AdditionalMeasureProducerpublic double getMeasure(String additionalMeasureName)
getMeasure in interface AdditionalMeasureProduceradditionalMeasureName - the name of the measure to query for its value
IllegalArgumentException - if the named measure is not supportedpublic void setInstances(Instances instances)
setInstances in interface ResultProducerinstances - a value of type 'Instances'.public String lowerSizeTipText()
public int getLowerSize()
public void setLowerSize(int newLowerSize)
newLowerSize - Value to assign to
LowerSize.public String upperSizeTipText()
public int getUpperSize()
public void setUpperSize(int newUpperSize)
newUpperSize - Value to assign to
UpperSize.public String stepSizeTipText()
public int getStepSize()
public void setStepSize(int newStepSize)
newStepSize - Value to assign to
StepSize.public void setResultListener(ResultListener listener)
setResultListener in interface ResultProducerlistener - a value of type 'ResultListener'public String resultProducerTipText()
public ResultProducer getResultProducer()
public void setResultProducer(ResultProducer newResultProducer)
newResultProducer - new ResultProducer to use.public String toString()
toString in class Objectpublic String getRevision()
getRevision in interface RevisionHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||