public final class MultilayerPerceptron extends AbstractClassifier
MultilayerPerceptron.
MultilayerPerceptron.MultilayerPerceptronBuilder.| Modifier and Type | Class and Description |
|---|---|
static class |
MultilayerPerceptron.MultilayerPerceptronBuilder
Configuration for training a neural net through the
Classifier |
| Modifier and Type | Field and Description |
|---|---|
static long |
SEED |
| Modifier and Type | Method and Description |
|---|---|
static MultilayerPerceptron |
deserialize(DataInput in)
Deserializes a new neural network from the given input stream.
|
ActivationFunction[] |
getActivations() |
de.jungblut.math.DoubleVector |
getFoldedThetaVector() |
int[] |
getLayers() |
WeightMatrix[] |
getWeights() |
de.jungblut.math.DoubleVector |
predict(de.jungblut.math.DoubleVector xi)
Predicts the outcome of the given input by doing a forward pass.
|
de.jungblut.math.DoubleVector |
predict(de.jungblut.math.DoubleVector xi,
double threshold)
Predicts the outcome of the given input by doing a forward pass.
|
static void |
serialize(MultilayerPerceptron model,
DataOutput out)
Serializes this network at its current state to a binary file.
|
void |
train(de.jungblut.math.DoubleVector[] features,
de.jungblut.math.DoubleVector[] outcome)
Trains this classifier with the given features and the outcome.
|
double |
train(de.jungblut.math.DoubleVector[] features,
de.jungblut.math.DoubleVector[] outcome,
Minimizer minimizer,
int maxIterations,
double lambda,
boolean verbose)
Full backpropagation training method.
|
trainextractPredictedClass, extractPredictedClass, predictedClass, predictedClass, predictProbabilityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasClassifier, extractPredictedClass, extractPredictedClass, predictedClass, predictedClass, predictProbabilitypublic de.jungblut.math.DoubleVector predict(de.jungblut.math.DoubleVector xi)
public de.jungblut.math.DoubleVector predict(de.jungblut.math.DoubleVector xi,
double threshold)
public void train(de.jungblut.math.DoubleVector[] features,
de.jungblut.math.DoubleVector[] outcome)
Classifiertrain in interface Classifiertrain in class AbstractClassifieroutcome - the outcome must have classes labeled as doubles. E.G. in
the binary case you have a single element and decide between 0d
and 1d. In higher dimensional cases you have each of these single
elements mapped to a dimension.public final double train(de.jungblut.math.DoubleVector[] features,
de.jungblut.math.DoubleVector[] outcome,
Minimizer minimizer,
int maxIterations,
double lambda,
boolean verbose)
features - the training examples.outcome - the outcomes for the training examples.minimizer - the minimizer to use to train the neural network.maxIterations - the number of maximum iterations to train.lambda - the given regularization parameter.verbose - output to console with the last given errors.theta - initial spot to start the minimizations.public de.jungblut.math.DoubleVector getFoldedThetaVector()
public WeightMatrix[] getWeights()
public int[] getLayers()
public ActivationFunction[] getActivations()
public static MultilayerPerceptron deserialize(DataInput in) throws IOException
IOExceptionpublic static void serialize(MultilayerPerceptron model, DataOutput out) throws IOException
IOExceptionCopyright © 2016. All rights reserved.