PredictionΒΆ

When a machine learning model is built, the user can use the model to predict the outcome of new data instances. This can be done using the command:

silas predict [OPTIONS] [model_dir] [data_file]

where model_dir defines the directory in which the model is stored, data_file is file that contains new data instances, and OPTIONS include:

  • -h: Print help message and exit.

  • -e: Use the Model Insight feature to obtain explanations of the prediction.

  • -o: prediction_file: Output the predictions in prediction_file.

For example, to obtain predictions for the data file new-data1.csv using the models in model/this-model/, and store the predictions in pred.csv, issue the following command:

silas predict -o pred.csv model/this-model/ new-data1.csv