| |
|
| java.lang.Object weka.classifiers.Classifier weka.classifiers.functions.SimpleLinearRegression
SimpleLinearRegression | public class SimpleLinearRegression extends Classifier implements WeightedInstancesHandler(Code) | |
Learns a simple linear regression model. Picks the attribute that results in the lowest squared error. Missing values are not allowed. Can only deal with numeric attributes.
Valid options are:
-D
If set, classifier is run in debug mode and
may output additional info to the console
author: Eibe Frank (eibe@cs.waikato.ac.nz) version: $Revision: 1.9 $ |
serialVersionUID | final static long serialVersionUID(Code) | | for serialization
|
buildClassifier | public void buildClassifier(Instances insts) throws Exception(Code) | | Builds a simple linear regression model given the supplied training data.
Parameters: insts - the training data. throws: Exception - if an error occurs |
classifyInstance | public double classifyInstance(Instance inst) throws Exception(Code) | | Generate a prediction for the supplied instance.
Parameters: inst - the instance to predict. the prediction throws: Exception - if an error occurs |
foundUsefulAttribute | public boolean foundUsefulAttribute()(Code) | | Returns true if a usable attribute was found.
true if a usable attribute was found. |
getAttributeIndex | public int getAttributeIndex()(Code) | | Returns the index of the attribute used in the regression.
the index of the attribute. |
getCapabilities | public Capabilities getCapabilities()(Code) | | Returns default capabilities of the classifier.
the capabilities of this classifier |
getIntercept | public double getIntercept()(Code) | | Returns the intercept of the function.
the intercept. |
getSlope | public double getSlope()(Code) | | Returns the slope of the function.
the slope. |
globalInfo | public String globalInfo()(Code) | | Returns a string describing this classifier
a description of the classifier suitable fordisplaying in the explorer/experimenter gui |
main | public static void main(String[] argv)(Code) | | Main method for testing this class
Parameters: argv - options |
setSuppressErrorMessage | public void setSuppressErrorMessage(boolean s)(Code) | | Turn off the error message that is reported when no useful attribute is found.
Parameters: s - if set to true turns off the error message |
toString | public String toString()(Code) | | Returns a description of this classifier as a string
a description of the classifier. |
Fields inherited from weka.classifiers.Classifier | protected boolean m_Debug(Code)(Java Doc)
|
|
|
|