Tabular Classification
Transformers
Safetensors
felatab
feature-extraction
fela
tabular
in-context-learning
prior-fitted-network
foundation-model
delta-rule
cpu
on-device
custom_code
Eval Results (legacy)
Instructions to use lowdown-labs/fela-tab with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lowdown-labs/fela-tab with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("lowdown-labs/fela-tab", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
v2: bagged config
Browse files
benchmark/tabarena/fela_ag_model.py
CHANGED
|
@@ -138,10 +138,21 @@ class FelaTabAGModel(AbstractModel):
|
|
| 138 |
)
|
| 139 |
n_classes = len(self.classes_) if hasattr(self, "classes_") else int(
|
| 140 |
self._y_support.max() + 1)
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
# guard against NaN/inf or degenerate rows: AutoGluon drops NaN-pred rows when
|
| 146 |
# scoring, which can leave a single class in y_true on small folds
|
| 147 |
proba = np.asarray(proba, dtype=np.float64)
|
|
@@ -152,7 +163,7 @@ class FelaTabAGModel(AbstractModel):
|
|
| 152 |
return self._convert_proba_to_unified_form(proba)
|
| 153 |
|
| 154 |
def _set_default_params(self) -> None:
|
| 155 |
-
for param, val in {"tier": "small", "device": "cpu", "regression_backend": "lgbm"}.items():
|
| 156 |
self._set_default_param_value(param, val)
|
| 157 |
|
| 158 |
def _get_default_auxiliary_params(self) -> dict:
|
|
@@ -170,6 +181,6 @@ class FelaTabAGModel(AbstractModel):
|
|
| 170 |
|
| 171 |
return ConfigGenerator(
|
| 172 |
model_cls=cls,
|
| 173 |
-
manual_configs=[{"tier": "small"}, {"tier": "big"}],
|
| 174 |
search_space={},
|
| 175 |
)
|
|
|
|
| 138 |
)
|
| 139 |
n_classes = len(self.classes_) if hasattr(self, "classes_") else int(
|
| 140 |
self._y_support.max() + 1)
|
| 141 |
+
# n_bag>1: permutation-bagged ensemble (row + column order) — measured +1.4 AUC
|
| 142 |
+
# on adult at n_bag=8 vs single pass. Costs n_bag x inference latency.
|
| 143 |
+
n_bag = self._get_model_params().get("n_bag", 0)
|
| 144 |
+
if n_bag and n_bag > 1:
|
| 145 |
+
from modeling import predict_bagged
|
| 146 |
+
|
| 147 |
+
proba = predict_bagged(
|
| 148 |
+
self._fela_model, self._X_support, self._y_support, X_np,
|
| 149 |
+
"classification", n_classes, SUPPORT_CAP, n_bag=int(n_bag),
|
| 150 |
+
)
|
| 151 |
+
else:
|
| 152 |
+
proba = predict(
|
| 153 |
+
self._fela_model, self._X_support, self._y_support, X_np,
|
| 154 |
+
task="classification", n_classes=n_classes, support_cap=SUPPORT_CAP,
|
| 155 |
+
)
|
| 156 |
# guard against NaN/inf or degenerate rows: AutoGluon drops NaN-pred rows when
|
| 157 |
# scoring, which can leave a single class in y_true on small folds
|
| 158 |
proba = np.asarray(proba, dtype=np.float64)
|
|
|
|
| 163 |
return self._convert_proba_to_unified_form(proba)
|
| 164 |
|
| 165 |
def _set_default_params(self) -> None:
|
| 166 |
+
for param, val in {"tier": "small", "device": "cpu", "regression_backend": "lgbm", "n_bag": 0}.items():
|
| 167 |
self._set_default_param_value(param, val)
|
| 168 |
|
| 169 |
def _get_default_auxiliary_params(self) -> dict:
|
|
|
|
| 181 |
|
| 182 |
return ConfigGenerator(
|
| 183 |
model_cls=cls,
|
| 184 |
+
manual_configs=[{"tier": "small"}, {"tier": "big"}, {"tier": "big", "n_bag": 8}],
|
| 185 |
search_space={},
|
| 186 |
)
|