public class MLPRegressor extends RandomizableClassifier
-N <int> Number of hidden units (default is 2).
-R <double> Ridge factor for quadratic penalty on weights (default is 0.01).
-O <double> Tolerance parameter for delta values (default is 1.0e-6).
-G Use conjugate gradient descent (recommended for many attributes).
-P <int> The size of the thread pool, for example, the number of cores in the CPU. (default 1)
-E <int> The number of threads to use, which should be >= size of thread pool. (default 1)
-S <num> Random number seed. (default 1)
-D If set, classifier is run in debug mode and may output additional info to the console
Constructor and Description |
---|
MLPRegressor() |
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(Instances data)
Builds the MLP network classifier based on the given dataset.
|
double |
classifyInstance(Instance inst)
Calculates the output of the network after the instance has been
piped through the fliters to replace missing values, etc.
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
int |
getNumFunctions()
Gets the number of functions.
|
int |
getNumThreads()
Gets the number of threads.
|
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier.
|
int |
getPoolSize()
Gets the number of threads.
|
double |
getRidge()
Gets the value of the ridge parameter.
|
double |
getTolerance()
Gets the tolerance parameter for the delta values.
|
boolean |
getUseCGD()
Gets whether to use CGD.
|
java.lang.String |
globalInfo()
This will return a string describing the classifier.
|
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(java.lang.String[] argv)
Main method to run the code from the command-line using
the standard WEKA options.
|
java.lang.String |
numFunctionsTipText() |
java.lang.String |
numThreadsTipText() |
java.lang.String |
poolSizeTipText() |
java.lang.String |
ridgeTipText() |
void |
setNumFunctions(int newNumFunctions)
Sets the number of functions.
|
void |
setNumThreads(int nT)
Sets the number of threads
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setPoolSize(int nT)
Sets the number of threads
|
void |
setRidge(double newRidge)
Sets the value of the ridge parameter.
|
void |
setTolerance(double newTolerance)
Sets the tolerance parameter for the delta values.
|
void |
setUseCGD(boolean newUseCGD)
Sets whether to use CGD.
|
java.lang.String |
toleranceTipText() |
java.lang.String |
toString()
Outputs the network as a string.
|
java.lang.String |
useCGDTipText() |
getSeed, seedTipText, setSeed
debugTipText, distributionForInstance, forName, getDebug, getRevision, makeCopies, makeCopy, runClassifier, setDebug
public Capabilities getCapabilities()
getCapabilities
in interface Classifier
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class AbstractClassifier
public void buildClassifier(Instances data) throws java.lang.Exception
java.lang.Exception
public double classifyInstance(Instance inst) throws java.lang.Exception
classifyInstance
in interface Classifier
classifyInstance
in class AbstractClassifier
java.lang.Exception
public java.lang.String globalInfo()
public java.lang.String toleranceTipText()
public double getTolerance()
public void setTolerance(double newTolerance)
public java.lang.String numFunctionsTipText()
public int getNumFunctions()
public void setNumFunctions(int newNumFunctions)
public java.lang.String ridgeTipText()
public double getRidge()
public void setRidge(double newRidge)
public java.lang.String useCGDTipText()
public boolean getUseCGD()
public void setUseCGD(boolean newUseCGD)
public java.lang.String numThreadsTipText()
public int getNumThreads()
public void setNumThreads(int nT)
public java.lang.String poolSizeTipText()
public int getPoolSize()
public void setPoolSize(int nT)
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class RandomizableClassifier
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-N <int> Number of hidden units (default is 2).
-R <double> Ridge factor for quadratic penalty on weights (default is 0.01).
-O <double> Tolerance parameter for delta values (default is 1.0e-6).
-G Use conjugate gradient descent (recommended for many attributes).
-P <int> The size of the thread pool, for example, the number of cores in the CPU. (default 1)
-E <int> The number of threads to use, which should be >= size of thread pool. (default 1)
-S <num> Random number seed. (default 1)
-D If set, classifier is run in debug mode and may output additional info to the consoleOptions after -- are passed to the designated classifier.
setOptions
in interface OptionHandler
setOptions
in class RandomizableClassifier
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class RandomizableClassifier
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] argv)