public class PreConstructedLinearModel extends Classifier implements java.io.Serializable
| Constructor and Description | 
|---|
| PreConstructedLinearModel(double[] coeffs,
                         double intercept)Constructor | 
| Modifier and Type | Method and Description | 
|---|---|
| void | buildClassifier(Instances instances)Builds the classifier. | 
| double | classifyInstance(Instance inst)Predicts the class of the supplied instance using the linear model. | 
| double[] | coefficients()Return the array of coefficients | 
| java.lang.String | getRevision()Returns the revision string. | 
| double | intercept()Return the intercept | 
| int | numParameters()Return the number of parameters (coefficients) in the linear model | 
| java.lang.String | toString()Returns a textual description of this linear model | 
debugTipText, distributionForInstance, forName, getCapabilities, getDebug, getOptions, listOptions, makeCopies, makeCopy, setDebug, setOptionspublic PreConstructedLinearModel(double[] coeffs,
                                 double intercept)
coeffs - an array of coefficientsintercept - the interceptpublic void buildClassifier(Instances instances) throws java.lang.Exception
buildClassifier in class Classifierinstances - an Instances valuejava.lang.Exception - if an error occurspublic double classifyInstance(Instance inst) throws java.lang.Exception
classifyInstance in class Classifierinst - the instance to make a prediction forjava.lang.Exception - if an error occurspublic int numParameters()
public double[] coefficients()
public double intercept()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class Classifier