Explaining PredictionsΒΆ

This functionality is integrated into prediction. Similar to model introspection, this functionality also extracts logical formulae from the machine learning models first. But this process is implicit. To obtain predictions with explanations for the data file new-data1.csv using the models in model/this-model/, and store the predictions in pred.csv, simply use the -e flag as in the following command:

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

With the -e flag, this command will run slower as it will extract explanations at the same time of obtaining predictions. Besides the usual output of the predict command, -e flag will output the feature importance (in the column w_<feature_name>) and the feature decision logic (in the column r_<feature_name>) for each feature. Note that if there are n features in the dataset, -e will output 2n extra columns, which may make the output file very large.