File size: 1,212 Bytes
9996866
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import gradio as gr
import pandas as pd

mase = pd.read_csv("results/results_mase.csv")
datasets = mase.dataset.unique()
frameworks = mase.framework.unique()
mase.set_index(["dataset", "framework"], inplace=True)

data = {"Dataset": datasets}


def mean(data, framework):
    try:
        return f"{round(mase.loc[data, framework].metric_error.mean(),3)} +/- {round(mase.loc[data, framework].metric_error.std(),3)}"
    except KeyError as e:
        return "n/a"


for framework in frameworks:
    data.update({framework: mean(data, framework) for data in datasets})

df = pd.DataFrame(data=data)
table = df.to_markdown()


with gr.Blocks() as demo:
    gr.Markdown(
        f"""
    # Time Series Forecasting Leaderboard
    
    This is a leaderboard of the MASE metric for time series forecasting problem on the different open datasets and models.

    The table is generated from the paper [AutoGluon–TimeSeries: AutoML for Probabilistic Time Series Forecasting](https://github.com/autogluon/autogluon) by 
Oleksandr Shchur, Caner Turkmen, Nick Erickson, Huibin Shen, Alexander Shirkov, Tony Hu, and Bernie Wang.

    ## MASE Metric

    {table}
    """
    )

if __name__ == "__main__":
    demo.launch()