--predict_regression

Switch

--predict_regression

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 outcomes on the groups given in the outcome table and compare them to the actual values in the outcome table. Make sure the feature tables are in the same order as they were when the model was created.

The output (printed to stdout) will contain the following values: R^2 Coefficient of determination R Square root of R^2 Pearson r Correlation between the predicted values and the original values (p:doc:fwflag_value in parentheses). Spearman rho Rank correlation between the predicted values and the original values (p:doc:fwflag_value in parentheses). Mean Squared Error Mean Squared Error Mean Absolute Error Mean Absolute Error

Other Switches

Required Switches: -d, -c, -t, -f, --outcome_table, --outcomes --load_model and --picklefile Optional Switches: --regression_to_lexicon --group_freq_thresh Example Commands ================ .. code:doc:fwflag_block:: python

# Loads the regression model in deleteMe.pickle, and uses the features to predict the ages of the users in # masterstats_andy_r10k, and compares the predicted ages to the actual ages in the table. ~/fwInterface.py -d fb20 -t messages_en -c user_id -f 'feat$1gram$messages_en$user_id$16to16$0_01' --outcome_table masterstats_andy_r10k --outcomes age --load_model --picklefile deleteMe.pickle --predict_regression