<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 This notebook analyzes the predictions of the trading model. <br/>At different thresholds, how effective is the model at predicting<br/> larger-than-average range days?
Step1:  This file contains the ranked predictions of the test set.
Step2:  The probabilities are in descending order. Observe the greater number of True values at the top of the rankings versus the bottom.
Step3:  Let's plot the True/False ratios for each probability decile. These ratios should roughly reflect the trend in the calibration plot.
<ASSISTANT_TASK:>
Python Code:
%matplotlib inline
import numpy as np
import pandas as pd
pwd
cd output
ls
Explanation: This notebook analyzes the predictions of the trading model. <br/>At different thresholds, how effective is the model at predicting<br/> larger-than-average range days?
End of explanation
ranking_frame = pd.read_csv('rankings_20170425.csv')
ranking_frame.columns
Explanation: This file contains the ranked predictions of the test set.
End of explanation
ranking_frame.rrover.head(20)
ranking_frame.rrover.tail(20)
Explanation: The probabilities are in descending order. Observe the greater number of True values at the top of the rankings versus the bottom.
End of explanation
ranking_frame['bins'] = pd.qcut(ranking_frame.probability, 10, labels=False)
grouped = ranking_frame.groupby('bins')
def get_ratio(series):
    ratio = series.value_counts()[1] / series.size
    return ratio
grouped['rrover'].apply(get_ratio).plot(kind='bar')
Explanation: Let's plot the True/False ratios for each probability decile. These ratios should roughly reflect the trend in the calibration plot.
End of explanation
<END_TASK>