Spaces:
Running
Running
edit readme, add script to generate dummy data
Browse files- README.md +13 -2
- results/AutoGluon (best)/all_results.csv +5 -5
- results/CatBoost/all_results.csv +5 -5
- results/KNN/all_results.csv +5 -5
- results/TabPFN-v2/all_results.csv +5 -5
- results/TabPFN/all_results.csv +5 -5
- src/generate_dummy_data.py +89 -0
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
emoji: 🥇
|
4 |
colorFrom: green
|
5 |
colorTo: indigo
|
@@ -7,10 +7,21 @@ sdk: gradio
|
|
7 |
app_file: app.py
|
8 |
pinned: true
|
9 |
license: apache-2.0
|
10 |
-
short_description: '
|
11 |
sdk_version: 4.44.0
|
12 |
---
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
## Ethical Considerations
|
15 |
|
16 |
This release is for research purposes only in support of an academic paper. Our models, datasets, and code are not specifically designed or evaluated for all downstream purposes. We strongly recommend users evaluate and address potential concerns related to accuracy, safety, and fairness before deploying this model. We encourage users to consider the common limitations of AI, comply with applicable laws, and leverage best practices when selecting use cases, particularly for high-risk scenarios where errors or misuse could significantly impact people’s lives, rights, or safety. For further guidance on use cases, refer to our AUP and AI AUP.
|
|
|
1 |
---
|
2 |
+
title: TabArena
|
3 |
emoji: 🥇
|
4 |
colorFrom: green
|
5 |
colorTo: indigo
|
|
|
7 |
app_file: app.py
|
8 |
pinned: true
|
9 |
license: apache-2.0
|
10 |
+
short_description: 'TabArena'
|
11 |
sdk_version: 4.44.0
|
12 |
---
|
13 |
|
14 |
+
|
15 |
+
## How to use
|
16 |
+
|
17 |
+
```bash
|
18 |
+
git clone https://huggingface.co/spaces/Tabrepo/TabArena-WIP
|
19 |
+
cd TabArena-WIP
|
20 |
+
uv sync
|
21 |
+
python src/generate_dummy_data.py
|
22 |
+
python src/app.py
|
23 |
+
```
|
24 |
+
|
25 |
## Ethical Considerations
|
26 |
|
27 |
This release is for research purposes only in support of an academic paper. Our models, datasets, and code are not specifically designed or evaluated for all downstream purposes. We strongly recommend users evaluate and address potential concerns related to accuracy, safety, and fairness before deploying this model. We encourage users to consider the common limitations of AI, comply with applicable laws, and leverage best practices when selecting use cases, particularly for high-risk scenarios where errors or misuse could significantly impact people’s lives, rights, or safety. For further guidance on use cases, refer to our AUP and AI AUP.
|
results/AutoGluon (best)/all_results.csv
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
dataset,model,eval_metrics/raw-error,eval_metrics/fit-time-per-1K-rows,eval_metrics/inference-time-per-1K-rows,problem_type,num_features
|
2 |
-
airline,AutoGluon (best),0.
|
3 |
-
electricity,AutoGluon (best),0.
|
4 |
-
solar-energy,AutoGluon (best),0.
|
5 |
-
traffic,AutoGluon (best),0.
|
6 |
-
volcano,AutoGluon (best),0.
|
|
|
1 |
dataset,model,eval_metrics/raw-error,eval_metrics/fit-time-per-1K-rows,eval_metrics/inference-time-per-1K-rows,problem_type,num_features
|
2 |
+
airline,AutoGluon (best),0.33278875990530477,19,93,Regression,12
|
3 |
+
electricity,AutoGluon (best),0.6751135091880147,57,68,Classification,2
|
4 |
+
solar-energy,AutoGluon (best),0.9026881234881459,4,89,Multi-classification,3
|
5 |
+
traffic,AutoGluon (best),0.4872007977446803,74,80,Multi-classification,12
|
6 |
+
volcano,AutoGluon (best),0.8748245677494482,46,19,Regression,12
|
results/CatBoost/all_results.csv
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
dataset,model,eval_metrics/raw-error,eval_metrics/fit-time-per-1K-rows,eval_metrics/inference-time-per-1K-rows,problem_type,num_features
|
2 |
-
airline,CatBoost,0.
|
3 |
-
electricity,CatBoost,0.
|
4 |
-
solar-energy,CatBoost,0.
|
5 |
-
traffic,CatBoost,0.
|
6 |
-
volcano,CatBoost,0.
|
|
|
1 |
dataset,model,eval_metrics/raw-error,eval_metrics/fit-time-per-1K-rows,eval_metrics/inference-time-per-1K-rows,problem_type,num_features
|
2 |
+
airline,CatBoost,0.06939533762437367,2,70,Regression,12
|
3 |
+
electricity,CatBoost,0.7354072567786561,58,47,Classification,2
|
4 |
+
solar-energy,CatBoost,0.015064718275699773,17,1,Multi-classification,3
|
5 |
+
traffic,CatBoost,0.2901760987967007,89,54,Multi-classification,12
|
6 |
+
volcano,CatBoost,0.971051007601159,20,96,Regression,12
|
results/KNN/all_results.csv
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
dataset,model,eval_metrics/raw-error,eval_metrics/fit-time-per-1K-rows,eval_metrics/inference-time-per-1K-rows,problem_type,num_features
|
2 |
-
airline,KNN,0.
|
3 |
-
electricity,KNN,0.
|
4 |
-
solar-energy,KNN,0.
|
5 |
-
traffic,KNN,0.
|
6 |
-
volcano,KNN,0.
|
|
|
1 |
dataset,model,eval_metrics/raw-error,eval_metrics/fit-time-per-1K-rows,eval_metrics/inference-time-per-1K-rows,problem_type,num_features
|
2 |
+
airline,KNN,0.2450715004955054,90,30,Regression,12
|
3 |
+
electricity,KNN,0.6448332561813636,38,37,Classification,2
|
4 |
+
solar-energy,KNN,0.3130873498151765,4,70,Multi-classification,3
|
5 |
+
traffic,KNN,0.6628566015105207,73,87,Multi-classification,12
|
6 |
+
volcano,KNN,0.7267416017519258,47,47,Regression,12
|
results/TabPFN-v2/all_results.csv
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
dataset,model,eval_metrics/raw-error,eval_metrics/fit-time-per-1K-rows,eval_metrics/inference-time-per-1K-rows,problem_type,num_features
|
2 |
-
airline,TabPFN-v2,0.
|
3 |
-
electricity,TabPFN-v2,0.
|
4 |
-
solar-energy,TabPFN-v2,0.
|
5 |
-
traffic,TabPFN-v2,0.
|
6 |
-
volcano,TabPFN-v2,0.
|
|
|
1 |
dataset,model,eval_metrics/raw-error,eval_metrics/fit-time-per-1K-rows,eval_metrics/inference-time-per-1K-rows,problem_type,num_features
|
2 |
+
airline,TabPFN-v2,0.10682355908390428,2,57,Regression,12
|
3 |
+
electricity,TabPFN-v2,0.5147268461160237,2,63,Classification,2
|
4 |
+
solar-energy,TabPFN-v2,0.2457652995593208,95,65,Multi-classification,3
|
5 |
+
traffic,TabPFN-v2,0.3583947823578476,91,6,Multi-classification,12
|
6 |
+
volcano,TabPFN-v2,0.0938829837958044,83,75,Regression,12
|
results/TabPFN/all_results.csv
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
dataset,model,eval_metrics/raw-error,eval_metrics/fit-time-per-1K-rows,eval_metrics/inference-time-per-1K-rows,problem_type,num_features
|
2 |
-
airline,TabPFN,0.
|
3 |
-
electricity,TabPFN,0.
|
4 |
-
solar-energy,TabPFN,0.
|
5 |
-
traffic,TabPFN,0.
|
6 |
-
volcano,TabPFN,0.
|
|
|
1 |
dataset,model,eval_metrics/raw-error,eval_metrics/fit-time-per-1K-rows,eval_metrics/inference-time-per-1K-rows,problem_type,num_features
|
2 |
+
airline,TabPFN,0.8444086025040755,6,85,Regression,12
|
3 |
+
electricity,TabPFN,0.9383639625691997,67,80,Classification,2
|
4 |
+
solar-energy,TabPFN,0.8584964430874119,97,89,Multi-classification,3
|
5 |
+
traffic,TabPFN,0.7204178131481314,54,88,Multi-classification,12
|
6 |
+
volcano,TabPFN,0.9048596469110622,23,91,Regression,12
|
src/generate_dummy_data.py
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from dataclasses import dataclass
|
2 |
+
import json
|
3 |
+
from pathlib import Path
|
4 |
+
import pandas as pd
|
5 |
+
import numpy as np
|
6 |
+
from src.constants import MethodTypes, ProblemTypes, DatasetInfo, MetricNames
|
7 |
+
|
8 |
+
np.random.seed(0)
|
9 |
+
|
10 |
+
@dataclass
|
11 |
+
class DatasetInfoRow:
|
12 |
+
name: str
|
13 |
+
problem_type: str
|
14 |
+
num_rows: int
|
15 |
+
num_features: int
|
16 |
+
|
17 |
+
def generate_dummy_data(method: str, model_type: str, datasets: list[DatasetInfoRow]):
|
18 |
+
# Create a sample DataFrame with schema
|
19 |
+
# "dataset,model,eval_metrics/normalized-error,eval_metrics/rank,eval_metrics/ELO,eval_metrics/fit_time_per_1K_rows,eval_metrics/inference_time_per_1K_rows,domain,num_variates"
|
20 |
+
|
21 |
+
rows = []
|
22 |
+
for dataset in datasets:
|
23 |
+
rows.append({
|
24 |
+
"dataset": dataset.name,
|
25 |
+
"model": method,
|
26 |
+
f"eval_metrics/{MetricNames.raw_error}": np.random.rand(),
|
27 |
+
# "eval_metrics/rank": np.random.randint(1, 100),
|
28 |
+
# "eval_metrics/ELO": np.random.randint(100, 1000),
|
29 |
+
f"eval_metrics/{MetricNames.fit_time_per_1K_rows}": np.random.randint(1, 100),
|
30 |
+
f"eval_metrics/{MetricNames.inference_time_per_1K_rows}": np.random.randint(1, 100),
|
31 |
+
ProblemTypes.col_name: dataset.problem_type,
|
32 |
+
DatasetInfo.num_features: dataset.num_features,
|
33 |
+
})
|
34 |
+
df = pd.DataFrame(rows)
|
35 |
+
result_path = Path(__file__).parent.parent / "results" / method
|
36 |
+
csv_path = result_path / f"all_results.csv"
|
37 |
+
csv_path.parent.mkdir(parents=True, exist_ok=True)
|
38 |
+
df.to_csv(csv_path, index=False)
|
39 |
+
|
40 |
+
with open(result_path / "config.json", "w") as f:
|
41 |
+
f.write(json.dumps(
|
42 |
+
{
|
43 |
+
"model": method,
|
44 |
+
MethodTypes.col_name: model_type,
|
45 |
+
}
|
46 |
+
))
|
47 |
+
|
48 |
+
return df
|
49 |
+
|
50 |
+
|
51 |
+
|
52 |
+
|
53 |
+
|
54 |
+
if __name__ == "__main__":
|
55 |
+
|
56 |
+
datasets = [
|
57 |
+
DatasetInfoRow(name="airline", problem_type=ProblemTypes.regression, num_features=12, num_rows=10),
|
58 |
+
DatasetInfoRow(name="electricity", problem_type=ProblemTypes.classification, num_features=2, num_rows=1020),
|
59 |
+
DatasetInfoRow(name="solar-energy", problem_type=ProblemTypes.multi_classification, num_features=3, num_rows=100),
|
60 |
+
DatasetInfoRow(name="traffic", problem_type=ProblemTypes.multi_classification, num_features=12, num_rows=10000),
|
61 |
+
DatasetInfoRow(name="volcano", problem_type=ProblemTypes.regression, num_features=12, num_rows=100),
|
62 |
+
]
|
63 |
+
|
64 |
+
methods = [
|
65 |
+
("AutoGluon (best)", MethodTypes.automl),
|
66 |
+
("CatBoost", MethodTypes.boosted_tree),
|
67 |
+
("TabPFN", MethodTypes.foundational),
|
68 |
+
("TabPFN-v2", MethodTypes.foundational),
|
69 |
+
("KNN", MethodTypes.other),
|
70 |
+
]
|
71 |
+
for method, method_type in methods:
|
72 |
+
generate_dummy_data(
|
73 |
+
method=method,
|
74 |
+
datasets=datasets,
|
75 |
+
model_type=method_type,
|
76 |
+
)
|
77 |
+
|
78 |
+
row_datasets = []
|
79 |
+
for dataset in datasets:
|
80 |
+
row_datasets.append({
|
81 |
+
# dataset,domain,frequency,num_variates
|
82 |
+
# M4 Yearly,Econ/Fin,A-DEC,1
|
83 |
+
DatasetInfo.col_name: dataset.name,
|
84 |
+
ProblemTypes.col_name: dataset.problem_type,
|
85 |
+
DatasetInfo.num_rows: dataset.num_rows,
|
86 |
+
DatasetInfo.num_features: dataset.num_features,
|
87 |
+
})
|
88 |
+
|
89 |
+
pd.DataFrame(row_datasets).to_csv(Path(__file__).parent.parent / "results" / "dataset_properties.csv", index=False)
|