Metadata-Version: 2.4
Name: neurotabular
Version: 2.1.0
Summary: Compact neural classification and regression for pandas DataFrames
Author: Luca Lullo
License-Expression: MIT
Project-URL: Documentation, https://github.com/lucalullo/neuro-tabular/blob/main/docs/USAGE.md
Project-URL: Homepage, https://github.com/lucalullo/neuro-tabular
Project-URL: Repository, https://github.com/lucalullo/neuro-tabular
Project-URL: Issues, https://github.com/lucalullo/neuro-tabular/issues
Project-URL: Changelog, https://github.com/lucalullo/neuro-tabular/blob/main/CHANGELOG.md
Keywords: machine-learning,deep-learning,tabular,pytorch,scikit-learn
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24
Requires-Dist: pandas>=2.0
Requires-Dist: torch>=2.0
Requires-Dist: joblib>=1.5; python_version == "3.12"
Requires-Dist: joblib!=1.5.0,!=1.5.1,>=1.4.2; python_version == "3.13"
Requires-Dist: joblib>=1.5.2; python_version == "3.14"
Requires-Dist: joblib>=1.6; python_version >= "3.15"
Requires-Dist: scikit-learn>=1.3
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: psutil>=6; extra == "dev"
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: ruff>=0.8; extra == "dev"
Requires-Dist: tomli>=2; extra == "dev"
Requires-Dist: twine>=5; extra == "dev"
Dynamic: license-file

# NeuroTabular

