Package weka.classifiers.functions
Class RBFNetwork
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.functions.RBFNetwork
- All Implemented Interfaces:
Serializable
,Cloneable
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
Class that implements a normalized Gaussian radial basisbasis 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. Symmetric multivariate Gaussians are fit to the data from each cluster. If the class is nominal it uses the given number of clusters per class.It standardizes all numeric attributes to zero mean and unit variance. Valid options are:
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. Symmetric multivariate Gaussians are fit to the data from each cluster. If the class is nominal it uses the given number of clusters per class.It standardizes all numeric attributes to zero mean and unit variance. Valid options are:
-B <number> Set the number of clusters (basis functions) to generate. (default = 2).
-S <seed> Set the random seed to be used by K-means. (default = 1).
-R <ridge> Set the ridge value for the logistic or linear regression.
-M <number> Set the maximum number of iterations for the logistic regression. (default -1, until convergence).
-W <number> Set the minimum standard deviation for the clusters. (default 0.1).
- Version:
- $Revision: 1.10 $
- Author:
- Mark Hall, Eibe Frank
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
buildClassifier
(Instances instances) Builds the classifierReturns the tip text for this propertydouble[]
distributionForInstance
(Instance instance) Computes the distribution for a given instanceReturns default capabilities of the classifier, i.e., and "or" of Logistic and LinearRegression.int
Get the random seed used by K-means.int
Get the value of MaxIts.double
Get the MinStdDev value.int
Return the number of clusters to generate.String[]
Gets the current settings of the classifier.Returns the revision string.double
getRidge()
Gets the ridge value.Returns a string describing this classifierReturns an enumeration describing the available optionsstatic void
Main method for testing this class.Returns the tip text for this propertyReturns the tip text for this propertyReturns the tip text for this propertyReturns the tip text for this propertyvoid
setClusteringSeed
(int seed) Set the random seed to be passed on to K-means.void
setMaxIts
(int newMaxIts) Set the value of MaxIts.void
setMinStdDev
(double newMinStdDev) Set the MinStdDev value.void
setNumClusters
(int numClusters) Set the number of clusters for K-means to generate.void
setOptions
(String[] options) Parses a given list of options.void
setRidge
(double ridge) Sets the ridge value for logistic or linear regression.toString()
Returns a description of this classifier as a StringMethods inherited from class weka.classifiers.Classifier
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug
-
Constructor Details
-
RBFNetwork
public RBFNetwork()
-
-
Method Details
-
globalInfo
Returns a string describing this classifier- Returns:
- a description of the classifier suitable for displaying in the explorer/experimenter gui
-
getCapabilities
Returns default capabilities of the classifier, i.e., and "or" of Logistic and LinearRegression.- Specified by:
getCapabilities
in interfaceCapabilitiesHandler
- Overrides:
getCapabilities
in classClassifier
- Returns:
- the capabilities of this classifier
- See Also:
-
buildClassifier
Builds the classifier- Specified by:
buildClassifier
in classClassifier
- Parameters:
instances
- the training data- Throws:
Exception
- if the classifier could not be built successfully
-
distributionForInstance
Computes the distribution for a given instance- Overrides:
distributionForInstance
in classClassifier
- Parameters:
instance
- the instance for which distribution is computed- Returns:
- the distribution
- Throws:
Exception
- if the distribution can't be computed successfully
-
toString
Returns a description of this classifier as a String -
maxItsTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getMaxIts
public int getMaxIts()Get the value of MaxIts.- Returns:
- Value of MaxIts.
-
setMaxIts
public void setMaxIts(int newMaxIts) Set the value of MaxIts.- Parameters:
newMaxIts
- Value to assign to MaxIts.
-
ridgeTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setRidge
public void setRidge(double ridge) Sets the ridge value for logistic or linear regression.- Parameters:
ridge
- the ridge
-
getRidge
public double getRidge()Gets the ridge value.- Returns:
- the ridge
-
numClustersTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setNumClusters
public void setNumClusters(int numClusters) Set the number of clusters for K-means to generate.- Parameters:
numClusters
- the number of clusters to generate.
-
getNumClusters
public int getNumClusters()Return the number of clusters to generate.- Returns:
- the number of clusters to generate.
-
clusteringSeedTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setClusteringSeed
public void setClusteringSeed(int seed) Set the random seed to be passed on to K-means.- Parameters:
seed
- a seed value.
-
getClusteringSeed
public int getClusteringSeed()Get the random seed used by K-means.- Returns:
- the seed value.
-
minStdDevTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getMinStdDev
public double getMinStdDev()Get the MinStdDev value.- Returns:
- the MinStdDev value.
-
setMinStdDev
public void setMinStdDev(double newMinStdDev) Set the MinStdDev value.- Parameters:
newMinStdDev
- The new MinStdDev value.
-
listOptions
Returns an enumeration describing the available options- Specified by:
listOptions
in interfaceOptionHandler
- Overrides:
listOptions
in classClassifier
- Returns:
- an enumeration of all the available options
-
setOptions
Parses a given list of options. Valid options are:-B <number> Set the number of clusters (basis functions) to generate. (default = 2).
-S <seed> Set the random seed to be used by K-means. (default = 1).
-R <ridge> Set the ridge value for the logistic or linear regression.
-M <number> Set the maximum number of iterations for the logistic regression. (default -1, until convergence).
-W <number> Set the minimum standard deviation for the clusters. (default 0.1).
- Specified by:
setOptions
in interfaceOptionHandler
- Overrides:
setOptions
in classClassifier
- Parameters:
options
- the list of options as an array of strings- Throws:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the classifier.- Specified by:
getOptions
in interfaceOptionHandler
- Overrides:
getOptions
in classClassifier
- Returns:
- an array of strings suitable for passing to setOptions
-
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Overrides:
getRevision
in classClassifier
- Returns:
- the revision
-
main
Main method for testing this class.- Parameters:
argv
- should contain the command line arguments to the scheme (see Evaluation)
-