Skip to main content

FPBoost: Fully Parametric Gradient Boosting for Survival Analysis

License Banner Black Banner

FPBoost is a Python library for survival analysis that introduces a novel algorithm for estimating hazard functions. Built upon the gradient boosting framework, it uses a composition of fully parametric hazard functions to model time-to-event data. FPBoost directly optimizes the survival likelihood via gradient boosting, providing improved risk estimation according to concordance and calibration metrics. FPBoost is fully compatible with scikit-survival for seamless integration into existing workflows.

📦 Installation

From Source

To install the latest version of FPBoost from source, clone the repository and follow these steps:

  1. Clone the repository:
    git clone https://github.com/archettialberto/fpboost.git
    cd fpboost
    
  2. Create and Activate Conda Environment
    conda env create -f environment.yaml
    conda activate fpboost
    
  3. Install Dependencies with Poetry
    poetry install
    

🚀 Quick Start

Here's a simple example of how to use FPBoost:

from fpboost.models import FPBoost
from sksurv.datasets import load_breast_cancer
from sksurv.preprocessing import OneHotEncoder
from sklearn.model_selection import train_test_split

# Load and preprocess the dataset
data_x, data_y = load_breast_cancer()
encoder = OneHotEncoder()
X, y = encoder.fit_transform(data_x).to_numpy(), data_y

# Split into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)

# Initialize the model
model = FPBoost(
    n_estimators=100,
    learning_rate=0.1,
    max_depth=3,
    random_state=42
)

# Fit the model
model.fit(X_train, y_train)

# Predict survival probabilities
surv_probs = model.predict_survival_function(X_test)

# Evaluate the model
from sksurv.metrics import concordance_index_censored
c_index = concordance_index_censored(
    y_test['e.tdm'],  # event indicator
    y_test['t.tdm'],  # time to event
    model.predict(X_test)
)

print("Concordance Index:", c_index[0])

📖 Documentation

For detailed usage instructions and API reference, please refer to the FPBoost Documentation.

📚 How to Cite

If you use FPBoost in your research, please cite our paper:

@article{archetti2024fpboost,
  title        = {FPBoost: Fully Parametric Gradient Boosting for Survival Analysis},
  author       = {Alberto Archetti and Eugenio Lomurno and Diego Piccinotti and Matteo Matteucci},
  journal      = {arXiv preprint arXiv:2409.13363},
  year         = {2024},
  url          = {https://arxiv.org/abs/2409.13363}
}

Metadata

Release files for fpboost 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fpboost 0.1.0
File Size Uploaded Provenance
fpboost-0.1.0.tar.gz 7.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fpboost 0.1.0
File Interpreter ABI Platform
fpboost-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.6 kB

Release files / fpboost-0.1.0.tar.gz

Download URL fpboost-0.1.0.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
871704a8464a02e14daebfc20cfc109a7db8eb2bfaa909ae317f15d66a9221cd
BLAKE2b-256 checksum
How to use checksums
1856666d853df08afdff0d1f42bcab63d0fcb39cddedaf8ccb43d236369f64bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / fpboost-0.1.0-py3-none-any.whl

Download URL fpboost-0.1.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
efa622406e95c747fe0d27629631db997ed2d6fdc78019bb04c1363e41160a2d
BLAKE2b-256 checksum
How to use checksums
cd798547ed81ea6c9aff5144eeb404ae4e2c1971aa8f42d5b1a18a0dc6cd2cb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Security for fpboost 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page