Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@cakedev0
Copy link
Contributor

@cakedev0 cakedev0 commented Nov 13, 2025

Reference Issues/PRs

Towards #32700 (deprecation before complete removal).

What does this implement/fix? Explain your changes.

  • Remove class FriedmanMSE(MSE) in sklearn/tree/_criterion.pyx
  • Deprecate "friedman_mse" for trees & forests (if criterion="friedman_mse": criterion="squared_error" + deprecation warning)
  • Deprecate criterion param for gradient boosting
  • Adapt the doc/docstrings/tests/... accordingly

@github-actions
Copy link

github-actions bot commented Nov 13, 2025

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: beacbcd. Link to the linter CI: here

Comment on lines +1128 to +1129
Training using "absolute_error" is significantly slower
than when using "squared_error".
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated to this PR, but now that MAE criterion is at much 10x slower than the MSE, and usually more like 5x slower. Is it really significantly slower? It will still fit fairly fast for most tabular datasets (less than let's say 10M points).

@cakedev0 cakedev0 marked this pull request as ready for review November 14, 2025 16:59
@cakedev0 cakedev0 changed the title MNT: start removing FriedmanMSE class MNT: trees/forests/GBT: deprecate "friedman_mse" criterion Nov 14, 2025
Comment on lines +1554 to 1555
@pytest.mark.skip("Skip for now")
def test_huber_exact_backward_compat():
Copy link
Contributor Author

@cakedev0 cakedev0 Nov 14, 2025

Choose a reason for hiding this comment

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

I propose to delete this test, as the changes proposed by this PR are not exactly backward compatible, given that the criterion calculations now use a different but equivalent formula.

Another option would be to update it with the current values, but I feel that a such test prevents legitimate changes/improvements that slightly affect any calculation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant