Package org.apache.hama.ml.ann

Examples of org.apache.hama.ml.ann.SmallLayeredNeuralNetwork


  /* Internal model */
  private final SmallLayeredNeuralNetwork ann;

  public LinearRegression(int dimension) {
    ann = new SmallLayeredNeuralNetwork();
    ann.addLayer(dimension, false,
        FunctionFactory.createDoubleFunction("IdentityFunction"));
    ann.addLayer(1, true,
        FunctionFactory.createDoubleFunction("IdentityFunction"));
    ann.setCostFunction(FunctionFactory
View Full Code Here


    ann.setCostFunction(FunctionFactory
        .createDoubleDoubleFunction("SquaredError"));
  }

  public LinearRegression(String modelPath) {
    ann = new SmallLayeredNeuralNetwork(modelPath);
  }
View Full Code Here

public class LogisticRegression {
 
  private final SmallLayeredNeuralNetwork ann;
 
  public LogisticRegression(int dimension) {
    this.ann = new SmallLayeredNeuralNetwork();
    this.ann.addLayer(dimension, false, FunctionFactory.createDoubleFunction("Sigmoid"));
    this.ann.addLayer(1, true, FunctionFactory.createDoubleFunction("Sigmoid"));
    this.ann.setCostFunction(FunctionFactory.createDoubleDoubleFunction("CrossEntropy"));
  }
View Full Code Here

    this.ann.addLayer(1, true, FunctionFactory.createDoubleFunction("Sigmoid"));
    this.ann.setCostFunction(FunctionFactory.createDoubleDoubleFunction("CrossEntropy"));
  }
 
  public LogisticRegression(String modelPath) {
    this.ann = new SmallLayeredNeuralNetwork(modelPath);
  }
View Full Code Here

TOP

Related Classes of org.apache.hama.ml.ann.SmallLayeredNeuralNetwork

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.