Changes for scikit-learn and seaborn upgrades - #716
Conversation
Scikit-learn has modified their metrics interface to deprecate the `SCORERS` dictionary and made it private instead so we need to start using the private interface. This is a bit risky as the private interface can change at any time but since we pin scikit-learn, this is less of an issue.
- Replace `loss` parameter for `SGDClassifier` with `log_loss`. - Replace `auto` parameter for tree models with `sqrt`. - Use `get_feature_names_out()` instead of `get_feature_names()` - Explicitly specify `min_samples` when using RANSACRegressor with an estimator that is not LinearRegression. - Use 'estimator' instead of deprecated 'base_estimator' for `RANSACRegressor`.
- Seaborn v0.12.0 has some breaking API changes that now require the following changes. - Hue levels and keywords should be handled by `pointplot` and not `FacetGrid`. - We need to make sure that the variable in the data frame that maps to hue levels is categorical. - It is now recommended to explicitly assign palette colors to hue levels.
Codecov ReportBase: 96.90% // Head: 96.90% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #716 +/- ##
=======================================
Coverage 96.90% 96.90%
=======================================
Files 63 63
Lines 9263 9271 +8
=======================================
+ Hits 8976 8984 +8
Misses 287 287
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
Github is being dumb and still displaying an old codecov result. There's no issue with coverage and indicated by codecov's comment on the PR. |
| num_metrics = len(df['metric'].unique()) | ||
| df_melted = pd.melt(df, id_vars=[c for c in df.columns | ||
| if c not in ['train_score_mean', 'test_score_mean']]) | ||
| # make sure the "variable" column is cateogrical since it will be |
There was a problem hiding this comment.
| # make sure the "variable" column is cateogrical since it will be | |
| # make sure the "variable" column is categorical since it will be |
There was a problem hiding this comment.
Thanks for catching this, @Frost45! I don't want to run the entire build again for this typo so I promise I will fix it in the next PR :)
The following changes were made in order to upgrade
scikit-learnto v1.1.2 andseabornto 0.12.0 (which was released today and is unpinned)requirements.txt.SCORERSwith private_SCORERS.lossparameter forSGDClassifierwithlog_loss.autoparameter for tree models withsqrt.get_feature_names_out()instead of deprecatedget_feature_names()RANSACRegressor.min_sampleswhen using RANSACRegressor with an estimator that is notLinearRegression.pointplotandFacetGrid.