Add possibility of using multiple models

Open
#467 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 10 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
jupyter-notebook, pandas, python

Research direction

Start by reading the SmartExplainer constructor and how it currently uses a single model. Then trace how the explainer is used to create apps and where conditions could select a model. Done means the constructor accepts multiple models and conditions, with tests covering model selection for the proposed use case.

Written by the indexing model from the issue text.

Description

Description of Problem:
Sometimes multiple models are trained
(on the same dataset, based on some criteria/conditions (e.g. dataset is too big to train a single model, or there is too much variability in the data). Currently, the SmartExplainer object accept a single model, meaning that multiple SmartExplainer objects must be created to address this problem and therefore multiple apps. Would this be a useful scenario of someone?

Overview of the Solution:
Add the possibility of passing a list of models instead of a single one to the SmartExplainer constructor and configure their usage based on a list of conditions.

Examples:
Something like this:

xpl = SmartExplainer(
    models=[model1, model2, model3],
    features_dict=features_dict,
    conditions=[df['avg'] >= 20, df['avg'] > (20 & df['avg'] <= 50), (df['avg'] > 50 & df['avg'] < 100)]
)

Blockers:

Definition of Done:

Dominant language
Jupyter Notebook
Stars
3.3k
Forks
390
Avg merge
7d 15h
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MAIF/shapash

All issues in MAIF/shapash

Similar issues

More Machine Learning issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.