Metadata-Version: 2.4
Name: tabicl-survival
Version: 0.1.0
Summary: TabICL-Survival: A Tabular Foundation Model for Survival In-Context Learning
Project-URL: Documentation, https://github.com/taltstidl/tabicl-survival#readme
Project-URL: Issues, https://github.com/taltstidl/tabicl-survival/issues
Project-URL: Source, https://github.com/taltstidl/tabicl-survival
Author: Jingang Qu, David Holzmüller, Marine Le Morvan, Gaël Varoquaux, Thomas Altstidl
License: BSD 3-Clause License
        
        Copyright (c) 2025, Soda team @ Inria
        Copyright (c) 2026, Thomas Altstidl
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Keywords: TabICL,foundation model,in-context learning,survival analysis,tabular data
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: <3.13,>=3.9
Requires-Dist: einops>=0.7
Requires-Dist: huggingface-hub
Requires-Dist: joblib
Requires-Dist: numpy
Requires-Dist: psutil
Requires-Dist: scikit-learn<1.7,>=1.3.0
Requires-Dist: scikit-survival
Requires-Dist: scipy
Requires-Dist: torch<3,>=2.2
Requires-Dist: tqdm>=4.64.0
Requires-Dist: transformers
Requires-Dist: wandb
Requires-Dist: xgboost
Description-Content-Type: text/markdown

# TabICL-Survival: A Tabular Foundation Model for Survival In-Context Learning

This repo is an adaptation of ["TabICL: A Tabular Foundation Model for In-Context Learning on Large Data"](https://arxiv.org/pdf/2502.05564) for survival analysis. It is trained using Cox negative log likelihood.

## Installation

Option 1: Installing `tabicl-survival` from PyPI

```bash
pip install tabicl-survival
```

Option 2: Installing `tabicl-survival` from the local clone

```bash
cd tabicl
pip install -e .
```

Option 3: Installing `tabicl-survival` directly from the git remote

```bash
pip install git+https://github.com/taltstidl/tabicl-survival.git
```

## Basic Usage

```python
from tabicl import TabICLSurver

surv = TabICLSurver()
surv.fit(X_train, y_train)  # this is cheap
surv.predict(X_test)  # in-context learning happens here
```

The code above will automatically download the pre-trained checkpoint (~325MB) from Hugging Face Hub on first use and choose a GPU if available. It supports datasets with up to 1,024 samples and 100 features at the moment.

## Contributors

For the original TabICL implementation
- [Jingang Qu](https://github.com/jingangQu)
- [David Holzmüller](https://github.com/dholzmueller)
- [Marine Le Morvan](https://github.com/marineLM)

For the adapted TabICL-Surival implementation
- [Thomas Altstidl](https://github.com/taltstidl)