[![PyPI version](https://img.shields.io/pypi/v/neurotabular)](https://pypi.org/project/neurotabular/)

**Neural networks for tabular data, with automatic preprocessing and a scikit-learn-style API.**

## Why NeuroTabular?

NeuroTabular uses PyTorch to train neural models for binary classification, multiclass classification and single-output regression on pandas DataFrames. Numerical and categorical features, missing values, validation and early stopping are handled inside the estimator, with preprocessing learned only from training data.

## Project status

Version **2.1.0** changes the default regression stopping rule to eight validation checks, with at most 30 epochs, and improves extreme-value standardization and very small positive sample-weight handling. Classifier defaults are retained. Optional internal K-fold diagnostics and validation weights are available. No general classification gain is claimed. See the [release notes](https://github.com/lucalullo/neuro-tabular/blob/main/RELEASE_NOTES.md).

## Install

```bash
python -m pip install neurotabular
```

Python 3.11-3.14 is the recommended installation range. For the exact supported combinations and CPU/CUDA scope, see the support scope. See the [installation and compatibility guidance](https://github.com/lucalullo/neuro-tabular/blob/main/docs/policies/SUPPORT_SCOPE.md).

## Quick start

```python
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
from neurotabular import NeuroTabularClassifier

X, y = load_breast_cancer(return_X_y=True, as_frame=True)
X_train, X_test, y_train, y_test = train_test_split(
    X, y, test_size=0.2, random_state=42, stratify=y
)
model = NeuroTabularClassifier().fit(X_train, y_train)
print("Test accuracy:", model.score(X_test, y_test))
```

The classifier also supports multiclass targets. For regression, use `NeuroTabularRegressor` with a numerical target. See [usage and examples](https://github.com/lucalullo/neuro-tabular/blob/main/docs/USAGE.md). This example demonstrates the API, not the benchmark protocol.

## Highlights

- Binary and multiclass classification; single-output regression.
- Automatic mixed-DataFrame preprocessing and missing-value handling.
- scikit-learn-style estimators, cloning, pipelines and cross-validation.
- Validation, early stopping, batching and checkpoint restoration.
- Optional internal K-fold diagnostics (`cv=K`), with K+1 training passes (doubled for `full_data_refit=True`) and one final network.
- Sample weights, optional balanced class weights and explicit validation weights (`cv=None`).
- CPU, optional CUDA selection and pickle/joblib persistence.
- Categorical inputs: at most 128 categorical columns (not 128 total columns); extended support is not included until its performance qualification succeeds. See [limitations](#limitations) and the [qualification roadmap](https://github.com/lucalullo/neuro-tabular/blob/main/benchmarks/README.md#qualification-roadmap).

## Benchmarks

| Scope | Evidence |
|---|---|
| Competitive evidence | Six-family CPU pilot, three seeds; default and four-candidate tuning kept separate. NeuroTabular 2.0.0 is a version reference only, not part of the external-method overview. |
| Coverage | 181/288 final TEST endpoints measured (62.8%); 107 unavailable: 96 qualification exclusions, 6 cold replay stops and 5 measurement stops, all for RealMLP, TabM or FT-Transformer. |
| RealMLP / TabM / FT-Transformer | 0/36, 0/36 and 1/36 measured, respectively. No predictive ranking for incomplete methods. |
| Technical evidence | Only 2/36 dedicated inference A/A controls valid. [Measurement audit and follow-up](https://github.com/lucalullo/neuro-tabular/blob/main/benchmarks/competitive/MEASUREMENT_SCOPE.md#inference-timing-control-audit). |
| Reproduction | Frozen executable protocol; exact environment, source and wheel prerequisites apply. |

The [benchmark overview](https://github.com/lucalullo/neuro-tabular/blob/main/benchmarks/README.md) links predictive quality, computational costs, complete figures, methodology, failures and numerical data. Default and tuned results, historical results and technical timing controls must be interpreted separately.

**Selected measured advantages (default settings, median of three seeds)**

| Dataset / metric | NeuroTabular | XGBoost | LightGBM | CatBoost | Evidence |
|---|---:|---:|---:|---:|---|
| Bank Marketing / NLL (lower is better) | **0.666704** | 0.784755 | 0.719467 | 0.717406 | [Paired NLL figure](https://github.com/lucalullo/neuro-tabular/blob/main/benchmarks/competitive/results/intervals/default-binary-primary-paired-intervals.png) |
| Climate / balanced accuracy (higher is better) | **77.67%** | 66.65% | 70.53% | 60.71% | [Balanced accuracy figure](https://github.com/lucalullo/neuro-tabular/blob/main/benchmarks/competitive/results/default-binary-balanced_accuracy-training_total_cpu_s.png) |

Bank Marketing's paired NLL intervals favor NeuroTabular against these three trees in all three default seeds (conditional, unadjusted intervals). Climate is a single held-out study: its balanced accuracy advantage is descriptive, without an independent-study interval; CatBoost has lower NLL there. Neither observation establishes general classification superiority or an improvement over the previous release. See [coverage and follow-up](https://github.com/lucalullo/neuro-tabular/blob/main/benchmarks/README.md#scope-and-coverage) and [when to choose NeuroTabular](https://github.com/lucalullo/neuro-tabular/blob/main/benchmarks/competitive/WHEN_TO_CHOOSE.md).

## When to use it

Use it for neural learning on mixed pandas data with a familiar estimator interface, or where the measured metric-specific advantages above match your needs. The [selection guide](https://github.com/lucalullo/neuro-tabular/blob/main/benchmarks/competitive/WHEN_TO_CHOOSE.md) explains the evidence, computational trade-offs and when another model is preferable.

## When to consider alternatives

Consider alternatives for multi-output learning, other neural architectures or advanced AutoML. The measured trees perform substantially better on Anneal and Glass. RealMLP and TabM have no admitted real-data results and FT-Transformer coverage is partial. Their absence is a coverage limitation, not a predictive loss; see the [benchmark follow-up](https://github.com/lucalullo/neuro-tabular/blob/main/benchmarks/README.md#qualification-roadmap).

## Limitations

- Requires a pandas DataFrame; multilabel and multi-output learning are unsupported.
- No universal accuracy, latency, throughput or RAM advantage is established.
- Physical NVIDIA GPU validation and formal end-to-end no-network certification are incomplete.
- At most 128 categorical columns; high cardinality may substantially increase memory. Extended support is not yet performance-qualified and is excluded from 2.1.0. See the [qualification roadmap](https://github.com/lucalullo/neuro-tabular/blob/main/benchmarks/README.md#qualification-roadmap).
- Concurrent `fit()` calls in one process are not guaranteed thread-safe.

## Documentation

- [Usage and examples](https://github.com/lucalullo/neuro-tabular/blob/main/docs/USAGE.md)
- [API reference](https://github.com/lucalullo/neuro-tabular/blob/main/docs/API.md)
- [Support scope](https://github.com/lucalullo/neuro-tabular/blob/main/docs/policies/SUPPORT_SCOPE.md)
- [API stability and maintenance policies](https://github.com/lucalullo/neuro-tabular/blob/main/docs/policies/README.md)
- [Internal K-fold diagnostics](https://github.com/lucalullo/neuro-tabular/blob/main/docs/INTERNAL_CV.md)
- [Benchmarks](https://github.com/lucalullo/neuro-tabular/blob/main/benchmarks/README.md)
- [When to choose NeuroTabular](https://github.com/lucalullo/neuro-tabular/blob/main/benchmarks/competitive/WHEN_TO_CHOOSE.md)
- [Historical evidence](https://github.com/lucalullo/neuro-tabular/blob/main/docs/BENCHMARK_0_3.md)
- [Performance](https://github.com/lucalullo/neuro-tabular/blob/main/docs/PERFORMANCE_0_3_1.md)
- [Release notes](https://github.com/lucalullo/neuro-tabular/blob/main/RELEASE_NOTES.md)
- [Changelog](https://github.com/lucalullo/neuro-tabular/blob/main/CHANGELOG.md)

## License

NeuroTabular is created by Luca Lullo. Its original components are released under the [MIT License](https://github.com/lucalullo/neuro-tabular/blob/main/LICENSE), Copyright (c) 2026 Luca Lullo. Third-party components retain their licenses; see the [third-party notices](https://github.com/lucalullo/neuro-tabular/blob/main/THIRD_PARTY_NOTICES.md).

## Author

Created by [Luca Lullo](https://github.com/lucalullo).
