File size: 2,440 Bytes
79e1719
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c3b859b
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import streamlit as st
import pandas as pd
import os
from PIL import Image

st.title('Price Forecasting - Crude Oil Futures')
st.subheader('This page is not interactive - only for prototype purposes*')
st.text('*Due to not having access to GPU for cloud computation yet.')

st.header('Univariate Forecasting with Exogenous Predictors')

col1, col2, col3 = st.columns(3)

uni_df = pd.read_csv(os.path.join('price_forecasting_ml', 
                                   'artifacts',
                                   'crude_oil_8998a364-2ecc-483d-8079-f04d455b4522',
                                   'train_data.csv')).drop(columns=['Unnamed: 0'])

with col1:
    horizon_uni = st.text_input('Univariate Forecasting Horizon')
with col2:
    target_uni = st.multiselect('Univariate Target Variable', uni_df.columns
                             ,default='y')
with col3:
    agg_uni = st.selectbox('Univariate Data Aggregation', 
                           ['Daily', 'Weekly', 'Monthly', 'Yearly'])


st.dataframe(uni_df)

img1 = Image.open(os.path.join('price_forecasting_ml',
                              'artifacts',
                              'crude_oil_8998a364-2ecc-483d-8079-f04d455b4522',
                              'forecast_plot.jpg'))
st.image(img1, caption="Crude Oil Futures Price Forecasting - Univariate with Exogenous Features (Horizon = 5)")

st.markdown("---")

st.header('Multivariate Forecasting')

col4, col5, col6 = st.columns(3)

multi_df = pd.read_csv(os.path.join('price_forecasting_ml', 
                                   'artifacts',
                                   'crude_oil_df1ce299-117d-43c7-bcd5-7ecaeac0bc89',
                                   'train_data.csv')).drop(columns=['Unnamed: 0'])

with col4:
    horizon_multi = st.text_input('Multivariate Forecasting Horizon')
with col5:
    target_multi = st.multiselect('Multivariate Target Variable', multi_df.columns
                             ,default='y')
with col6:
    agg_multi = st.selectbox('Multivariate Data Aggregation', 
                           ['Daily', 'Weekly', 'Monthly', 'Yearly'])

st.dataframe(multi_df)

img2 = Image.open(os.path.join('price_forecasting_ml',
                              'artifacts',
                              'crude_oil_df1ce299-117d-43c7-bcd5-7ecaeac0bc89',
                              'forecast_plot.jpg'))
st.image(img2, caption="Crude Oil Futures Price Forecasting - Multivariate (Horizon = 5)")