|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.data.neural.MultiLayerPerceptron
public class MultiLayerPerceptron
Representation of a MultiLayer Perceptron, a neural net with one or more hidden layers.
Field Summary | |
---|---|
static String |
ALLLAYERS_KEY
Key to store all layers of the MLP in the ModelContent. |
static int |
CLASSIFICATION_MODE
Indicates whether the MLP does classification with multiple output neurons, one neuron for each class. |
static String |
CLASSVALUE_KEY
Key to store the class value of a neuron in the ModelContent. |
static String |
INPUT_KEY
Key to store the input value of a neuron in the ModelContent. |
static String |
MODE_KEY
Key to store the mode of the MLP in the ModelContent. |
static int |
REGRESSION_MODE
Indicates whether the MLP does regression with one output neuron. |
static String |
THRESHOLD_KEY
Key to store the threshold value of a neuron in the ModelContent. |
static String |
WEIGHT_KEY
Key to store the weights of a neuron in the ModelContent. |
Constructor Summary | |
---|---|
MultiLayerPerceptron()
Constructor for an empty Neural Net. |
|
MultiLayerPerceptron(Architecture a)
Constructs a net with a given architecture. |
|
MultiLayerPerceptron(Layer[] layers)
Constructs a net with the given layers. |
Method Summary | |
---|---|
Architecture |
getArchitecture()
|
HashMap<DataCell,Integer> |
getClassMapping()
Allows to get the class mapping from output neurons to class values. |
String |
getClassOutput(double[] in)
Finds the winner and returns its class output value. |
HashMap<String,Integer> |
getInputMapping()
Allows to get the input mapping from input neurons to columns. |
Layer |
getLayer(int i)
Returns layer at a given position. |
Layer[] |
getLayers()
|
int |
getMode()
|
int |
getNrLayers()
|
static MultiLayerPerceptron |
loadPredictorParams(ModelContentRO predParams)
|
double[] |
output(double[] in)
Evaluates input and returns output of output neurons. |
double[] |
output(Double[] in)
Computes the output for given input. |
void |
savePredictorParams(ModelContentWO predParams)
Stores this MLP model to config. |
void |
setArchitecture(Architecture architecture)
Sets the architecture. |
void |
setClassMapping(HashMap<DataCell,Integer> map)
Allows for setting the class mapping from output neurons to class values. |
void |
setInputMapping(HashMap<String,Integer> map)
Allows for setting the input mapping from input neurons to class values. |
void |
setLayer(int i,
Layer layer)
Sets the layer at a given position. |
void |
setLayers(Layer[] layers)
Sets all layers. |
void |
setMode(int mode)
Sets the mode of the MLP. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String INPUT_KEY
public static final String WEIGHT_KEY
public static final String THRESHOLD_KEY
public static final String CLASSVALUE_KEY
public static final String MODE_KEY
public static final String ALLLAYERS_KEY
public static final int REGRESSION_MODE
public static final int CLASSIFICATION_MODE
Constructor Detail |
---|
public MultiLayerPerceptron(Layer[] layers)
layers
- layers for the new netpublic MultiLayerPerceptron(Architecture a)
a
- architecture for the new netpublic MultiLayerPerceptron()
Method Detail |
---|
public void setClassMapping(HashMap<DataCell,Integer> map)
map
- a HashMap containing the mapping.public void setInputMapping(HashMap<String,Integer> map)
map
- a HashMap containing the mappingpublic HashMap<DataCell,Integer> getClassMapping()
public HashMap<String,Integer> getInputMapping()
public Layer[] getLayers()
public Layer getLayer(int i)
i
- position
i
public int getNrLayers()
public void setLayers(Layer[] layers)
layers
- new layers for the netpublic void setLayer(int i, Layer layer)
i
- positionlayer
- new layer for position i
public double[] output(double[] in)
in
- input for the mlp
public double[] output(Double[] in)
in
- the input values
public String getClassOutput(double[] in)
in
- input for the mlp
public Architecture getArchitecture()
public void setArchitecture(Architecture architecture)
architecture
- Architecture for the netpublic void savePredictorParams(ModelContentWO predParams)
predParams
- ModelContent to write into.public int getMode()
CLASSIFICATION_MODE
,
REGRESSION_MODE
public void setMode(int mode)
mode
- the mode of the MLPCLASSIFICATION_MODE
,
REGRESSION_MODE
public static MultiLayerPerceptron loadPredictorParams(ModelContentRO predParams) throws InvalidSettingsException
predParams
- the ConfigObject containing the model of the mlp
InvalidSettingsException
- if settings are incorrect
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |