Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds BaselineImputer and Reworks MarginalImputer #262

Merged
merged 10 commits into from
Oct 30, 2024
Merged

Conversation

mmschlk
Copy link
Owner

@mmschlk mmschlk commented Oct 29, 2024

TLDR: This PR closes #261 and this PR closes #107.

This pull request introduces several updates to the shapiq package, focusing on the addition of a new BaselineImputer class and various improvements to existing imputer classes.

New Features:

  • Added BaselineImputer class for imputing missing values using predefined baseline values or calculated mean/mode from background data. (shapiq/games/imputer/baseline_imputer.py)

Updates to Existing Features:

  • Removed the sample_replacements parameter from MarginalImputer and added a joint_marginal_distribution parameter. A DeprecationWarning for sample_replacements has been added. (shapiq/games/imputer/marginal_imputer.py)
  • Enhanced the Imputer base class by adding new attributes (n_features, data, model, sample_size) and methods (fit, x property) to improve flexibility and functionality. (shapiq/games/imputer/base.py)

Codebase Organization:

  • Updated imports and __all__ lists to include the new BaselineImputer class. (shapiq/__init__.py, shapiq/games/__init__.py, shapiq/games/imputer/__init__.py)

Documentation:

  • Updated CHANGELOG.md to reflect the new features and changes, including the addition of BaselineImputer and the removal of the sample_replacements parameter from MarginalImputer.

Minor Improvements:

  • Added a TODO comment in shapiq/games/base.py to consider removing a potentially runtime-increasing check. (shapiq/games/base.py)

@mmschlk mmschlk added the imputer All issues linked to imputers label Oct 29, 2024
@mmschlk mmschlk linked an issue Oct 29, 2024 that may be closed by this pull request
@mmschlk mmschlk added this to the v1.1.0 milestone Oct 29, 2024
@mmschlk mmschlk requested review from Advueu963 and removed request for Advueu963 October 29, 2024 17:30
@mmschlk mmschlk requested a review from Advueu963 October 29, 2024 17:51
Copy link
Collaborator

@Advueu963 Advueu963 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented on some parameters, where the docs are missing.

Nice Code and great work!

@mmschlk mmschlk merged commit 320518a into main Oct 30, 2024
8 checks passed
@mmschlk mmschlk deleted the 107-add-baseimputer branch October 30, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imputer All issues linked to imputers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add joint marginal imputation method for marginal imputer Add BaseImputer
2 participants