--save_model

Switch

--save_model

Description

Saves the model that you just trained.

Argument and Default Value

None

Details

If you are running a command that creates/trains a model, using this will tell the infrastructure to save the model. This switch requires the use of --picklefile. After saving the model, you can use the file using --load_model.

See one of these three for more info:

It is important to name your descriptively name your file. For example, you should include the outcome and features the model was built on. When applying the model you must specify the feature tables in the same order as when the model was created, so if this is reflected in your file name then it will save you time in the future.

Other Switches

Required Switches:

Optional Switches:

Example Commands

# Trains a regression model to predict age for users from 1grams
# Will save the model to a picklefile called age.1grams16to16.pickle
dlatkInterface.py -d dla_tutorial -t msgs -c user_id -f 'feat$1gram$msgs$user_id$16to16$0_01'  --outcome_table blog_outcomes --outcomes age --train_regression --save_model --picklefile age.1grams16to16.pickle