kashif HF staff commited on
Commit
9996866
1 Parent(s): 27774e0

added table

Browse files
Files changed (2) hide show
  1. app.py +43 -0
  2. requirements.txt +2 -0
app.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import pandas as pd
3
+
4
+ mase = pd.read_csv("results/results_mase.csv")
5
+ datasets = mase.dataset.unique()
6
+ frameworks = mase.framework.unique()
7
+ mase.set_index(["dataset", "framework"], inplace=True)
8
+
9
+ data = {"Dataset": datasets}
10
+
11
+
12
+ def mean(data, framework):
13
+ try:
14
+ return f"{round(mase.loc[data, framework].metric_error.mean(),3)} +/- {round(mase.loc[data, framework].metric_error.std(),3)}"
15
+ except KeyError as e:
16
+ return "n/a"
17
+
18
+
19
+ for framework in frameworks:
20
+ data.update({framework: mean(data, framework) for data in datasets})
21
+
22
+ df = pd.DataFrame(data=data)
23
+ table = df.to_markdown()
24
+
25
+
26
+ with gr.Blocks() as demo:
27
+ gr.Markdown(
28
+ f"""
29
+ # Time Series Forecasting Leaderboard
30
+
31
+ This is a leaderboard of the MASE metric for time series forecasting problem on the different open datasets and models.
32
+
33
+ The table is generated from the paper [AutoGluon–TimeSeries: AutoML for Probabilistic Time Series Forecasting](https://github.com/autogluon/autogluon) by
34
+ Oleksandr Shchur, Caner Turkmen, Nick Erickson, Huibin Shen, Alexander Shirkov, Tony Hu, and Bernie Wang.
35
+
36
+ ## MASE Metric
37
+
38
+ {table}
39
+ """
40
+ )
41
+
42
+ if __name__ == "__main__":
43
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ tabulate
2
+ pandas