Update README.md
Browse files
README.md
CHANGED
@@ -16,7 +16,7 @@ tags:
|
|
16 |
|
17 |
## Description
|
18 |
|
19 |
-
Implementation of the deep learning model with the inference pipeline described in the paper "ConTextTab: A Semantics-Aware Tabular In-Context Learner".
|
20 |
|
21 |

|
22 |
## Abstract
|
@@ -25,6 +25,8 @@ Tabular in-context learning (ICL) has recently achieved state-of-the-art (SOTA)
|
|
25 |
|
26 |
## Requirements
|
27 |
|
|
|
|
|
28 |
The requirements are detailed in the `requirements.txt` file for Python 3.11 version.
|
29 |
|
30 |
Local development installation:
|
@@ -53,7 +55,7 @@ X, y = load_breast_cancer(return_X_y=True)
|
|
53 |
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5, random_state=42)
|
54 |
|
55 |
# Initialize a classifier
|
56 |
-
clf = ConTextTabClassifier(bagging=1, max_context_size=2048)
|
57 |
|
58 |
clf.fit(X_train, y_train)
|
59 |
|
@@ -82,7 +84,7 @@ y = df.target.astype(float)
|
|
82 |
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5, random_state=42)
|
83 |
|
84 |
# Initialize the regressor
|
85 |
-
regressor = ConTextTabRegressor(bagging=1, max_context_size=2048)
|
86 |
|
87 |
regressor.fit(X_train, y_train)
|
88 |
|
@@ -93,6 +95,20 @@ r2 = r2_score(y_test, predictions)
|
|
93 |
print("R² Score:", r2)
|
94 |
```
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
## Known Issues
|
97 |
No known issues
|
98 |
|
|
|
16 |
|
17 |
## Description
|
18 |
|
19 |
+
Implementation of the deep learning model with the inference pipeline described in the paper ["ConTextTab: A Semantics-Aware Tabular In-Context Learner"](https://arxiv.org/abs/2506.10707).
|
20 |
|
21 |

|
22 |
## Abstract
|
|
|
25 |
|
26 |
## Requirements
|
27 |
|
28 |
+
This project uses model checkpoints available on https://huggingface.co/sap-ai-research/contexttab that are automatically downloaded when running the model.
|
29 |
+
|
30 |
The requirements are detailed in the `requirements.txt` file for Python 3.11 version.
|
31 |
|
32 |
Local development installation:
|
|
|
55 |
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5, random_state=42)
|
56 |
|
57 |
# Initialize a classifier
|
58 |
+
clf = ConTextTabClassifier(bagging=1, max_context_size=2048, test_chunk_size=1000)
|
59 |
|
60 |
clf.fit(X_train, y_train)
|
61 |
|
|
|
84 |
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5, random_state=42)
|
85 |
|
86 |
# Initialize the regressor
|
87 |
+
regressor = ConTextTabRegressor(bagging=1, max_context_size=2048, test_chunk_size=1000)
|
88 |
|
89 |
regressor.fit(X_train, y_train)
|
90 |
|
|
|
95 |
print("R² Score:", r2)
|
96 |
```
|
97 |
|
98 |
+
## Citations
|
99 |
+
|
100 |
+
If you use this model in your research or want to refer to our work, please cite:
|
101 |
+
```
|
102 |
+
@inproceedings{
|
103 |
+
spinaci2025contexttab,
|
104 |
+
title={ConTextTab: A Semantics-Aware Tabular In-Context Learner},
|
105 |
+
author={Marco Spinaci and Marek Polewczyk and Maximilian Schambach and Sam Thelin},
|
106 |
+
booktitle={1st ICML Workshop on Foundation Models for Structured Data},
|
107 |
+
year={2025},
|
108 |
+
url={https://openreview.net/forum?id=MmKuX9ZvM3}
|
109 |
+
}
|
110 |
+
```
|
111 |
+
|
112 |
## Known Issues
|
113 |
No known issues
|
114 |
|