public class MLP extends MultilayerPerceptron implements OnlineRegression<double[]>
Constructor and Description |
---|
MLP(int p,
LayerBuilder... builders)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
predict(double[] x)
Predicts the dependent variable of an instance.
|
void |
update(double[][] x,
double[] y)
Updates the model with a (micro-)batch of new samples.
|
void |
update(double[] x,
double y)
Online update the regression model with a new training instance.
|
backpropagate, getLearningRate, getMomentum, getWeightDecay, propagate, setLearningRate, setMomentum, setWeightDecay, toString, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
applyAsDouble, predict
public MLP(int p, LayerBuilder... builders)
p
- the number of variables in input layer.builders
- the builders of hidden layers from bottom to top.public double predict(double[] x)
Regression
predict
in interface Regression<double[]>
x
- an instance.public void update(double[] x, double y)
OnlineRegression
update
in interface OnlineRegression<double[]>
x
- training instance.y
- response variable.public void update(double[][] x, double[] y)
OnlineRegression
update
in interface OnlineRegression<double[]>
x
- the training instances.y
- the target values.