|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.Classifier
weka.classifiers.functions.PaceRegression
public class 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 the number of instances and k is the number of coefficients (the threshold used in this implmentation is 20)
For more information see:
Wang, Y (2000). A new approach to fitting linear models in high dimensional spaces. Hamilton, New Zealand.
Wang, Y., Witten, I. H.: Modeling for optimal probability prediction. In: Proceedings of the Nineteenth International Conference in Machine Learning, Sydney, Australia, 650-657, 2002.
@phdthesis{Wang2000, address = {Hamilton, New Zealand}, author = {Wang, Y}, school = {Department of Computer Science, University of Waikato}, title = {A new approach to fitting linear models in high dimensional spaces}, year = {2000} } @inproceedings{Wang2002, address = {Sydney, Australia}, author = {Wang, Y. and Witten, I. H.}, booktitle = {Proceedings of the Nineteenth International Conference in Machine Learning}, pages = {650-657}, title = {Modeling for optimal probability prediction}, year = {2002} }Valid options are:
-D Produce debugging output. (default no debugging output)
-E <estimator> The estimator can be one of the following: eb -- Empirical Bayes estimator for noraml mixture (default) nested -- Optimal nested model selector for normal mixture subset -- Optimal subset selector for normal mixture pace2 -- PACE2 for Chi-square mixture pace4 -- PACE4 for Chi-square mixture pace6 -- PACE6 for Chi-square mixture ols -- Ordinary least squares estimator aic -- AIC estimator bic -- BIC estimator ric -- RIC estimator olsc -- Ordinary least squares subset selector with a threshold
-S <threshold value> Threshold value for the OLSC estimator
Field Summary | |
---|---|
static Tag[] |
TAGS_ESTIMATOR
estimator types |
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. |
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 |
Capabilities |
getCapabilities()
Returns default capabilities of the classifier. |
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. |
java.lang.String |
getRevision()
Returns the revision string. |
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on. |
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, makeCopy |
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 TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Classifier
Capabilities
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(Instance instance, Instances model)
instance
- the instancemodel
- the data
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
-D Produce debugging output. (default no debugging output)
-E <estimator> The estimator can be one of the following: eb -- Empirical Bayes estimator for noraml mixture (default) nested -- Optimal nested model selector for normal mixture subset -- Optimal subset selector for normal mixture pace2 -- PACE2 for Chi-square mixture pace4 -- PACE4 for Chi-square mixture pace6 -- PACE6 for Chi-square mixture ols -- Ordinary least squares estimator aic -- AIC estimator bic -- BIC estimator ric -- RIC estimator olsc -- Ordinary least squares subset selector with a threshold
-S <threshold value> Threshold value for the OLSC estimator
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)
newThreshold
- the threshold for the olsc estimatorpublic double getThreshold()
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class Classifier
public static void main(java.lang.String[] argv)
argv
- the options
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |