Examples of currentLearningRate()


Examples of org.apache.mahout.classifier.sgd.OnlineLogisticRegression.currentLearningRate()

        Classifier c = PolymorphicWritable.read(in, Classifier.class);
        assertEquals(2, c.getCategories().size());
        assertEquals("0", c.getCategories().get(0));
        assertEquals("1", c.getCategories().get(1));
        OnlineLogisticRegression model = c.getModel();
        assertEquals(lr.getModel().currentLearningRate(), model.currentLearningRate(), 1e-10);
        in.close();

        // with that many data points, model should point in the same direction as the original vector
        Vector v = model.getBeta().viewRow(0);
        double z = n.dot(v) / (n.norm(2) * v.norm(2));
 
View Full Code Here

Examples of org.apache.mahout.classifier.sgd.OnlineLogisticRegression.currentLearningRate()

        if (pass % 5 == 0) {
          Auc eval = new Auc(0.5);
          for (TelephoneCall testCall : test) {
            eval.add(testCall.getTarget(), lr.classifyScalar(testCall.asVector()));
          }
          System.out.printf("%d, %.4f, %.4f\n", pass, lr.currentLearningRate(), eval.auc());
        }
      }

    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.