@Test
public void example132() throws Exception {

  String outputFile = getTestTempFile("model").getAbsolutePath();
  StringWriter sw = new StringWriter();
  PrintWriter pw = new PrintWriter(sw, true);
  TrainLogistic.mainToOutput(new String[]{
      "--input", "donut.csv",
      "--output", outputFile,
      "--target", "color",
      "--categories", "2",
      "--predictors", "x", "y", "a", "b", "c",
      "--types", "numeric",
      "--features", "20",
      "--passes", "100",
      "--rate", "50"
  }, pw);
  String trainOut = sw.toString();
  assertTrue(trainOut.contains("a 0."));
  assertTrue(trainOut.contains("b -1."));
  assertTrue(trainOut.contains("c -25."));
  sw = new StringWriter();
  pw = new PrintWriter(sw, true);
  RunLogistic.mainToOutput(new String[]{
      "--input", "donut.csv",
      "--model", outputFile,
      "--auc",
      "--confusion"
  }, pw);
  trainOut = sw.toString();
  assertTrue(trainOut.contains("AUC = 1.00"));
  sw = new StringWriter();
  pw = new PrintWriter(sw, true);
  RunLogistic.mainToOutput(new String[]{
      "--input", "donut-test.csv",
      "--model", outputFile,
      "--auc",
      "--confusion"
  }, pw);
  trainOut = sw.toString();
  assertTrue(trainOut.contains("AUC = 0.9"));
}