-
Notifications
You must be signed in to change notification settings - Fork 6
/
predictionplot.py
35 lines (25 loc) · 1.01 KB
/
predictionplot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
dataframe = pd.read_excel("1hourly36hahead36hback60percenttestmse.xlsx")
testdf = dataframe[int(len(dataframe)*0.6):]
traindf = dataframe[:int(len(dataframe)*0.6)]
plt.title("Validation Dataset Price")
plt.xlabel("Time")
plt.ylabel("Price")
plt.plot(testdf['price'])
dataframe = pd.read_excel("1hourly36hahead36hback60percenttestmse.xlsx")
plt.plot(dataframe['price'], alpha=0.6, label='True Price')
plt.plot(dataframe[0]*(dataframe['price']) + dataframe['price'], alpha=0.6, label = '4 hours ahead')
plt.plot(dataframe[8]*(dataframe['price']) + dataframe['price'], alpha=0.6, label = '36 hours ahead')
plt.legend()
plt.title("Log-True Price and Log-Predicted Prices")
plt.xlabel("Hours")
plt.ylabel("USD")
print("hi")
dataframe = pd.read_excel("hourlysentimentaligned.xlsx")
plt.scatter(range(len(dataframe['Sentiment'])),dataframe['Sentiment'], s=0.5)
plt.title("Reddit Sentiment Regarding Crypto")
plt.xlabel("Time")
plt.ylabel("Sentiment")
print(' hi')