@Test(expected = Test.None.class) public void testLongley() throws Exception { System.out.println("longley"); int p = Longley.x[0].length; MLP model = new MLP(p, Layer.rectifier(30), Layer.sigmoid(30)); model.setLearningRate(TimeFunction.constant(0.01)); model.setWeightDecay(0.1); for (int epoch = 0; epoch < 5; epoch++) { int[] permutation = MathEx.permutate(Longley.x.length); for (int i : permutation) { model.update(Longley.x[i], Longley.y[i]); } } java.nio.file.Path temp = smile.data.Serialize.write(model); smile.data.Serialize.read(temp); }
@Override public void update(double[] x, double y) { propagate(x); target.get()[0] = y; backpropagate(x, true); t++; }
MLP extends MultilayerPerceptron implements OnlineRegression<double[]> { @Override public void update(double[] x, double y) { propagate(x); target.get()[0] = y; backpropagate(x, true); t++; } }
MLP extends MultilayerPerceptron implements OnlineRegression<double[]> { @Override public void update(double[] x, double y) { propagate(x); target.get()[0] = y; backpropagate(x, true); t++; } MLP(int p, LayerBuilder... builders); }
MLP extends MultilayerPerceptron implements OnlineRegression<double[]> { @Override public void update(double[] x, double y) { propagate(x); target.get()[0] = y; backpropagate(x, true); t++; } MLP(int p, LayerBuilder... builders); @Override double predict(double[] x); @Override void update(double[] x, double y); @Override void update(double[][] x, double[] y); }
MLP extends MultilayerPerceptron implements OnlineRegression<double[]> { @Override public void update(double[] x, double y) { propagate(x); target.get()[0] = y; backpropagate(x, true); t++; } MLP(int p, LayerBuilder... builders); @Override double predict(double[] x); @Override void update(double[] x, double y); @Override void update(double[][] x, double[] y);  }