public void train(Point in, Point out, double learningRate) { Point mapped = map(in); List<Double> error = new ArrayList<Double>(mapped.size()); for (int j : series(out.size())) { double t = out.get(j), o = mapped.get(j); error.add(o - t); } train(error, learningRate); }
public static ThreeLayer random(int n, int h, double var, Activation activation) { Builder<ThreeLayer> builder = builder(n, h, activation); List<Double> parameters = Point.random(builder.numParameters(), var); return builder.build(parameters); }