Пример #1
0
        print('ANN: %f'%score_ann)
        print('LSTM: %f'%score_lstm)
        print('NN: %f'%score_nn)
        print('MLP: %f'%score_mlp)

        
###########Graphs####################
        plt.figure(facecolor='w', edgecolor='k')
        plt.xlabel('No. of Days')
        plt.ylabel('USD/%s scaled'%cur)
        plt.plot(y_test)
        plt.plot(y_pred_svr)
        plt.plot(y_pred_test_ann)
        plt.plot(y_pred_test_lstm)
        plt.plot(y_pred_nn)
        plt.plot(y_pred_mlp)
        plt.legend(['Actual Price','SVR Prediction','ANN Prediction','LSTM Prediction','NN Prediction','MLP Prediction'])
        plt.grid(True)
        plt.show()

if __name__ == '__main__':
    df = pd.read_csv('Historical Data.csv',usecols=[0,1,2,3,4,5,6,7,8,9,10,11],parse_dates=['Date'])
    num_cores = mp.cpu_count()
    pool = Pool(os.cpu_count())
    print("No. of Cores : %d \n"%num_cores)
    mcp(df)                        
    result = pool.map(mcp(df), df)
    pool.close()
    pool.join()
    pool.clear()