|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.classifiers.Classifier | +--weka.classifiers.functions.PaceRegression
Class for building pace regression linear models and using them for prediction.
Under regularity conditions, pace regression is provably optimal when the number of coefficients tends to infinity. It consists of a group of estimators that are either overall optimal or optimal under certain conditions.
The current work of the pace regression theory, and therefore also this implementation, do not handle:
- missing values
- non-binary nominal attributes
- the case that n - k is small where n is number of instances and k is
number of coefficients (the threshold used in this implmentation is 20)
Valid options are:
-D
Produce debugging output.
-E estimator
The estimator can be one of the following:
REFERENCES
Wang, Y. (2000). "A new approach to fitting linear models in high dimensional spaces." PhD Thesis. Department of Computer Science, University of Waikato, New Zealand.
Wang, Y. and Witten, I. H. (2002). "Modeling for optimal probability prediction." Proceedings of ICML'2002. Sydney.
Field Summary | |
static Tag[] |
TAGS_ESTIMATOR
|
Constructor Summary | |
PaceRegression()
|
Method Summary | |
void |
buildClassifier(Instances data)
Builds a pace regression model for the given data. |
boolean |
checkForMissing(Instance instance,
Instances model)
Checks if an instance has a missing value. |
boolean |
checkForMissing(Instances data)
Checks if instances have a missing value. |
boolean |
checkForNonBinary(Instances data)
Checks if any of the nominal attributes is non-binary. |
double |
classifyInstance(Instance instance)
Classifies the given instance using the linear regression function. |
double[] |
coefficients()
Returns the coefficients for this linear model. |
java.lang.String |
debugTipText()
Returns the tip text for this property |
java.lang.String |
estimatorTipText()
Returns the tip text for this property |
boolean |
getDebug()
Controls whether debugging output will be printed |
SelectedTag |
getEstimator()
Gets the estimator |
java.lang.String[] |
getOptions()
Gets the current settings of the classifier. |
double |
getThreshold()
Gets the threshold for olsc estimator |
java.lang.String |
globalInfo()
Returns a string describing this classifier |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(java.lang.String[] argv)
Generates a linear regression function predictor. |
int |
numParameters()
Get the number of coefficients used in the model |
void |
setDebug(boolean debug)
Controls whether debugging output will be printed |
void |
setEstimator(SelectedTag estimator)
Sets the estimator. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setThreshold(double newThreshold)
Set threshold for the olsc estimator |
java.lang.String |
thresholdTipText()
Returns the tip text for this property |
java.lang.String |
toString()
Outputs the linear regression model as a string. |
Methods inherited from class weka.classifiers.Classifier |
distributionForInstance, forName, makeCopies |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Tag[] TAGS_ESTIMATOR
Constructor Detail |
public PaceRegression()
Method Detail |
public java.lang.String globalInfo()
public void buildClassifier(Instances data) throws java.lang.Exception
buildClassifier
in class Classifier
data
- the training data to be used for generating the
linear regression function
java.lang.Exception
- if the classifier could not be built successfullypublic boolean checkForMissing(Instances data)
data
- the data set
public boolean checkForMissing(Instance instance, Instances model)
instance
- the instance
public boolean checkForNonBinary(Instances data)
data
- the data set
public double classifyInstance(Instance instance) throws java.lang.Exception
classifyInstance
in class Classifier
instance
- the test instance
java.lang.Exception
- if classification can't be done successfullypublic java.lang.String toString()
toString
in class java.lang.Object
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class Classifier
public void setOptions(java.lang.String[] options) throws java.lang.Exception
setOptions
in interface OptionHandler
setOptions
in class Classifier
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedpublic double[] coefficients()
public java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class Classifier
public int numParameters()
public java.lang.String debugTipText()
debugTipText
in class Classifier
public void setDebug(boolean debug)
setDebug
in class Classifier
debug
- true if debugging output should be printedpublic boolean getDebug()
getDebug
in class Classifier
public java.lang.String estimatorTipText()
public SelectedTag getEstimator()
public void setEstimator(SelectedTag estimator)
estimator
- the new estimatorpublic java.lang.String thresholdTipText()
public void setThreshold(double newThreshold)
public double getThreshold()
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London