interactive visualizations for performance of predictive models
Project description
rtichoke
rtichoke is a Python library for visualizing the performance of predictive models. It provides a flexible and intuitive way to create a variety of common evaluation plots, including:
- ROC Curves
- Precision-Recall Curves
- Gains and Lift Charts
- Decision Curves
The library is designed to be easy to use, while still offering a high degree of control over the final plots. For some reproducible examples please visit the rtichoke blog!
Installation
You can install rtichoke from PyPI:
pip install rtichoke
Getting Started
To use rtichoke, you'll need two main inputs:
probs: A dictionary containing your model's predicted probabilities.reals: A dictionary of the true binary outcomes.
Here's a quick example of how to create a ROC curve for a single model:
import numpy as np
import rtichoke as rk
# Sample data for a model. Note that the probabilities for the
# positive class (1) are generally higher than for the negative class (0).
probs = {'Model A': np.array([0.1, 0.9, 0.4, 0.8, 0.3, 0.7, 0.2, 0.6])}
reals = {'Population': np.array([0, 1, 0, 1, 0, 1, 0, 1])}
# Create the ROC curve
fig = rk.create_roc_curve(
probs=probs,
reals=reals
)
fig.show()
Key Features
- Simple API: Create complex visualizations with just a few lines of code.
- Time-to-Event Analysis: Native support for models with time-dependent outcomes, including censoring and competing risks.
- Interactive Plots: Built on Plotly for interactive, publication-quality figures.
- Flexible Data Handling: Works seamlessly with NumPy and Polars.
Documentation
For a complete guide to the library, including a "Getting Started" tutorial and a full API reference, please see the official documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rtichoke-0.1.28.tar.gz.
File metadata
- Download URL: rtichoke-0.1.28.tar.gz
- Upload date:
- Size: 214.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
644dde4e51c2d7945e5cbebda9913b8ecae7750fab34a1ff46851299e8d380d8
|
|
| MD5 |
661a5d141d74489d2f0354b93614108e
|
|
| BLAKE2b-256 |
da7b4619a18ba61b64a7cd1d7989295f051f20501b64ae970751ee7b28dfa063
|
File details
Details for the file rtichoke-0.1.28-py3-none-any.whl.
File metadata
- Download URL: rtichoke-0.1.28-py3-none-any.whl
- Upload date:
- Size: 226.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea997bc8fdfbd8575a686fc2b5b9001f6ac2157b7e2cf3d49ef3d357b2f6ddb1
|
|
| MD5 |
1668ee7dc6fe5ecd2fdaa16115680fcf
|
|
| BLAKE2b-256 |
9363346bc74b88bcd46dd008e2bec6825a8a7de90e475a8e5e00ba5577182acb
|