You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
856 B
30 lines
856 B
"""
|
|
|
|
"""
|
|
from . import utils, draw_echarts
|
|
import streamlit as st
|
|
|
|
from models import VAR_Forecasting, ARIMA_Forecasting, SARIMA_Forecasting, RF_Forecasting
|
|
from typing import List, Type
|
|
|
|
|
|
def run(target: str,
|
|
target_name: str,
|
|
models: List[Type] = [
|
|
VAR_Forecasting, ARIMA_Forecasting, SARIMA_Forecasting,
|
|
RF_Forecasting
|
|
]):
|
|
models_name = [
|
|
model.__name__.split('.')[-1].split('_')[0] for model in models
|
|
]
|
|
|
|
st.title("模型预测结果")
|
|
history_data = utils.read_csv("data/normalized_df.csv")
|
|
|
|
selected_model = st.selectbox("选择你想看的模型预测结果", models_name)
|
|
|
|
pred_data = utils.read_csv(f"data/{selected_model}_Forecasting_df.csv")
|
|
|
|
draw_echarts.draw_echarts(selected_model, target, target_name,
|
|
history_data, pred_data)
|