8 Percent probability

So far we’ve only look at whether the classifier was correct or not, but that isn’t what the output of the FOIA Predictor is! When you run a request into the machine, it tells you the percent probability that you will be successful.

predictions = forest.predict_proba([X.iloc[1]])
predictions[0]
## array([0.24, 0.76])

The code itself is built for more cases than just successful and unsuccessful - it gives you separate scores for each. The first one is the percent probability that your request will be denied, while the second one is the percent probability that your request will be successful. Since we only have two options, and you’re only interested in success, that’s all you really need to pay attention to.

predictions = forest.predict_proba([X.iloc[1]])
predictions[0][1]
## 0.76