Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rtichoke-0.1.27.tar.gz (214.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rtichoke-0.1.27-py3-none-any.whl (226.8 kB view details)

Uploaded Python 3

File details

Details for the file rtichoke-0.1.27.tar.gz.

File metadata

  • Download URL: rtichoke-0.1.27.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

Hashes for rtichoke-0.1.27.tar.gz
Algorithm Hash digest
SHA256 a317bb55df1fc532705578e376e2abc755c3b320d25313a9613f226f14df3385
MD5 910f305efa73c4d0e999419ac6fafe1e
BLAKE2b-256 5fb0a736b4badc513b5f5ca23cfa574c628cf82bff4fb54486f9729dc19fc7a1

See more details on using hashes here.

File details

Details for the file rtichoke-0.1.27-py3-none-any.whl.

File metadata

  • Download URL: rtichoke-0.1.27-py3-none-any.whl
  • Upload date:
  • Size: 226.8 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

Hashes for rtichoke-0.1.27-py3-none-any.whl
Algorithm Hash digest
SHA256 0d21a2a5a10095d65124005641137bc4678625289ddb8a376c5fe2ef23ef3391
MD5 e3cafdbed5b2d653a5af37af6369c64c
BLAKE2b-256 d661fad525e11f2645a462fcbfba4ba509a4ae7431a8c0e7d438cc3fc73e4ae9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page