Talip7/scikit-learn-issues-multilabel huggingface dataset:
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
I find the matplotlib [Setting up for matplotlib development](https://matplotlib.org/devdocs/devel/development_setup.html) nice. IMO, it seems to hit a good trade-off between conciseness vs easy to follow. More than happy to hear other opinions though, especially with the perspective of someone that is starting to contribute to scikit-learn.

One thing I would do separately is to have the OS tab level first and then conda/pip tab, but probably they did that for simplicity (conda instructions are mostly the same for all the OSes, activating the venv is different on Windows) ...

Labels: Documentation
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
>I find the matplotlib [Setting up for matplotlib development](https://matplotlib.org/devdocs/devel/development_setup.html) nice.

I find it very nice too. The hardest part for me about the scikit-learn contribution guide, was the part to go to some other page, and then "come back here". The linked matplotlib is great IMO, as it tells what you are actually supposed to do, from a general point of view **first**. Then one can see the details. 

As context, the first time I contributed to OS was for scikit-learn. Back then, following the contribution guide was a huge challenge. Three years later (contributing somewhere else) everything makes sense. But I still can miss a step or have a hard time finding a specific instruction. Since I know it's there, I use search. Yet it can be still hard to find.

Labels: Documentation
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
The matplotlib page includes [options for using `https` or `ssh`](https://matplotlib.org/devdocs/devel/development_setup.html#get-most-recent-code) for setting up the GitHub connection. Do we want that as well?

Labels: Documentation
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
> The matplotlib page includes [options for using https or ssh](https://matplotlib.org/devdocs/devel/development_setup.html#get-most-recent-code) for setting up the GitHub connection. Do we want that as well?

I think both would be fine, but I would tend to leave it as is. We link to the [github docs on forking](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) that explain the difference. We had discussions in the past about what should be included in the contribution guide and what not and the argument that we should be specific to scikit-learn development clicks with me.

Labels: Documentation
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
Only https. The main reason is that we want to reduce the number of possible alternatives when possible.

We switch to https only recently, whose setup is simpler than ssh, see https://github.com/scikit-learn/scikit-learn/pull/32320. [^1]

People who have set-up SSH keys are likely more proficient with git/GitHub and will know how to tweak the command.

[^1]: I have some vague memory than setting up the git credential helper on Linux is not as straightforward as in other OSes, but maybe it has improved since. Also people on Linux are likely proficient with git/GitHub.

Labels: Documentation
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
One non-linearity I see so far is the following:

Right now, [installing for development](https://scikit-learn.org/dev/developers/contributing.html#how-to-contribute) and [installing the package from source](https://scikit-learn.org/dev/install.html#installing-scikit-learn) (to get the latest, unstable version), link to the same [section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source) (with the instruction of starting at step 2 for the dev setup, before jumping there).

So the two workflows are
**installing for dev:** 
clone *fork* and `cd scikit-learn` - get OS-specific compilers - install requirements - install *editable version* from `.`
**installing from source:**
clone *main* and `cd scikit-learn`  - get OS-specific compilers - install requirements - install (*not necessarily editable version*) from `.`

@StefanieSenger mentioned that the later could maybe be replaced by pointing to the [nightly builds](file:///home/anne/Projects/scikit-learn/doc/_build/html/stable/developers/advanced_installation.html#installing-nightly-builds) instead. 

Is there any other reason someone would want to install the package from scratch (and require more detailed instructions on how to do so), that we should document both paths explicitly? And if so, should we A) go for a copy of the workflow in `install.rst` in favor of the linearity? Or do we B) just link to the section on `installing for dev` there? Or do you have any other suggestions @lesteve @adrinjalali? (The only other files that link to `installing from source` are the release notes for v1.5 and v1.6)

Labels: Documentation
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
As a general guideline, I would try to have something simple to follow for new contributors. 

I would reduce the number of possibilities so only editable install. People who for some reason (I can't only think of any) want non editable installs will figure it out by themselves.

I would work first on getting a separate page that looks good, which in itself is already a bit of work, with the OS and conda/pip thing.

About how it fits in the existing doc, tricky topic: for now my current thinking that would probably need to be refined:
- the contributing page only has a short text with a link to the "get your environment set-up" page (or "build from source" which is more generic, honestly I don't mind too much).
- it seems like the "building from source" in the install page could point to this link?
- I would move the install the nightly wheels from scientific-python-nightly-wheels somewhere else (maybe the install page? maybe somewhere else to be defined) ... this is mostly useful for:
  - users who want to test whether a bug is in the development version without building from source
  - other package maintainers who want to test against our development version (in general inside their CI)

Labels: Documentation
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
I'm super excited for this!

I'm not sure we need to have separate instructions for "build from source" and "set yourself up for development". I think having only the latter is enough. There aren't that many people who can't use the nightly and for some reason need to build from source. Making them follow the "setup for dev" guide is probably fine.

I think we could replace https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source with a link to https://scikit-learn.org/dev/developers/contributing.html#how-to-contribute. WDYT?

Labels: Documentation
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
Thanks for the feedback @betatim!

> I think we could replace https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source with a link to https://scikit-learn.org/dev/developers/contributing.html#how-to-contribute. WDYT?

The current idea is to 
* move the instructions on installing nightly builds to https://scikit-learn.org/dev/install.html#installing-scikit-learn
* also link to "set yourself up for development" from there (instead of "build from source")
* in general to replace https://scikit-learn.org/dev/developers/advanced_installation.html with the new "set yourself up for development" (which will become its own page at some point after #32509 is merged and we have decided on how to restructure https://scikit-learn.org/dev/developers/contributing.html)

Labels: Documentation
Replace hard-coded "10%" with validation_fraction in MLPClassifier docstring

### Describe the issue linked to the documentation

The MLPClassifier documentation incorrectly states that early_stopping "will automatically set aside 10% of training data" whereas the actual behavior uses the parameter validation_fraction (default 0.1). This mismatch between wording and parameter name can confuse users and lead to inaccurate assumptions in examples and guides.

This hard-coded '10%' reference may also occur in other model classes that support early stopping; those docs should reference validation_fraction instead.

### Suggest a potential alternative/fix

Proposed docstring:

Whether to use early stopping to terminate training when validation score is not improving. If set to true, it will automatically set aside ’validation_fraction’ of training data as validation and terminate training when validation score is not improving by at least ``tol`` for ``n_iter_no_change`` consecutive epochs. The split is stratified, except in a multilabel setting. If early stopping is False, then the training stops when the training loss does not improve by more than ``tol`` for ``n_iter_no_change`` consecutive passes over the training set. Only effective when solver='sgd' or 'adam'.

COMMENT:
Thanks for the issue, updating the `MLPClassifier` docstring is a good idea indeed. PR more than welcome!

Looks like the `MLPRegressor` was updated a while ago in https://github.com/scikit-learn/scikit-learn/pull/25556, so you could draw some inspiration from the wording.

Labels: Documentation, help wanted