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));