Package com.clearnlp.classification.algorithm

Examples of com.clearnlp.classification.algorithm.AbstractAdaGrad


    out.close();
  }
 
  static public AbstractModel getModel(AbstractTrainSpace space, byte solver, double alpha, double rho, double eps)
  {
    AbstractAdaGrad algorithm = null;
   
    switch (solver)
    {
    case AbstractAlgorithm.SOLVER_ADAGRAD_HINGE:
      algorithm = new AdaGradHinge(alpha, rho, eps); break;
    case AbstractAlgorithm.SOLVER_ADAGRAD_LR:
      algorithm = new AdaGradLR(alpha, rho, eps); break;
    }
   
    AbstractModel model = space.getModel();
   
    model.initWeightVector();
    algorithm.train(space);

    return model;
  }
View Full Code Here


    out.close();
  }
 
  static public AbstractModel getModel(AbstractTrainSpace space, byte solver, double alpha, double rho, double eps)
  {
    AbstractAdaGrad algorithm = null;
   
    switch (solver)
    {
    case AbstractAlgorithm.SOLVER_ADAGRAD_HINGE:
      algorithm = new AdaGradHinge(alpha, rho, eps); break;
    case AbstractAlgorithm.SOLVER_ADAGRAD_LR:
      algorithm = new AdaGradLR(alpha, rho, eps); break;
    }
   
    algorithm.train(space);
    return space.getModel();
  }
View Full Code Here

TOP

Related Classes of com.clearnlp.classification.algorithm.AbstractAdaGrad

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.