ml-solarwind / plot_kfold_RMSES.py
plot_kfold_RMSES.py
Raw
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 16 15:13:56 2020

@author: baum_c4
"""

import numpy as np
import pandas as pd

import pickle
import matplotlib.colors as mcol
import matplotlib.cm as cm
import matplotlib.pyplot as plt
import matplotlib


with open('plot_RMSE_kfold.pickle', 'rb') as f:
    allRMSES=pickle.load( f)


font = { 'size'   : 12,'weight' : 'normal',}

matplotlib.rc('font', **font)


f,ax = plt.subplots(1,1,figsize=(9*0.39,8*0.39))

label=['RFreg','GBreg','Copl.','flat','linReg']
meanRMSE=np.mean(allRMSES,axis=0)
stdRMSE=np.std(allRMSES,axis=0)

c=ax.boxplot(allRMSES[:,1:],showmeans='True',meanline='True',labels=label) 
#ax[0].set_xlabel('ACE position in X [Re]')
ax.set_ylabel('prediction RMSE [min]')
ax.set_title('10-fold cross validation')

ax.grid(True)
plt.tight_layout()
plt.savefig('plot_kfold_RMSE.pdf',bbox_inches='tight')
plt.show()