Skip to content

Feature sklearn transformer #396

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

Closed
wants to merge 20 commits into from
Closed

Conversation

stewarthe6
Copy link
Collaborator

@stewarthe6 stewarthe6 commented Mar 20, 2025

This implements two transformers from sklearn, RobustScaler and PowerTransformer, that can be used for feature transformations instead of the default NormalizationTransformerMissingData.

A SimpleImputer is used before the RobustScaler and PowerTransformer to fill in any nan values. Default method is 'mean', but can be changed to 'most_frequent' and 'median'. The keep_empty_features parameter is always set to true, and those features will be filled with 0s.

@stewarthe6 stewarthe6 changed the base branch from master to 1.7.0 March 20, 2025 21:49
Copy link

codecov bot commented Mar 20, 2025

Codecov Report

Attention: Patch coverage is 72.15190% with 22 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
atomsci/ddm/pipeline/featurization.py 39.13% 14 Missing ⚠️
atomsci/ddm/utils/model_file_reader.py 50.00% 8 Missing ⚠️
@@            Coverage Diff             @@
##            1.7.0     #396      +/-   ##
==========================================
+ Coverage   34.54%   35.01%   +0.46%     
==========================================
  Files          50       50              
  Lines       13497    13529      +32     
==========================================
+ Hits         4663     4737      +74     
+ Misses       8834     8792      -42     
Files with missing lines Coverage Δ
atomsci/ddm/pipeline/compare_models.py 33.06% <ø> (ø)
atomsci/ddm/pipeline/model_tracker.py 17.45% <ø> (ø)
atomsci/ddm/pipeline/model_wrapper.py 64.44% <100.00%> (+0.13%) ⬆️
atomsci/ddm/pipeline/parameter_parser.py 89.71% <100.00%> (+0.09%) ⬆️
atomsci/ddm/pipeline/transformations.py 65.44% <100.00%> (+8.59%) ⬆️
atomsci/ddm/utils/hyperparam_search_wrapper.py 0.00% <ø> (ø)
atomsci/ddm/utils/model_file_reader.py 63.69% <50.00%> (-1.69%) ⬇️
atomsci/ddm/pipeline/featurization.py 61.17% <39.13%> (-0.96%) ⬇️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

stewarthe6 and others added 7 commits March 20, 2025 16:26
Ipc should not be changed to AvgIpc like this because it would break all rdkit_raw models.
…th RobustScaler and PowerTransformer. Updated documentation in related sections. Added functions to ModelFileReader to read out transformer specific parameters. Changed models that test RobustScaler and PowerTransformer to use RF to speed up the training
… it more generalizeable. Fixed tests. Fixed bug where the imputer_strategy parameter was not used
@mauvais2 mauvais2 deleted the branch 1.7.0 May 20, 2025 18:24
@mauvais2 mauvais2 closed this May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants