|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.AbstractClassifier
weka.classifiers.SingleClassifierEnhancer
weka.classifiers.meta.Corr
public class Corr
Assume NO MISSING VALUES, all attributes must be NUMERIC (or 0/1 maybe ...). Simple attribute selection for regression: select k most correlated attrs ...
Valid options are:-D If set, classifier is run in debug mode and may output additional info to the console
-W Full name of base classifier. (default: weka.classifiers.functions.LinearRegression)
Options specific to classifier weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the console
-K <int> The number of attrs. (default: 0 = numEx/2)
| Field Summary | |
|---|---|
protected int |
m_classIndex
|
protected double[] |
m_coeffs
|
protected int |
m_k
|
protected weka.filters.unsupervised.attribute.Remove |
m_remove
|
protected int[] |
m_subset
|
| Fields inherited from class weka.classifiers.SingleClassifierEnhancer |
|---|
m_Classifier |
| Fields inherited from class weka.classifiers.AbstractClassifier |
|---|
m_Debug |
| Constructor Summary | |
|---|---|
Corr()
|
|
| Method Summary | |
|---|---|
void |
buildClassifier(weka.core.Instances data)
Builds the classifier. |
double |
classifyInstance(weka.core.Instance instance)
Returns the prediction. |
protected String |
defaultClassifierString()
String describing default classifier. |
double[] |
getCoeffs()
|
int |
getNumattrs()
|
String[] |
getOptions()
Gets the current settings of the Classifier. |
String |
getRevision()
|
int[] |
getSubset()
|
weka.core.Instances |
getSubset(weka.core.Instances data)
|
String |
globalInfo()
Returns a string describing classifier. |
String |
keepIndices(weka.core.Instances data)
|
String |
keepIndicesBasedOnCorrelation(weka.core.Instances data)
|
Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(String[] argv)
Main method for testing this class. |
double[] |
means(weka.core.Instances data)
|
double[] |
msq(weka.core.Instances data)
|
String |
numattrsTipText()
Returns the tip text for this property. |
double[] |
sampleCorrs(weka.core.Instances data)
|
double[] |
sampleDevs(weka.core.Instances data,
double[] mean)
|
void |
saveObject(Object o)
|
void |
setNumattrs(int k)
|
void |
setOptions(String[] options)
Parses a given list of options. |
double[] |
sumXY(weka.core.Instances data)
|
String |
toString()
Returns description of classifier. |
| Methods inherited from class weka.classifiers.SingleClassifierEnhancer |
|---|
classifierTipText, getCapabilities, getClassifier, getClassifierSpec, setClassifier |
| Methods inherited from class weka.classifiers.AbstractClassifier |
|---|
debugTipText, distributionForInstance, forName, getDebug, makeCopies, makeCopy, runClassifier, setDebug |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected weka.filters.unsupervised.attribute.Remove m_remove
protected int m_classIndex
protected int m_k
protected int[] m_subset
protected double[] m_coeffs
| Constructor Detail |
|---|
public Corr()
| Method Detail |
|---|
protected String defaultClassifierString()
defaultClassifierString in class weka.classifiers.SingleClassifierEnhancerpublic String globalInfo()
public Enumeration listOptions()
listOptions in interface weka.core.OptionHandlerlistOptions in class weka.classifiers.SingleClassifierEnhancer
public void setOptions(String[] options)
throws Exception
-D If set, classifier is run in debug mode and may output additional info to the console
-W Full name of base classifier. (default: weka.classifiers.functions.LinearRegression)
Options specific to classifier weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the console
-K <int> The number of attrs. (default: 0 = numEx/2)
setOptions in interface weka.core.OptionHandlersetOptions in class weka.classifiers.SingleClassifierEnhanceroptions - the list of options as an array of strings
Exception - if an option is not supportedpublic String[] getOptions()
getOptions in interface weka.core.OptionHandlergetOptions in class weka.classifiers.SingleClassifierEnhancerpublic int getNumattrs()
public void setNumattrs(int k)
public String numattrsTipText()
public double[] sampleCorrs(weka.core.Instances data)
public double[] sumXY(weka.core.Instances data)
public double[] sampleDevs(weka.core.Instances data,
double[] mean)
public double[] msq(weka.core.Instances data)
public double[] means(weka.core.Instances data)
public String keepIndices(weka.core.Instances data)
public String keepIndicesBasedOnCorrelation(weka.core.Instances data)
public weka.core.Instances getSubset(weka.core.Instances data)
throws Exception
Exception
public void buildClassifier(weka.core.Instances data)
throws Exception
buildClassifier in interface weka.classifiers.Classifierdata - the training data
Exception - if something goes wrong
public void saveObject(Object o)
throws Exception
Exception
public double classifyInstance(weka.core.Instance instance)
throws Exception
classifyInstance in interface weka.classifiers.ClassifierclassifyInstance in class weka.classifiers.AbstractClassifierinstance - the instance to classify
Exception - if prediction failspublic double[] getCoeffs()
public int[] getSubset()
public String toString()
toString in class Objectpublic String getRevision()
getRevision in interface weka.core.RevisionHandlergetRevision in class weka.classifiers.AbstractClassifier
public static void main(String[] argv)
throws Exception
argv - the options
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||