Darwin
1.10(beta)
|
The Darwin framework includes two pre-developed applications for training and evaluating classifiers. The following command line examples demonstrate of their use. Run the applications with the -help
option to see more detailed usage.
In the above example, the first command learns a decision tree classifier based on the feature vectors and target labels provided in <DATA_FILE> and
<LABELS_FILE>, respectively. The decision tree is learned to a maximum depth of 100 levels and the learned parameters saved in a file called
parameters.xml
.
The second command uses the learned parameters to make predictions. It loads the classifier specification (classification method and parameters) from the parameters.xml
file and then evaluates the classifier on each feature vector from <DATA_FILE>. Predictions are written to the
<PREDICTIONS_FILE> file. The
-g
flag provides ground truth labels which the application uses to report classifier accuracy.
You can also provide a "-s <SCORE_FILE>"
to produce a file of classifier scores (usually log-likelihoods). There is one score per label and the highest score for each feature vector corresponds to the predicted class label.