Predicts the outcome class and puts the predicted values into a SQL table
Argument and Default Value¶
Feature name for the SQL table.
Given a classification model (--load_model), this switch will predict the outcome class on the groups given in the outcome table and puts the values into a MySQL table. This is useful for a set of groups that you don't have the outcomes for, but you have a prediction model for it.
The table created will look like:
where modelType is the first 4 letter of the model name. If you used rfc for instance, it will look like
Make sure the features are in the right order (i.e. the order they were put into when creating the model). A good place to check for that is the name of the pickle file (if you're using a pre:doc:fwflag_made picklefile, like those in here)
You need to make an output table that contains non null values for the outcomes & groups that you want predictions for, cause it uses the --predict_classifiers code to run this, which is why it also outputs comparisons between the values in the outcome table and the predicted outcomes.
See Applying A Pickle Model for more details on applying pickled models.
dlatkInterface.py -d dla_tutorial -t msgs -c user_id -f 'feat$cat_met_a30_2000_cp_w$msgs$user_id$1gra' \ --outcome_table blog_outcomes --outcomes genderDummy \ --predict_classifiers_to_feats lbp_gender --load --picklefile \ ~/gender.2000fbtopics.lr.pickle