Package adams.ml.model.regression
Class WekaRegressor
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.ml.model.regression.AbstractRegressor
-
- adams.ml.model.regression.WekaRegressor
-
- All Implemented Interfaces:
adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.SizeOfHandler,adams.ml.capabilities.CapabilitiesHandler,adams.ml.model.Algorithm<adams.ml.model.regression.RegressionModel>,adams.ml.model.regression.Regressor,Serializable
public class WekaRegressor extends adams.ml.model.regression.AbstractRegressorWraps around a Weka classifier that handles numeric classes (= regression).
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-strict-capabilities <boolean> (property: strictCapabilities) If enabled, a strict capabilities test is performed; otherwise, it is attempted to adjust the data to fit the algorithm's capabilities. default: false
-classifier <weka.classifiers.Classifier> (property: classifier) The classifier to use. default: weka.classifiers.functions.LinearRegressionJ -S 0 -R 1.0E-8 -num-decimal-places 4
- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected weka.classifiers.Classifierm_Classifierthe weka classifier to use.
-
Constructor Summary
Constructors Constructor Description WekaRegressor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringclassifierTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected adams.ml.model.regression.RegressionModeldoBuildModel(adams.ml.data.Dataset data)Builds a model from the data.adams.ml.capabilities.CapabilitiesgetCapabilities()Returns the algorithm's capabilities in terms of data.weka.classifiers.ClassifiergetClassifier()Returns the classifier to use.StringglobalInfo()Returns a string describing the object.voidsetClassifier(weka.classifiers.Classifier value)Sets the classifier to use.-
Methods inherited from class adams.ml.model.regression.AbstractRegressor
buildModel, check, getStrictCapabilities, handles, setStrictCapabilities, strictCapabilitiesTipText
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.core.option.AbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classadams.ml.model.regression.AbstractRegressor
-
setClassifier
public void setClassifier(weka.classifiers.Classifier value)
Sets the classifier to use.- Parameters:
value- the classifier
-
getClassifier
public weka.classifiers.Classifier getClassifier()
Returns the classifier to use.- Returns:
- the classifier
-
classifierTipText
public String classifierTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getCapabilities
public adams.ml.capabilities.Capabilities getCapabilities()
Returns the algorithm's capabilities in terms of data.- Specified by:
getCapabilitiesin interfaceadams.ml.model.Algorithm<adams.ml.model.regression.RegressionModel>- Specified by:
getCapabilitiesin interfaceadams.ml.capabilities.CapabilitiesHandler- Overrides:
getCapabilitiesin classadams.ml.model.regression.AbstractRegressor- Returns:
- the algorithm's capabilities
-
doBuildModel
protected adams.ml.model.regression.RegressionModel doBuildModel(adams.ml.data.Dataset data) throws ExceptionBuilds a model from the data.- Specified by:
doBuildModelin classadams.ml.model.regression.AbstractRegressor- Parameters:
data- the data to use for building the model- Returns:
- the generated model
- Throws:
Exception- if the build fails
-
-