--predict_classifiers

Switch

--predict_classifiers

Description

Predicts the outcomes and compares the predicted values to the actual ones.

Argument and Default Value

None

Details

Given a model (--load_model), this switch will predict the outcome classes on the groups given in the outcome table and compare them to the actual classes in the outcome table. Make sure the feature tables are in the same order as they were when the model was created.

The output will contains some of the following things: confusion matrix See here. precision and recall See here and this line (numbers are examples):

FOLD ACC: 0.8839 (mfclass_acc: 0.6186); mfclass: 1; auc: 0.8749

ACC percent classified correctly mfclass_acc accuracy if we predicted the main class every time (baseline) mfclass "Most frequent class" i.e. the class that has the most groups in it. auc Area Under the Curve (the ROC curve). See here for more explanations.

Other Switches

Required Switches: -d, -g, -t, -f, --outcome_table, --outcomes --load_model and --picklefile Optional Switches: --classification_to_lexicon --group_freq_thresh Example Commands ================

Using the packaged dla_tutorial dataset (see Applying A Pickle Model): loads the classification model in is_student.pickle, uses the 1grams to predict whether users in blog_outcomes are students, and compares the predicted classes to the actual ones in the table.

dlatkInterface.py -d dla_tutorial -t msgs -c user_id -f 'feat$1gram$msgs$user_id$16to16$0_01' \
--outcome_table blog_outcomes --outcomes is_student --load_model --picklefile is_student.pickle \
--predict_classifiers