Package tv.floe.metronome.deeplearning.neuralnetwork.core

Examples of tv.floe.metronome.deeplearning.neuralnetwork.core.LogisticRegression


    double learningRate = 0.01;
   
//    this.logisticRegressionLayer = new LogisticRegression(layer_input, this.hiddenLayerSizes[this.numberLayers-1], this.outputNeuronCount );
   
   
    LogisticRegression logreg = new LogisticRegression(x, 2, 2);
   
    logreg.labels = y;
   
   
    LogisticRegressionOptimizer opt = new LogisticRegressionOptimizer( logreg, learningRate );
    CustomConjugateGradient g = new CustomConjugateGradient(opt);
    g.optimize();
   
   
    Matrix predict = logreg.predict(x);
    //log.info(predict.toString());

    Evaluation eval = new Evaluation();
    eval.eval(y, predict);
    //log.info(eval.stats());
View Full Code Here


        double learningRate = 0.001;
       
//        this.logisticRegressionLayer = new LogisticRegression(layer_input, this.hiddenLayerSizes[this.numberLayers-1], this.outputNeuronCount );
       
       
        LogisticRegression logreg = new LogisticRegression(xMatrix, 6, 2);
       
        logreg.labels = yMatrix;
       
       
        LogisticRegressionOptimizer opt = new LogisticRegressionOptimizer( logreg, learningRate );
       

       
        CustomConjugateGradient g = new CustomConjugateGradient(opt);
        g.optimize();
       
       
        Matrix predict = logreg.predict(xMatrix);
        //log.info(predict.toString());

        Evaluation eval = new Evaluation();
        eval.eval(yMatrix, predict);
        //log.info(eval.stats());
View Full Code Here

    Matrix input = data_set.getFirst();
    Matrix labels = data_set.getSecond();
   
    System.out.println( "Beginning LogReg Training on CovType");
   
    LogisticRegression logRegression = new LogisticRegression( input, input.numCols(), labels.numCols());

    double learningRate = 0.001;
    logRegression.labels = labels;
   
    LogisticRegressionOptimizer opt = new LogisticRegressionOptimizer( logRegression, learningRate );
    CustomConjugateGradient g = new CustomConjugateGradient(opt);
    //NonZeroStoppingConjugateGradient g = new NonZeroStoppingConjugateGradient(opt);
    g.optimize();
   
   
   
    Matrix predict = logRegression.predict(input);

    Evaluation eval = new Evaluation();
    eval.eval(labels, predict);
    //log.info(eval.stats());
    System.out.println( eval.stats() );
View Full Code Here

   */
  @Test
  public void testXORTrain() {
   
   
    LogisticRegression logRegression = new LogisticRegression( x_xor_Matrix, 2, 2 );

   
    for (int i = 0; i < 10000; i++) {
     
      //logRegression.trainWithAdagrad(x, y);
      logRegression.train(x_xor_Matrix, y_xor_Matrix, 0.001);

    }
   
    Matrix predictions = logRegression.predict(x_xor_Matrix);
   
    MatrixUtils.debug_print(predictions);
   

    //Matrix predict = logRegression.predict(x);
View Full Code Here

      learningRate *= 0.95;
    }
   
*/
   
    LogisticRegression logRegression = new LogisticRegression( xTestMatrix, x[0].length, 2);

    double learningRate = 0.001;
   
    for (int i = 0; i < 10000; i++) {
     
      logRegression.train(xMatrix, yMatrix, learningRate);
      learningRate *= 0.999;

    }
   
//    Matrix predictions = logRegression.predict(xTestMatrix);
   
    Matrix predict = logRegression.predict(xMatrix);
    //log.info(predict.toString());

    Evaluation eval = new Evaluation();
    eval.eval(yMatrix, predict);
    //log.info(eval.stats());
View Full Code Here

    //MatrixUtils.debug_print(data_set.getSecond());
   
    Matrix input = data_set.getFirst();
    Matrix labels = data_set.getSecond();
   
    LogisticRegression logRegression = new LogisticRegression( input, input.numCols(), labels.numCols());

    double learningRate = 0.001;
   
    for (int i = 0; i < 10000; i++) {
     
      logRegression.train(input, labels, learningRate);
      learningRate *= 0.999;

    }
   
//    Matrix predictions = logRegression.predict(xTestMatrix);
   
    Matrix predict = logRegression.predict(input);
    //log.info(predict.toString());

    Evaluation eval = new Evaluation();
    eval.eval(labels, predict);
    //log.info(eval.stats());
View Full Code Here

    Matrix input = data_set.getFirst();
    Matrix labels = data_set.getSecond();
   
    System.out.println( "Beginning LogReg Training on CovType");
   
    LogisticRegression logRegression = new LogisticRegression( input, input.numCols(), labels.numCols());

    double learningRate = 0.001;
   
    for (int i = 0; i < 1000; i++) {
     
      logRegression.train(input, labels, learningRate);
      learningRate *= 0.999;

    }
   
//    Matrix predictions = logRegression.predict(xTestMatrix);
   
    Matrix predict = logRegression.predict(input);
    //log.info(predict.toString());

    Evaluation eval = new Evaluation();
    eval.eval(labels, predict);
    //log.info(eval.stats());
View Full Code Here

         
        }
       
       
        // this.logisticRegressionLayer = new LogisticRegression(layer_input, this.hiddenLayerSizes[this.numberLayers-1], this.outputNeuronCount );
        this.logisticRegressionLayer = new LogisticRegression();
        this.logisticRegressionLayer.load(is);
       
        this.preTrainingLayers = new RestrictedBoltzmannMachine[ this.numberLayers ];
        for ( int x = 0; x < this.numberLayers; x++ ) {
View Full Code Here

TOP

Related Classes of tv.floe.metronome.deeplearning.neuralnetwork.core.LogisticRegression

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.