Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
f7cf7d6
First draft, needs tests & fixes
cakedev0 Sep 2, 2025
7061ff6
Merge remote-tracking branch 'upstream/main' into mae-split-optim
cakedev0 Sep 2, 2025
f4edaa2
fixed compilation errors
cakedev0 Sep 3, 2025
01fd9b2
fixed compilation errors
cakedev0 Sep 3, 2025
3f87b99
Moved AE computation in external helper to be able to unit-test it; a…
cakedev0 Sep 3, 2025
e8adf96
WIP some additional tests that helped me, some will be kept in my fin…
cakedev0 Sep 3, 2025
4ed868e
tests cleanup
cakedev0 Sep 3, 2025
83d89a4
cleanup
cakedev0 Sep 3, 2025
1ca34bf
cleanup
cakedev0 Sep 3, 2025
43692f7
Merge remote-tracking branch 'upstream/main' into mae-split-optim
cakedev0 Sep 3, 2025
d463558
WIP fixing linting issues
cakedev0 Sep 3, 2025
fa993d4
fixed linting
cakedev0 Sep 3, 2025
cbf5405
fix spelling
cakedev0 Sep 3, 2025
a4bd310
Added test that would fail before this PR
cakedev0 Sep 4, 2025
f4a0e07
added changed logs
cakedev0 Sep 4, 2025
a86a190
cleanup
cakedev0 Sep 4, 2025
092af65
comments & cleanups
cakedev0 Sep 4, 2025
4a12dea
slight refactor of class inheritance
cakedev0 Sep 4, 2025
b44fb2b
Merge remote-tracking branch 'upstream/main' into mae-split-optim
cakedev0 Sep 4, 2025
81728c2
adressed PR comments; simplified dimension of left/right abs errors a…
cakedev0 Sep 9, 2025
7477f4c
removed print
cakedev0 Sep 9, 2025
8f035d0
heap methods docstring; test: split assertion
cakedev0 Sep 10, 2025
e6bf43b
unit test for heap
cakedev0 Sep 10, 2025
eb2ccf5
fix comment
cakedev0 Sep 10, 2025
66a2cb6
Merge remote-tracking branch 'upstream/main' into mae-split-optim
cakedev0 Sep 12, 2025
d13a2c5
Apply suggestions from code review
cakedev0 Sep 13, 2025
4fc78f4
comments & naming
cakedev0 Sep 13, 2025
220c34f
parameters docstring
cakedev0 Sep 13, 2025
d9b3c35
Update doc about MAE criterion speed
cakedev0 Sep 14, 2025
72e15b5
move precompute
cakedev0 Sep 14, 2025
aa91439
doing typos is my signature move, sorry for taht
cakedev0 Sep 14, 2025
450290a
Update doc/modules/tree.rst
cakedev0 Sep 15, 2025
bc7685e
Add docstring for test_cython_weighted_heap_vs_heapq
cakedev0 Sep 15, 2025
390731a
Update comment about mem footprint
cakedev0 Sep 15, 2025
1153cb5
PERF: Decision trees: improve prefs by ~20% with very simple changes …
cakedev0 Sep 15, 2025
0f6d896
:lock: :robot: CI Update lock files for main CI build(s) :lock: :robo…
scikit-learn-bot Sep 15, 2025
f48a2a4
:lock: :robot: CI Update lock files for array-api CI build(s) :lock: …
scikit-learn-bot Sep 15, 2025
b32df28
:lock: :robot: CI Update lock files for free-threaded CI build(s) :lo…
scikit-learn-bot Sep 15, 2025
6cdacd1
TST Fix the error message in test_min_dependencies_readme (#32149)
jeremiedbb Sep 15, 2025
3a85d5c
Revert "API make murmurhash3_32 private (#32103)" (#32131)
jeremiedbb Sep 15, 2025
85b12c9
fix docstring
cakedev0 Sep 15, 2025
7996ed6
Merge remote-tracking branch 'upstream/main' into mae-split-optim
cakedev0 Sep 15, 2025
22c843e
addressed comments around test_absolute_errors_precomputation_function
cakedev0 Sep 15, 2025
319523a
update docstring
cakedev0 Sep 15, 2025
d7f5157
update docstring; again
cakedev0 Sep 15, 2025
3c59ae7
Merge remote-tracking branch 'upstream/main' into mae-split-optim
cakedev0 Sep 17, 2025
3819c50
Merge remote-tracking branch 'upstream/main' into mae-split-optim
cakedev0 Sep 26, 2025
77dcb19
new test and fix
cakedev0 Sep 26, 2025
14014f5
fix typo
cakedev0 Sep 26, 2025
ad16ae0
remove np.pow
cakedev0 Sep 26, 2025
1e9c74f
Apply suggestion from @ogrisel
cakedev0 Sep 26, 2025
b21040e
Apply suggestion from @cakedev0
cakedev0 Sep 26, 2025
e557f9e
added explanation test; more tests with integer weights
cakedev0 Sep 29, 2025
f920379
Merge branch 'mae-split-optim' of github.com:cakedev0/scikit-learn in…
cakedev0 Sep 29, 2025
c842e59
Merge remote-tracking branch 'upstream/main' into mae-split-optim
cakedev0 Oct 2, 2025
bec926a
Merge branch 'main' into mae-split-optim
cakedev0 Oct 3, 2025
cc06f3a
Merge remote-tracking branch 'upstream/main' into mae-split-optim
cakedev0 Oct 7, 2025
86dddc9
Added fenwick tree
cakedev0 Oct 8, 2025
b87ea44
fixes
cakedev0 Oct 9, 2025
53ae038
find idx and prev_idx in a single search
cakedev0 Oct 9, 2025
6328a80
Merge remote-tracking branch 'upstream/main' into mae-split-optim
cakedev0 Oct 9, 2025
acadfb7
attempt at fixing sorting
cakedev0 Oct 9, 2025
39a15c1
cleanup
cakedev0 Oct 13, 2025
c6ac69c
Merge branch 'fenwick-mae-split' into mae-split-optim
cakedev0 Oct 13, 2025
f996c51
Merge remote-tracking branch 'upstream/main' into mae-split-optim
cakedev0 Oct 20, 2025
75c27e1
moved back sort function into partitioner
cakedev0 Oct 20, 2025
2c97399
Apply suggestion from @ogrisel
cakedev0 Oct 20, 2025
0285c97
Update sklearn/tree/_criterion.pyx
cakedev0 Oct 20, 2025
7523930
add link to report
cakedev0 Oct 20, 2025
78d6cfc
Update sklearn/tree/_utils.pyx
cakedev0 Oct 21, 2025
0fdab95
Apply suggestions from code review
cakedev0 Oct 21, 2025
f2219f8
rename y -> sorted_y in compute_ranks
cakedev0 Oct 21, 2025
46251fa
Merge remote-tracking branch 'upstream/main' into mae-split-optim
cakedev0 Oct 27, 2025
64a3516
Update sklearn/tree/tests/test_fenwick.py
cakedev0 Oct 27, 2025
70277d3
adressed comments on test fenwick
cakedev0 Oct 27, 2025
2942c14
Merge branch 'mae-split-optim' of github.com:cakedev0/scikit-learn in…
cakedev0 Oct 27, 2025
3e60afd
a lot of doc/comments
cakedev0 Oct 27, 2025
10c7dde
Apply suggestions from code review
cakedev0 Oct 28, 2025
fce6df9
Merge remote-tracking branch 'upstream/main' into mae-split-optim
cakedev0 Oct 29, 2025
d12585d
Merge branch 'mae-split-optim' of github.com:cakedev0/scikit-learn in…
cakedev0 Oct 29, 2025
50896ae
Merge branch 'main' into mae-split-optim
betatim Nov 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/modules/tree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ Mean Absolute Error:

H(Q_m) = \frac{1}{n_m} \sum_{y \in Q_m} |y - median(y)_m|

Note that it fits much slower than the MSE criterion.
Note that it is 3–6× slower to fit than the MSE criterion as of version 1.8.

.. _tree_missing_value_support:

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- :class:`tree.DecisionTreeRegressor` with `criterion="absolute_error"`
now runs much faster: O(n log n) complexity against previous O(n^2)
allowing to scale to millions of data points, even hundred of millions.
By :user:`Arthur Lacote <cakedev0>`
6 changes: 6 additions & 0 deletions doc/whats_new/upcoming_changes/sklearn.tree/32100.fix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- :class:`tree.DecisionTreeRegressor` with `criterion="absolute_error"`
would sometimes make sub-optimal splits
(i.e. splits that don't minimize the absolute error).
Now it's fixed. Hence retraining trees might gives slightly different
results.
By :user:`Arthur Lacote <cakedev0>`
Loading
Loading