MCPcopy Create free account
hub / github.com/WinVector/Logistic / DemoDriver

Class DemoDriver

src/com/winvector/logistic/demo/DemoDriver.java:10–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8
9/// @SuppressWarnings("deprecation") // Tool depreciated 0.21.0 a known issue: https://issues.apache.org/jira/browse/MAPREDUCE-2084
10public class DemoDriver {
11 public static void main(final String args[]) throws Exception {
12 try {
13 System.out.println("starting DemoDriver");
14 for(final String ai: args) {
15 System.out.print("\t'" + ai + "'");
16 }
17 System.out.println();
18 final ProgramDriver pgd = new ProgramDriver();
19 pgd.addClass("logistictrain", MapReduceLogisticTrain.class, "Train a logistic regression model. (trainFile.tsv formula modelOut.ser)");
20 // export executable jar file using DemoDriver run configuration (may need to add memory options and such) packed in dependent libraries
21 // in ~/Downloads with a model1.ser in that directory: ~/Documents/workspace/hadoop-0.21.0/bin/hadoop jar ~/Documents/workspace/Logistic/logistic.jar logisticscore model1.ser ~/Documents/workspace/Logistic/test/com/winvector/logistic/uciCarTest.tsv scoredDir
22 pgd.addClass("logisticscore", MapReduceScore.class, "Apply a logistic regression model to new data. (modelIn.ser testFile.tsv resultDir)");
23 pgd.driver(args);
24 } catch (Throwable t) {
25 System.out.println(Licenses.licenses);
26 t.printStackTrace();
27 throw new Exception(t.toString());
28 }
29 }
30}
31

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected