Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Releases: crillab/pyxai

PyXAI v2 — Stable Release

22 May 08:04
@szczepanskiNicolas szczepanskiNicolas

Choose a tag to compare

Version 2.0.0

21 May 12:10
@szczepanskiNicolas szczepanskiNicolas

Choose a tag to compare

API Reference documentation

This website now includes a dedicated API Reference section, generated from the PyXAI source docstrings. It covers the main modules and classes:


Docstrings fully rewritten

All public docstrings have been rewritten with a consistent format (Parameters, Returns, Raises, Notes, Examples sections).

Updated API signatures

Several method signatures and module-level names were renamed as part of a broader refactoring to support non-tabular datasets (images, time series, etc.) stored in JSON format via the NonTabularPreprocessor class.

Imports

The Explainer entry point has been renamed Explaining:

Old New
from pyxai import Learning, Explainer from pyxai import Learning, Explaining
Explainer.initialize(model, instance) Explaining.initialize(model, instance)

Learner.__init__()

Old parameter New parameter
learner_type problem_type

Learner.evaluate()

Old parameter New parameter
method splitting_method
output model_type
**learner_options model_parameters={}
test_size, n_models (positional) moved into splitting_parameters={}

Hyperparameters passed via model_parameters now use the same parameter names as the underlying ML library (scikit-learn, XGBoost, LightGBM). For example, model_parameters={'n_estimators': 100, 'max_depth': 4} maps directly to scikit-learn's RandomForestClassifier(n_estimators=100, max_depth=4). There is no longer any PyXAI-specific naming for model hyperparameters.

Learner.get_instances()

Old parameter New parameter
correct is_correct

Constants in the Learning module

Old constant New constant
Learning.TRAINING Learning.TRAIN
Learning.MIXED Learning.TRAIN_IN_PRIORITY

Save and load

Old API New API
Learning.save(model, directory) Learning.ModelIO.save(model, directory)
Learning.load(directory) Learning.ModelIO.load(directory)

XGBoost compatibility

PyXAI is now compatible with the latest versions of XGBoost (previously limited to version 1.7.3).

Recent XGBoost releases changed how the base_score parameter is stored internally. The base_score is the initial bias added to all predictions before the trees are applied. Its handling differs by task:

  • Binary classification — the base score is logit-transformed before being added to the sum of tree outputs.
  • Multi-class classification — the base score is added to each class score before the softmax normalisation.
  • Regression — the base score is a direct additive offset.

PyXAI now correctly extracts and applies base_score in all three cases, both for prediction and for computing formal explanations via the C++ backend. This fixes incorrect predictions and explanations that occurred with XGBoost versions newer than 1.7.3.


Refactoring and internal improvements

ModelIO utility class — save, load, and import operations have been extracted from the Learner class into a dedicated ModelIO static class. This makes the API cleaner and the import workflow consistent across all supported libraries (Scikit-learn, XGBoost, LightGBM):

from pyxai import Learning
learner, model = Learning.import_models(saved_model)

Preprocessors split into two classes:

  • TabularPreprocessor — for standard CSV / DataFrame datasets.
  • NonTabularPreprocessor — for non-tabular datasets (e.g. image datasets loaded from directories).

Private method naming — internal methods in data structure classes (BoostedTrees, DecisionTree, RandomForest) have been prefixed with _ to clearly distinguish the public API from implementation details.

Bug fixes:

  • Fixed incorrect handling of discrete feature values in LightGBM models.
  • Fixed XGBoost prediction errors introduced by the base_score API change.
  • Fixed a memory issue in the Builder where learner_information was incorrectly shared between instances.
Loading

v1.1.1

20 Jan 12:31
@audemard audemard

Choose a tag to compare

v1.1.1
Loading

V1.0.14

13 Feb 15:40
@szczepanskiNicolas szczepanskiNicolas
c173a9b
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

PyXAI is available on MacOS via pypi: https://pypi.org/project/pyxai/1.0.14/

  • Supports ARM architecture on Linux and MacOS
  • Some bugs have been resolved

pip install -U pyxai to update or install.

Loading

v1.0.11

05 Dec 11:08
@szczepanskiNicolas szczepanskiNicolas

Choose a tag to compare

To fix the issue #10.

Loading

v1.0.10

28 Nov 16:08
@szczepanskiNicolas szczepanskiNicolas

Choose a tag to compare

  • To resolve compatibility issues with PyQt6, since V1.0.10, PyXAI’s Graphical Interface is independent and no longer mandatory.
  • Remove the PyQt6 dependency and implementation of new methods to display explanations without PyQt6:
    • show_in_notebook()
    • show_on_screen()
    • get_PILImage()
    • save_png()
    • resize_PILimage()
    • More information on a new page of the documentation
  • Contrastive for BT classification (binary classes)(documentation in progress)
  • Change function name in explainer (unset_specific_features -> unset_excluded_features)
  • New procedure installation (github and pypi)
  • New visualization for time series
    image
    More information at the end of this page.
  • Compilation error resolution

The documentation will be updated tomorrow.

Loading

v1.0.9

17 Nov 17:16
@szczepanskiNicolas szczepanskiNicolas

Choose a tag to compare

New metrics (documentation page is in progress)

For binary classification:

  • accuracy
  • precision
  • recall
  • f1_score
  • specificity
  • tp, tn, fp, fn

For multiclass classification:

  • micro_averaging_accuracy
  • micro_averaging_precision
  • micro_averaging_recall
  • macro_averaging_accuracy
  • macro_averaging_precision
  • macro_averaging_recall

For regression:

  • mean_squared_error
  • root_mean_squared_error
  • mean_absolute_error

Examples:

labels = [1,1,1,1,1,0,0,0,0,0]
predictions = [1,1,1,1,1,0,0,0,0,0]
metrics = Tools.Metric.compute_metrics_binary_classification(labels, predictions)
learner = Learning.Scikitlearn("tests/dermatology.csv", learner_type=Learning.CLASSIFICATION)
models = learner.evaluate(method=Learning.K_FOLDS, output=Learning.DT, test_size=0.2)
for id, models in enumerate(models):
 metrics = learner.get_details()[id]["metrics"]
Loading

v1.0.7

12 Oct 13:17
@szczepanskiNicolas szczepanskiNicolas

Choose a tag to compare

Build and Tests with CI

Loading

V1.0.0

13 Sep 09:24
@audemard audemard

Choose a tag to compare

This is the release 1.0.0 of PyXAI with new features:

Loading

V0.8.7

13 Sep 09:01
@audemard audemard
ed245f7
This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
GPG key ID: 4AEE18F83AFDEB23
Expired
Verified
Learn about vigilant mode.

Choose a tag to compare

This is the first release of PyXAI.

Loading

AltStyle によって変換されたページ (->オリジナル) /