public abstract class MLPModel
extends weka.classifiers.RandomizableClassifier
implements weka.core.WeightedInstancesHandler
Constructor and Description |
---|
MLPModel() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
activationFunctionTipText() |
void |
buildClassifier(weka.core.Instances data)
Builds the MLP network classifier based on the given dataset.
|
double[] |
distributionForInstance(weka.core.Instance inst)
Calculates the output of the network after the instance has been piped
through the fliters to replace missing values, etc.
|
ActivationFunction |
getActivationFunction()
Returns the ActivationFunction object.
|
weka.core.Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
LossFunction |
getLossFunction()
Returns the LossFunction object.
|
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<weka.core.Option> |
listOptions()
Returns an enumeration describing the available options.
|
java.lang.String |
lossFunctionTipText() |
abstract java.lang.String |
modelType()
Returns the model type as a string.
|
java.lang.String |
numFunctionsTipText() |
java.lang.String |
numThreadsTipText() |
java.lang.String |
poolSizeTipText() |
java.lang.String |
ridgeTipText() |
void |
setActivationFunction(ActivationFunction func)
Sets the loss function.
|
void |
setLossFunction(LossFunction loss)
Sets the loss function.
|
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() |
batchSizeTipText, classifyInstance, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, getRevision, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces
public weka.core.Capabilities getCapabilities()
getCapabilities
in interface weka.classifiers.Classifier
getCapabilities
in interface weka.core.CapabilitiesHandler
getCapabilities
in class weka.classifiers.AbstractClassifier
public void buildClassifier(weka.core.Instances data) throws java.lang.Exception
buildClassifier
in interface weka.classifiers.Classifier
java.lang.Exception
public double[] distributionForInstance(weka.core.Instance inst) throws java.lang.Exception
distributionForInstance
in interface weka.classifiers.Classifier
distributionForInstance
in class weka.classifiers.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.lang.String lossFunctionTipText()
public LossFunction getLossFunction()
public void setLossFunction(LossFunction loss)
loss
- the loss function to use.public java.lang.String activationFunctionTipText()
public ActivationFunction getActivationFunction()
public void setActivationFunction(ActivationFunction func)
func
- the loss function to use.public java.util.Enumeration<weka.core.Option> listOptions()
listOptions
in interface weka.core.OptionHandler
listOptions
in class weka.classifiers.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)
-L <classname and parameters> The loss function to use. (default: weka.classifiers.functions.loss.SquaredError)
-S <num> Random number seed. (default 1)Options after -- are passed to the designated classifier.
setOptions
in interface weka.core.OptionHandler
setOptions
in class weka.classifiers.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 weka.core.OptionHandler
getOptions
in class weka.classifiers.RandomizableClassifier
public abstract java.lang.String modelType()
public java.lang.String toString()
toString
in class java.lang.Object