|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.Classifier
weka.classifiers.functions.RBFNetwork
Class that implements a radial basis function network. It uses the K-Means clustering algorithm to provide the basis functions and learns either a logistic regression (discrete class problems) or linear regression (numeric class problems) on top of that.
Valid options are:
-B num
Set the number of clusters (basis functions) to use.
-R ridge
Set the ridge parameter for the logistic regression or linear regression.
-M num
Set the maximum number of iterations for logistic regression.
(default -1, until convergence)
-S seed
Set the random seed used by K-means when generating clusters.
(default 1).
Field Summary | |
private ClusterMembership |
m_basisFilter
The filter for producing the meta data |
private int |
m_clusteringSeed
The seed to pass on to K-means |
private LinearRegression |
m_linear
The linear regression for numeric problems |
private Logistic |
m_logistic
The logistic regression for classification problems |
private int |
m_maxIts
The maximum number of iterations for logistic regression. |
private int |
m_numClusters
The number of clusters (basis functions to generate) |
protected double |
m_ridge
The ridge parameter for the logistic regression. |
Fields inherited from class weka.classifiers.Classifier |
m_Debug |
Constructor Summary | |
RBFNetwork()
|
Method Summary | |
void |
buildClassifier(Instances instances)
Builds the classifier |
java.lang.String |
clusteringSeedTipText()
Returns the tip text for this property |
double[] |
distributionForInstance(Instance instance)
Computes the distribution for a given instance |
int |
getClusteringSeed()
Get the random seed used by K-means. |
int |
getMaxIts()
Get the value of MaxIts. |
int |
getNumClusters()
Return the number of clusters to generate. |
java.lang.String[] |
getOptions()
Gets the current settings of the classifier. |
double |
getRidge()
Gets the ridge value. |
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)
Main method for testing this class. |
java.lang.String |
maxItsTipText()
Returns the tip text for this property |
java.lang.String |
numClustersTipText()
Returns the tip text for this property |
java.lang.String |
ridgeTipText()
Returns the tip text for this property |
void |
setClusteringSeed(int seed)
Set the random seed to be passed on to K-means. |
void |
setMaxIts(int newMaxIts)
Set the value of MaxIts. |
void |
setNumClusters(int numClusters)
Set the number of clusters for K-means to generate. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setRidge(double ridge)
Sets the ridge value for logistic or linear regression. |
java.lang.String |
toString()
Returns a description of this classifier as a String |
Methods inherited from class weka.classifiers.Classifier |
classifyInstance, debugTipText, forName, getDebug, makeCopies, setDebug |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private Logistic m_logistic
private LinearRegression m_linear
private ClusterMembership m_basisFilter
private int m_numClusters
protected double m_ridge
private int m_maxIts
private int m_clusteringSeed
Constructor Detail |
public RBFNetwork()
Method Detail |
public java.lang.String globalInfo()
public void buildClassifier(Instances instances) throws java.lang.Exception
buildClassifier
in class Classifier
instances
- the training data
java.lang.Exception
- if the classifier could not be built successfullypublic double[] distributionForInstance(Instance instance) throws java.lang.Exception
distributionForInstance
in class Classifier
instance
- the instance for which distribution is computed
java.lang.Exception
- if the distribution can't be computed successfullypublic java.lang.String toString()
public java.lang.String maxItsTipText()
public int getMaxIts()
public void setMaxIts(int newMaxIts)
newMaxIts
- Value to assign to MaxIts.public java.lang.String ridgeTipText()
public void setRidge(double ridge)
ridge
- the ridgepublic double getRidge()
public java.lang.String numClustersTipText()
public void setNumClusters(int numClusters)
numClusters
- the number of clusters to generate.public int getNumClusters()
public java.lang.String clusteringSeedTipText()
public void setClusteringSeed(int seed)
seed
- a seed value.public int getClusteringSeed()
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class Classifier
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-B num
Set the number of clusters (basis functions) to use.
-R ridge
Set the ridge parameter for the logistic regression or linear regression.
-M num
Set the maximum number of iterations for logistic regression.
(default -1, until convergence)
-S seed
Set the random seed used by K-means when generating clusters.
(default 1).
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 java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class Classifier
public static void main(java.lang.String[] argv)
argv
- should contain the command line arguments to the
scheme (see Evaluation)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |