public class PerceptronRegression extends BaseRegression
Usage: [-val <val>] [-nstall <number>] [<# in hidden layers...>]
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.lang.Integer> |
hiddenLayers
Number of nodes in each hidden layer
|
protected MultilayerPerceptron |
network
Neural network used for this class
|
protected int |
NStall
Number of epochs where error in validation set can increase before stopping.
|
protected int |
ValSize
Validation set percentage
|
AttributeSelector, trained, TrainingStats, validated, ValidationStats
Constructor and Description |
---|
PerceptronRegression() |
Modifier and Type | Method and Description |
---|---|
int |
getNFittingParameters()
Number of fitting parameters in a model.
|
protected java.lang.String |
printModel_protected()
Internal method that handles printing the model as a string.
|
java.util.List<java.lang.String> |
printModelDescriptionDetails(boolean htmlFormat)
Print details of the model.
|
java.lang.String |
printUsage()
Print out required format for options.
|
void |
run_protected(Dataset TrainData)
Run a model without checking if stuff is trained (use carefully)
|
void |
setEpochsBeforeStall(int nEpochs)
Define the number of consecutive epochs where the error in the validation
set increases before training halts.
|
void |
setHiddenLayers(java.util.List<java.lang.Integer> hiddenLayers)
Define the number of neurons in each hidden layer.
|
void |
setOptions(java.util.List OptionsObj)
Set any options for this object.
|
void |
setValidationSetSize(int percentage)
Set the size of validation set used when training the network.
|
protected void |
train_protected(Dataset TrainData)
Train a model without evaluating performance
|
clone, doRobustRegression, getRobustRegressionQ, robustTraining, runCommand, setRobustRegressionQ
about, crossValidate, externallyValidate, getAttributeSelector, getTrainTime, getValidationMethod, handleSetCommand, isTrained, isValidated, loadState, printCommand, printDescription, printModel, resetModel, run, saveCommand, saveState, setAttributeSelector, setComponent, train, train
protected MultilayerPerceptron network
protected java.util.List<java.lang.Integer> hiddenLayers
protected int ValSize
protected int NStall
public void setOptions(java.util.List OptionsObj) throws java.lang.Exception
Options
OptionsObj
- Array of options as Objects - can be null
java.lang.Exception
- if problem with inputspublic void setHiddenLayers(java.util.List<java.lang.Integer> hiddenLayers)
hiddenLayers
- List of number of neuronspublic void setValidationSetSize(int percentage)
percentage
- Percentage between 0 and 99public void setEpochsBeforeStall(int nEpochs)
nEpochs
- Number of epochs before stallpublic java.lang.String printUsage()
Options
protected void train_protected(Dataset TrainData)
BaseModel
train_protected
in class BaseModel
TrainData
- Training datapublic void run_protected(Dataset TrainData)
BaseModel
run_protected
in class BaseModel
TrainData
- Training datapublic int getNFittingParameters()
AbstractRegressionModel
protected java.lang.String printModel_protected()
BaseModel
printModel_protected
in class BaseModel
public java.util.List<java.lang.String> printModelDescriptionDetails(boolean htmlFormat)
BaseModel
BaseModel.printDescription(boolean)
.
Implementation note: No not add indentation for details. That is handled
by BaseModel.printDescription(boolean)
. You should also call the super
operation to get the Normalizer and Attribute selector settings
printModelDescriptionDetails
in class BaseModel
htmlFormat
- Whether to use HTML format