MAPE = [mape(df['Price'][-500:], df['Predictions'][-500:]), mape(df['Price'][-1000:-500], df['Predictions'][-1000:-500]), mape(df['Price'][-1500:-1000], df['Predictions'][-1500:-1000]), mape(df['Price'][-2000:-1500], df['Predictions'][-2000:-1500])] Col1 = [ratios(15, i, i-500) for i in range(500, 2001, 500)] Col2 = [ratios(10, i, i-500) for i in range(500, 2001, 500)] Col3 = [ratios(5, i, i-500) for i in range(500, 2001, 500)] print pd.DataFrame([MAPE, Col1, Col2, Col3], index=["Mape", "Ratio 15%", "Ratio 10%", "Ratio 5%"], columns=['0-500', "500-1000", "1000-1500", "1500-2000"])
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter