OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Imodels

A Python library of concise, transparent predictive models that follow a scikit-learn-compatible workflow.

Independent OpenViST project profile, based on linked sources.

Imodels — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it at the modeling stage when interpretability, concise decision rules or visible tree structure are important alongside predictive performance.

Who it is for

  • Python data scientists using scikit-learn
  • Teams modeling structured or tabular data
  • Practitioners who need inspectable rules or tree decisions
  • Researchers and developers experimenting with interpretable machine learning

Documented uses

  • Fit interpretable classifiers and regressors
  • Generate predictions and predicted probabilities
  • Inspect rule sets and tree decision structures
  • Compare transparent models with more complex black-box approaches
Before you choose

Requirements & limits

The repository is public and identified with an MIT license. The documented installation method is `pip install imodels`.

  • The scikit-learn-compatible interface can fit workflows already organized around fit, predict and predict_proba.
  • The catalogue spans rule sets, rule lists and tree models rather than a single interpretability technique.
  • The printed tree example exposes feature thresholds and leaf values directly.
  • Some Bayesian rule-based models are documented as slow.
  • The repository lists Python 3.10–3.13 and NumPy >=2.0 in its installation badges.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install Imodels and fit a documented tree model

Set up Imodels and train the documented HSTreeClassifierCV example on a sample dataset.

Before you start

  • Python environment
  • Imodels installed with pip
  • The sample dataset referenced by the example
  • scikit-learn

Steps

  1. Install the package with the command below.

    Documented command
    pip install imodels
  2. Import get_clean_dataset and HSTreeClassifierCV from imodels, plus train_test_split from scikit-learn.

  3. Load the csi_pecarn_pred dataset and split it into training and test sets.

  4. Initialize HSTreeClassifierCV(max_leaf_nodes=4), fit it with the training data and feature names, then call predict and predict_proba on the test data.

  5. Print the fitted model to inspect its threshold-based tree representation.

Expected outcome

A fitted interpretable tree model, discrete predictions, predicted probabilities and a readable printed tree.

Guide limitations

  • The documented example uses a sample clinical dataset and a specific tree model; it does not document deployment or production validation.
  • The package documentation notes that some Bayesian models are slow.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
30 September 2026
Original website title
csinva/imodels · Official homepage title · retained in its source language