Skip to content

Conversation

@desilinguist
Copy link
Collaborator

@desilinguist desilinguist commented Jun 20, 2023

  • Fix: base estimators cannot be serialized
    • It turns out that there's a long standing bug in SKLL where using meta-estimators like AdaBoost* that use a base estimator are unable to be used with run_experiment since their base estimator prevents the model parameters dictionary from being serialized to disk. Added code that replaces the base estimator object with a string before serializing.
    • Existing tests did not cover this scenario since they used those meta-estimators via the API and not via a configuration file. Added new tests that covered this scenario.
  • Add support for BaggingClassifier and BaggingRegressor
    • Enable them to be used in SKLL.
    • Set default parameter grids for grid search.
  • Add documetnation for Bagging{Classifier,Regressor} use.
  • New tests for Bagging{Classifier,Regressor}

Easiest way to review is to try out the new learners (along with different estimator fixed parameter values) in the California and Titanic examples.

This PR closes #614.

- It turns out that there's a long standing bug in SKLL where
  using meta-estimators like AdaBoost* that use a base estimator
  are unable to be used with `run_experiment` since their base
  estimator prevents the model parameters dictionary from being
  serialized to disk. Added code that replaces the base estimator object
  with a string before serializing.
- Existing tests did not cover this scenario since they used those
  meta-estimators via the API and not via a configuration file. Added
  new tests that covered this scenario.
@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (ce40d5b) 95.19% compared to head (0108e7b) 95.19%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #742   +/-   ##
=======================================
  Coverage   95.19%   95.19%           
=======================================
  Files          29       29           
  Lines        3535     3538    +3     
=======================================
+ Hits         3365     3368    +3     
  Misses        170      170           
Impacted Files Coverage Δ
skll/utils/constants.py 100.00% <ø> (ø)
skll/experiments/utils.py 93.54% <100.00%> (+0.15%) ⬆️
skll/learner/__init__.py 97.18% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@Frost45 Frost45 left a comment

Choose a reason for hiding this comment

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

Testing it out locally!

Copy link
Contributor

@Frost45 Frost45 left a comment

Choose a reason for hiding this comment

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

Tested it out with Titanic! Everything works as expected 🎉

Co-authored-by: Sanjna Kashyap <20379363+Frost45@users.noreply.github.com>
@desilinguist desilinguist merged commit 90251a2 into main Jun 20, 2023
@delete-merged-branch delete-merged-branch bot deleted the 614-add-bagging-estimators branch June 20, 2023 19:35
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.

Add BaggingClassifer and BaggingRegressor

3 participants