Talip7/scikit-learn-issues-multilabel huggingface dataset:
RandomForest{Classifier,Regressor} split criterion documentation

### Describe the issue linked to the documentation

There's no where in the documentation that explains what method is used to identify which values to consider as candidate splits. For example, for regression, an exhaustive method would be to sort each feature and then use the halfway point between each feature value. In this case there would be O(N*F) candidate splits where N=# data and F= # features. Another way would be to randomly choose K values between the min and max of each feature.

Does anyone know what method is used? Could someone point me to where in the code this occurs?

Contributors should read this: https://github.com/scikit-learn/scikit-learn/issues/27159#issuecomment-1722203111

COMMENT:
> Also the complexity that is mentioned is for binary trees and nothing specific about what is the computational complexity for particular decision tree algorithms like CART , ID3. That could be added too.

Scikit-learn implements CART. This is indeed a decision tree and the complexity for nodes, and tree is specified there: https://scikit-learn.org/stable/modules/tree.html#complexity.

While complexity is interesting, it will not give you the info about the splitter. Also the original question was something about random forest while here we are speaking decision tree.

So I see several documentation improvement:

- [x] Improve the docstring of the `RandomForestClassifier` and `RandomForestRegressor` to make it obvious that the decision tree used under the hood are using `splitter="best"`. #27746
- [x] The `RandomForestRegressor` docstring is wrong because it refers to decision tree classifiers instead of regressors (it should be corrected as well). #30035
- [ ] Improve the user guide (https://scikit-learn.org/stable/modules/ensemble.html#random-forests) for the Random Forest to also mention that we use the best splitter for those.
- [ ] Improve the user guide (https://scikit-learn.org/stable/modules/tree.html#tree) of the decision tree such that we explain the best/random search. As far I can say, the requested information by @howarth could have been made explicit in the first paragraph of the "Mathematical formulation". This section is kind of written having the best splitter in mind, so we would need to either create a section or rework the narrative. I would see a section for finding the best split (the current narrative is nice) and add that split candidate are assessed exhaustively by a brute-force approach. Then, in the next section, I would explain the random approach simply by stating that we pick up a single split candidate randomly by feature.

An important point while modifying the documentation is to keep it as simple as possible and as succinct as possible as well.

Labels: Documentation, help wanted
RandomForest{Classifier,Regressor} split criterion documentation

### Describe the issue linked to the documentation

There's no where in the documentation that explains what method is used to identify which values to consider as candidate splits. For example, for regression, an exhaustive method would be to sort each feature and then use the halfway point between each feature value. In this case there would be O(N*F) candidate splits where N=# data and F= # features. Another way would be to randomly choose K values between the min and max of each feature.

Does anyone know what method is used? Could someone point me to where in the code this occurs?

Contributors should read this: https://github.com/scikit-learn/scikit-learn/issues/27159#issuecomment-1722203111

COMMENT:
Hi all,

Thanks for the detailed discussion. I’ve reviewed the thread and code references. I’d be happy to help improve the documentation for RandomForestClassifier and RandomForestRegressor, especially around clarifying the use of the splitter="best" strategy and how candidate splits are selected.

I’ll start by drafting additions for:

The RandomForest* class docstrings to mention the best splitter.

A short explanation in the [Random Forests user guide](https://scikit-learn.org/stable/modules/ensemble.html#random-forests) referencing that candidate splits are selected exhaustively per feature, using midpoint thresholds.

Possibly extending the [Decision Trees guide](https://scikit-learn.org/stable/modules/tree.html#tree) with a brief “Finding the Best Split” subsection for clarity.

Let me know if that direction sounds good. Happy to submit a PR for review.

— nithish-74

Labels: Documentation, help wanted
RandomForest{Classifier,Regressor} split criterion documentation

### Describe the issue linked to the documentation

There's no where in the documentation that explains what method is used to identify which values to consider as candidate splits. For example, for regression, an exhaustive method would be to sort each feature and then use the halfway point between each feature value. In this case there would be O(N*F) candidate splits where N=# data and F= # features. Another way would be to randomly choose K values between the min and max of each feature.

Does anyone know what method is used? Could someone point me to where in the code this occurs?

Contributors should read this: https://github.com/scikit-learn/scikit-learn/issues/27159#issuecomment-1722203111

COMMENT:
I would like to work on this.

Labels: Documentation, help wanted
RandomForest{Classifier,Regressor} split criterion documentation

### Describe the issue linked to the documentation

There's no where in the documentation that explains what method is used to identify which values to consider as candidate splits. For example, for regression, an exhaustive method would be to sort each feature and then use the halfway point between each feature value. In this case there would be O(N*F) candidate splits where N=# data and F= # features. Another way would be to randomly choose K values between the min and max of each feature.

Does anyone know what method is used? Could someone point me to where in the code this occurs?

Contributors should read this: https://github.com/scikit-learn/scikit-learn/issues/27159#issuecomment-1722203111

COMMENT:
Hi, I would love to work on this issue. I'm new to open source and looking forward to contributing. Could you please assign this to me?

Labels: Documentation, help wanted
RandomForest{Classifier,Regressor} split criterion documentation

### Describe the issue linked to the documentation

There's no where in the documentation that explains what method is used to identify which values to consider as candidate splits. For example, for regression, an exhaustive method would be to sort each feature and then use the halfway point between each feature value. In this case there would be O(N*F) candidate splits where N=# data and F= # features. Another way would be to randomly choose K values between the min and max of each feature.

Does anyone know what method is used? Could someone point me to where in the code this occurs?

Contributors should read this: https://github.com/scikit-learn/scikit-learn/issues/27159#issuecomment-1722203111

COMMENT:
Hi @howarth, @glemaitre, and team! 

I see that PR #31892 was opened to address this issue but appears to have stalled for a few weeks. I'd be happy to help move this forward - either by:

1. Collaborating with @AmanS3109 on the existing PR if they're still working on it
2. Opening a fresh PR if the current one needs a restart

I've reviewed the requirements outlined by @glemaitre and understand what needs to be documented. Could someone guide me on the best way to proceed?

Thanks!

Labels: Documentation, help wanted
RandomForest{Classifier,Regressor} split criterion documentation

### Describe the issue linked to the documentation

There's no where in the documentation that explains what method is used to identify which values to consider as candidate splits. For example, for regression, an exhaustive method would be to sort each feature and then use the halfway point between each feature value. In this case there would be O(N*F) candidate splits where N=# data and F= # features. Another way would be to randomly choose K values between the min and max of each feature.

Does anyone know what method is used? Could someone point me to where in the code this occurs?

Contributors should read this: https://github.com/scikit-learn/scikit-learn/issues/27159#issuecomment-1722203111

COMMENT:
i would like to work on this issue

Labels: Documentation, help wanted
RandomForest{Classifier,Regressor} split criterion documentation

### Describe the issue linked to the documentation

There's no where in the documentation that explains what method is used to identify which values to consider as candidate splits. For example, for regression, an exhaustive method would be to sort each feature and then use the halfway point between each feature value. In this case there would be O(N*F) candidate splits where N=# data and F= # features. Another way would be to randomly choose K values between the min and max of each feature.

Does anyone know what method is used? Could someone point me to where in the code this occurs?

Contributors should read this: https://github.com/scikit-learn/scikit-learn/issues/27159#issuecomment-1722203111

COMMENT:
Hi, I’m interested in working on this issue. This would be my first contribution to scikit-learn. Could you please confirm if it’s still open for contribution and assign it to me? Thanks!

Labels: Documentation, help wanted
RandomForest{Classifier,Regressor} split criterion documentation

### Describe the issue linked to the documentation

There's no where in the documentation that explains what method is used to identify which values to consider as candidate splits. For example, for regression, an exhaustive method would be to sort each feature and then use the halfway point between each feature value. In this case there would be O(N*F) candidate splits where N=# data and F= # features. Another way would be to randomly choose K values between the min and max of each feature.

Does anyone know what method is used? Could someone point me to where in the code this occurs?

Contributors should read this: https://github.com/scikit-learn/scikit-learn/issues/27159#issuecomment-1722203111

COMMENT:
I would like to work on this issue

Labels: Documentation, help wanted
RandomForest{Classifier,Regressor} split criterion documentation

### Describe the issue linked to the documentation

There's no where in the documentation that explains what method is used to identify which values to consider as candidate splits. For example, for regression, an exhaustive method would be to sort each feature and then use the halfway point between each feature value. In this case there would be O(N*F) candidate splits where N=# data and F= # features. Another way would be to randomly choose K values between the min and max of each feature.

Does anyone know what method is used? Could someone point me to where in the code this occurs?

Contributors should read this: https://github.com/scikit-learn/scikit-learn/issues/27159#issuecomment-1722203111

COMMENT:
Hi, I’d like to work on this issue. Plan: update the error message in ClassifierChain when multioutput multiclass is used, and add a test reproducing the issue. I’ll open a PR in 2–3 days.

Labels: Documentation, help wanted
RandomForest{Classifier,Regressor} split criterion documentation

### Describe the issue linked to the documentation

There's no where in the documentation that explains what method is used to identify which values to consider as candidate splits. For example, for regression, an exhaustive method would be to sort each feature and then use the halfway point between each feature value. In this case there would be O(N*F) candidate splits where N=# data and F= # features. Another way would be to randomly choose K values between the min and max of each feature.

Does anyone know what method is used? Could someone point me to where in the code this occurs?

Contributors should read this: https://github.com/scikit-learn/scikit-learn/issues/27159#issuecomment-1722203111

COMMENT:
Hi, I’m new to open source and would like to contribute to this documentation issue. Could you please assign it to me if possible?

Labels: Documentation, help wanted
RandomForest{Classifier,Regressor} split criterion documentation

### Describe the issue linked to the documentation

There's no where in the documentation that explains what method is used to identify which values to consider as candidate splits. For example, for regression, an exhaustive method would be to sort each feature and then use the halfway point between each feature value. In this case there would be O(N*F) candidate splits where N=# data and F= # features. Another way would be to randomly choose K values between the min and max of each feature.

Does anyone know what method is used? Could someone point me to where in the code this occurs?

Contributors should read this: https://github.com/scikit-learn/scikit-learn/issues/27159#issuecomment-1722203111

COMMENT:
For potential contributors to this issue:

I strongly recommend reading [#27159 (comment)](https://github.com/scikit-learn/scikit-learn/issues/27159#issuecomment-1722203111) before creating a PR. It explains what changes are required and in which files they should be made.

Taking the time to read it is definitely worthwhile. Even if you still have questions afterwards, it will help you better frame your confusion so we can assist you or review your PR more effectively.

Edit: typo

Labels: Documentation, help wanted
RandomForest{Classifier,Regressor} split criterion documentation

### Describe the issue linked to the documentation

There's no where in the documentation that explains what method is used to identify which values to consider as candidate splits. For example, for regression, an exhaustive method would be to sort each feature and then use the halfway point between each feature value. In this case there would be O(N*F) candidate splits where N=# data and F= # features. Another way would be to randomly choose K values between the min and max of each feature.

Does anyone know what method is used? Could someone point me to where in the code this occurs?

Contributors should read this: https://github.com/scikit-learn/scikit-learn/issues/27159#issuecomment-1722203111

COMMENT:
Hi @scikit-learn-team! 

First-time contributor here—a first-year CS student learning ML through Kaggle and exploring GSoC 2026. This docs issue looks like a great starter, but I'm a bit confused on the technical details—could someone clarify if it's exhaustive sorting of unique values (O(N*F)) or random selection?

I'd love to work on this if it's still available. My plan:
1. Research the split method in _forest.py or _splitter.py.
2. Add 2-3 sentences to ensemble.rst explaining the approach.
3. Test docs build and verify.
4. Reference any related PRs/commits if needed.

Any guidance on the confusion or code locations would be super helpful! Thanks for the welcoming community—excited to contribute! 

- CodeMudit

Labels: Documentation, help wanted
RandomForest{Classifier,Regressor} split criterion documentation

### Describe the issue linked to the documentation

There's no where in the documentation that explains what method is used to identify which values to consider as candidate splits. For example, for regression, an exhaustive method would be to sort each feature and then use the halfway point between each feature value. In this case there would be O(N*F) candidate splits where N=# data and F= # features. Another way would be to randomly choose K values between the min and max of each feature.

Does anyone know what method is used? Could someone point me to where in the code this occurs?

Contributors should read this: https://github.com/scikit-learn/scikit-learn/issues/27159#issuecomment-1722203111

COMMENT:
Hi ! I'm new to open source contribution and I’d like to work on the remaining user guide improvements (ensemble.rst and tree.rst). Could I take this issue ?

Labels: Documentation, help wanted
RandomForest{Classifier,Regressor} split criterion documentation

### Describe the issue linked to the documentation

There's no where in the documentation that explains what method is used to identify which values to consider as candidate splits. For example, for regression, an exhaustive method would be to sort each feature and then use the halfway point between each feature value. In this case there would be O(N*F) candidate splits where N=# data and F= # features. Another way would be to randomly choose K values between the min and max of each feature.

Does anyone know what method is used? Could someone point me to where in the code this occurs?

Contributors should read this: https://github.com/scikit-learn/scikit-learn/issues/27159#issuecomment-1722203111

COMMENT:
FYI I removed the "good first issue" tag as an experiment to see if that reduces the number of bots trying to address it.

Labels: Documentation, help wanted
RandomForest{Classifier,Regressor} split criterion documentation

### Describe the issue linked to the documentation

There's no where in the documentation that explains what method is used to identify which values to consider as candidate splits. For example, for regression, an exhaustive method would be to sort each feature and then use the halfway point between each feature value. In this case there would be O(N*F) candidate splits where N=# data and F= # features. Another way would be to randomly choose K values between the min and max of each feature.

Does anyone know what method is used? Could someone point me to where in the code this occurs?

Contributors should read this: https://github.com/scikit-learn/scikit-learn/issues/27159#issuecomment-1722203111

COMMENT:
I guess its easier if I address this issue. Will submit a PR later today.

Labels: Documentation, help wanted
DOC "Copy to clipboard" doesn't copy multiline instructions

### Describe the issue linked to the documentation

For instance in [Getting Started](https://scikit-learn.org/stable/getting_started.html):
![image](https://github.com/scikit-learn/scikit-learn/assets/4711805/75c004ec-db18-45ff-a914-fc9eb3158d25)
The pasted code is:
```py
from sklearn.ensemble import RandomForestClassifier
clf = RandomForestClassifier(random_state=0)
X = [[ 1,  2,  3],  # 2 samples, 3 features
#    [11, 12, 13]]  <--- this line was not copied
y = [0, 1]  # classes of each sample
clf.fit(X, y)
```

### Suggest a potential alternative/fix

_No response_

COMMENT:
Thanks for the report (and the PR). However I cannot reproduce the problem you describe on https://scikit-learn.org/dev/getting_started.html with Firefox or chrome on macOS.

Is this problem platform specific?

Labels: Documentation, Needs Triage
DOC "Copy to clipboard" doesn't copy multiline instructions

### Describe the issue linked to the documentation

For instance in [Getting Started](https://scikit-learn.org/stable/getting_started.html):
![image](https://github.com/scikit-learn/scikit-learn/assets/4711805/75c004ec-db18-45ff-a914-fc9eb3158d25)
The pasted code is:
```py
from sklearn.ensemble import RandomForestClassifier
clf = RandomForestClassifier(random_state=0)
X = [[ 1,  2,  3],  # 2 samples, 3 features
#    [11, 12, 13]]  <--- this line was not copied
y = [0, 1]  # classes of each sample
clf.fit(X, y)
```

### Suggest a potential alternative/fix

_No response_

COMMENT:
Actually, I can reproduce using the stable website (https://scikit-learn.org/stable/getting_started.html) but not the dev website (https://scikit-learn.org/dev/getting_started.html).

So this problem has already been fixed in a different manner.

Labels: Documentation, Needs Triage
DOC "Copy to clipboard" doesn't copy multiline instructions

### Describe the issue linked to the documentation

For instance in [Getting Started](https://scikit-learn.org/stable/getting_started.html):
![image](https://github.com/scikit-learn/scikit-learn/assets/4711805/75c004ec-db18-45ff-a914-fc9eb3158d25)
The pasted code is:
```py
from sklearn.ensemble import RandomForestClassifier
clf = RandomForestClassifier(random_state=0)
X = [[ 1,  2,  3],  # 2 samples, 3 features
#    [11, 12, 13]]  <--- this line was not copied
y = [0, 1]  # classes of each sample
clf.fit(X, y)
```

### Suggest a potential alternative/fix

_No response_

COMMENT:
You're right, I checked locally.

Labels: Documentation, Needs Triage
RFC remove some of our examples

TLDR: I think we have too many examples, in particular in
- [clustering](https://scikit-learn.org/stable/auto_examples/index.html#clustering)
- [ensemble](https://scikit-learn.org/stable/auto_examples/index.html#ensemble-methods)
- [generalized-linear-models](https://scikit-learn.org/stable/auto_examples/index.html#generalized-linear-models) This is the worst.
- [model-selection](https://scikit-learn.org/stable/auto_examples/index.html#model-selection)
- [nearest-neighbors](https://scikit-learn.org/stable/auto_examples/index.html#nearest-neighbors)
- [support-vector-machines](https://scikit-learn.org/stable/auto_examples/index.html#support-vector-machines)

On top, several examples don't render a plot in the gallery, e.g. [Release Highlights 1.0.0](https://scikit-learn.org/stable/auto_examples/release_highlights/plot_release_highlights_1_0_0.html#sphx-glr-auto-examples-release-highlights-plot-release-highlights-1-0-0-py).

I would like to discuss how we can improve this situation. My main worry is that, currently, a user does not find what she/he is looking for but gets overwhelmed by the sheer amount of examples.

Edit: See task list in https://github.com/scikit-learn/scikit-learn/issues/27151#issuecomment-2356198357.

COMMENT:
As a part of https://github.com/scikit-learn/scikit-learn/issues/26927 we're also removing some examples or improving them when needed.

Labels: Documentation, RFC
RFC remove some of our examples

TLDR: I think we have too many examples, in particular in
- [clustering](https://scikit-learn.org/stable/auto_examples/index.html#clustering)
- [ensemble](https://scikit-learn.org/stable/auto_examples/index.html#ensemble-methods)
- [generalized-linear-models](https://scikit-learn.org/stable/auto_examples/index.html#generalized-linear-models) This is the worst.
- [model-selection](https://scikit-learn.org/stable/auto_examples/index.html#model-selection)
- [nearest-neighbors](https://scikit-learn.org/stable/auto_examples/index.html#nearest-neighbors)
- [support-vector-machines](https://scikit-learn.org/stable/auto_examples/index.html#support-vector-machines)

On top, several examples don't render a plot in the gallery, e.g. [Release Highlights 1.0.0](https://scikit-learn.org/stable/auto_examples/release_highlights/plot_release_highlights_1_0_0.html#sphx-glr-auto-examples-release-highlights-plot-release-highlights-1-0-0-py).

I would like to discuss how we can improve this situation. My main worry is that, currently, a user does not find what she/he is looking for but gets overwhelmed by the sheer amount of examples.

Edit: See task list in https://github.com/scikit-learn/scikit-learn/issues/27151#issuecomment-2356198357.

COMMENT:
ping @ArturoAmorQ who is interested in this topic and might already have looked at aggregating some info.

+1 on removing examples then. We already have a way to redirect HTML pages as well.

Labels: Documentation, RFC