Talip7/scikit-learn-issues-multilabel huggingface dataset:
Building interactive demos for examples

### Describe the issue linked to the documentation

This is not an issue but rather a good-to-have feature for documentation and this issue is more of a discussion.

It would be nice to have links to or embedding interactive demos made with Gradio inside documentation. 
I've built two apps that you might see how it looks like:
- Anomaly detection: https://huggingface.co/spaces/scikit-learn/anomaly-detection
- Classification: https://huggingface.co/spaces/scikit-learn/classification

We can have below demo (but more official version 😅) embedded in your documentation.
<img width="1155" alt="Ekran Resmi 2022-11-10 15 11 41" src="https://user-images.githubusercontent.com/53175384/201114005-5fd13d40-990a-412d-abe6-fdd01d0f87d9.png">

The current workflow for users is to download python code or run binder. This reduces amount of work in this workflow too!
If you think embedded demos is a bit overkill what we could do is to create these demos and host them on [Spaces](https://huggingface.co/spaces) and put link to Space instead (like it is with Keras examples or kornia examples, you can see them [here](https://huggingface.co/keras-io) and [here](https://huggingface.co/kornia), they're linked from their tutorials on both [Keras.io/examples](https://keras.io/examples/) and Kornia docs) We will also host the Spaces in better hardware (8 vCPU 32 GiB RAM) to make sure it's always running and all good. ✨ 

You can see how it's implemented in Kornia for rst docs [here](https://raw.githubusercontent.com/kornia/kornia/627ebcaaab1547c362908fc9ad9a68c6316c5993/docs/source/filters.rst). It looks like [this](https://kornia.readthedocs.io/en/latest/filters.html#interactive-demo) inside Kornia docs.

<img width="1353" alt="Ekran Resmi 2022-11-10 15 15 08" src="https://user-images.githubusercontent.com/53175384/201114865-d44b6af5-0b85-44d1-b490-0450d8ea05aa.png">

As for Keras, we just put a redirection link inside docs since their document generation is more layered.  
<img width="1309" alt="Ekran Resmi 2022-11-10 15 09 57" src="https://user-images.githubusercontent.com/53175384/201113694-a4c5b804-dce4-4e72-b23e-bbe449bbc150.png">

We definitely want to reduce the core maintainers' workflow so what would be cool is that we (team at [Gradio](https://gradio.app/) & community)  will be developing the demos and maintaining them through GitHub actions such that they will not break every time there's a breaking change in sklearn (this happens rarely, though 🙂)

Hoping to see how we could collaborate!

COMMENT:
@ArturoAmorQ would you have bandwidth to check how easy it would be to do a demo with `stlite`?

Labels: Documentation, RFC
Building interactive demos for examples

### Describe the issue linked to the documentation

This is not an issue but rather a good-to-have feature for documentation and this issue is more of a discussion.

It would be nice to have links to or embedding interactive demos made with Gradio inside documentation. 
I've built two apps that you might see how it looks like:
- Anomaly detection: https://huggingface.co/spaces/scikit-learn/anomaly-detection
- Classification: https://huggingface.co/spaces/scikit-learn/classification

We can have below demo (but more official version 😅) embedded in your documentation.
<img width="1155" alt="Ekran Resmi 2022-11-10 15 11 41" src="https://user-images.githubusercontent.com/53175384/201114005-5fd13d40-990a-412d-abe6-fdd01d0f87d9.png">

The current workflow for users is to download python code or run binder. This reduces amount of work in this workflow too!
If you think embedded demos is a bit overkill what we could do is to create these demos and host them on [Spaces](https://huggingface.co/spaces) and put link to Space instead (like it is with Keras examples or kornia examples, you can see them [here](https://huggingface.co/keras-io) and [here](https://huggingface.co/kornia), they're linked from their tutorials on both [Keras.io/examples](https://keras.io/examples/) and Kornia docs) We will also host the Spaces in better hardware (8 vCPU 32 GiB RAM) to make sure it's always running and all good. ✨ 

You can see how it's implemented in Kornia for rst docs [here](https://raw.githubusercontent.com/kornia/kornia/627ebcaaab1547c362908fc9ad9a68c6316c5993/docs/source/filters.rst). It looks like [this](https://kornia.readthedocs.io/en/latest/filters.html#interactive-demo) inside Kornia docs.

<img width="1353" alt="Ekran Resmi 2022-11-10 15 15 08" src="https://user-images.githubusercontent.com/53175384/201114865-d44b6af5-0b85-44d1-b490-0450d8ea05aa.png">

As for Keras, we just put a redirection link inside docs since their document generation is more layered.  
<img width="1309" alt="Ekran Resmi 2022-11-10 15 09 57" src="https://user-images.githubusercontent.com/53175384/201113694-a4c5b804-dce4-4e72-b23e-bbe449bbc150.png">

We definitely want to reduce the core maintainers' workflow so what would be cool is that we (team at [Gradio](https://gradio.app/) & community)  will be developing the demos and maintaining them through GitHub actions such that they will not break every time there's a breaking change in sklearn (this happens rarely, though 🙂)

Hoping to see how we could collaborate!

COMMENT:
Hey all! Omar from Hugging Face here 🤗 In the recently co-organized community sprint, community members built ~80 Gradio-based apps based on `scikit-learn` documentation. You can check them at https://huggingface.co/sklearn-docs. It might be worth exploring using some of this.

The Gradio team, including @whitphx (creator of `stlite`) and @abidlabs, is working on official pyodide support directly in the `gradio` library.

Labels: Documentation, RFC
Building interactive demos for examples

### Describe the issue linked to the documentation

This is not an issue but rather a good-to-have feature for documentation and this issue is more of a discussion.

It would be nice to have links to or embedding interactive demos made with Gradio inside documentation. 
I've built two apps that you might see how it looks like:
- Anomaly detection: https://huggingface.co/spaces/scikit-learn/anomaly-detection
- Classification: https://huggingface.co/spaces/scikit-learn/classification

We can have below demo (but more official version 😅) embedded in your documentation.
<img width="1155" alt="Ekran Resmi 2022-11-10 15 11 41" src="https://user-images.githubusercontent.com/53175384/201114005-5fd13d40-990a-412d-abe6-fdd01d0f87d9.png">

The current workflow for users is to download python code or run binder. This reduces amount of work in this workflow too!
If you think embedded demos is a bit overkill what we could do is to create these demos and host them on [Spaces](https://huggingface.co/spaces) and put link to Space instead (like it is with Keras examples or kornia examples, you can see them [here](https://huggingface.co/keras-io) and [here](https://huggingface.co/kornia), they're linked from their tutorials on both [Keras.io/examples](https://keras.io/examples/) and Kornia docs) We will also host the Spaces in better hardware (8 vCPU 32 GiB RAM) to make sure it's always running and all good. ✨ 

You can see how it's implemented in Kornia for rst docs [here](https://raw.githubusercontent.com/kornia/kornia/627ebcaaab1547c362908fc9ad9a68c6316c5993/docs/source/filters.rst). It looks like [this](https://kornia.readthedocs.io/en/latest/filters.html#interactive-demo) inside Kornia docs.

<img width="1353" alt="Ekran Resmi 2022-11-10 15 15 08" src="https://user-images.githubusercontent.com/53175384/201114865-d44b6af5-0b85-44d1-b490-0450d8ea05aa.png">

As for Keras, we just put a redirection link inside docs since their document generation is more layered.  
<img width="1309" alt="Ekran Resmi 2022-11-10 15 09 57" src="https://user-images.githubusercontent.com/53175384/201113694-a4c5b804-dce4-4e72-b23e-bbe449bbc150.png">

We definitely want to reduce the core maintainers' workflow so what would be cool is that we (team at [Gradio](https://gradio.app/) & community)  will be developing the demos and maintaining them through GitHub actions such that they will not break every time there's a breaking change in sklearn (this happens rarely, though 🙂)

Hoping to see how we could collaborate!

COMMENT:
We could even think of including interactive demos directly in the user guide (as we do for generated `sphinx-gallery` generated matplotlib png figures) when it makes sense.

Labels: Documentation, RFC
Building interactive demos for examples

### Describe the issue linked to the documentation

This is not an issue but rather a good-to-have feature for documentation and this issue is more of a discussion.

It would be nice to have links to or embedding interactive demos made with Gradio inside documentation. 
I've built two apps that you might see how it looks like:
- Anomaly detection: https://huggingface.co/spaces/scikit-learn/anomaly-detection
- Classification: https://huggingface.co/spaces/scikit-learn/classification

We can have below demo (but more official version 😅) embedded in your documentation.
<img width="1155" alt="Ekran Resmi 2022-11-10 15 11 41" src="https://user-images.githubusercontent.com/53175384/201114005-5fd13d40-990a-412d-abe6-fdd01d0f87d9.png">

The current workflow for users is to download python code or run binder. This reduces amount of work in this workflow too!
If you think embedded demos is a bit overkill what we could do is to create these demos and host them on [Spaces](https://huggingface.co/spaces) and put link to Space instead (like it is with Keras examples or kornia examples, you can see them [here](https://huggingface.co/keras-io) and [here](https://huggingface.co/kornia), they're linked from their tutorials on both [Keras.io/examples](https://keras.io/examples/) and Kornia docs) We will also host the Spaces in better hardware (8 vCPU 32 GiB RAM) to make sure it's always running and all good. ✨ 

You can see how it's implemented in Kornia for rst docs [here](https://raw.githubusercontent.com/kornia/kornia/627ebcaaab1547c362908fc9ad9a68c6316c5993/docs/source/filters.rst). It looks like [this](https://kornia.readthedocs.io/en/latest/filters.html#interactive-demo) inside Kornia docs.

<img width="1353" alt="Ekran Resmi 2022-11-10 15 15 08" src="https://user-images.githubusercontent.com/53175384/201114865-d44b6af5-0b85-44d1-b490-0450d8ea05aa.png">

As for Keras, we just put a redirection link inside docs since their document generation is more layered.  
<img width="1309" alt="Ekran Resmi 2022-11-10 15 09 57" src="https://user-images.githubusercontent.com/53175384/201113694-a4c5b804-dce4-4e72-b23e-bbe449bbc150.png">

We definitely want to reduce the core maintainers' workflow so what would be cool is that we (team at [Gradio](https://gradio.app/) & community)  will be developing the demos and maintaining them through GitHub actions such that they will not break every time there's a breaking change in sklearn (this happens rarely, though 🙂)

Hoping to see how we could collaborate!

COMMENT:
We might also want to explore the possibility to just use ipywidgets in regular sphinx-gallery examples. Combined with jupyterlite, that might be an interesting alternative with lighter weight dependencies albeit maybe at the cost of more limited UI and inability to be included as interactive demos in the user guide.

Labels: Documentation, RFC
Building interactive demos for examples

### Describe the issue linked to the documentation

This is not an issue but rather a good-to-have feature for documentation and this issue is more of a discussion.

It would be nice to have links to or embedding interactive demos made with Gradio inside documentation. 
I've built two apps that you might see how it looks like:
- Anomaly detection: https://huggingface.co/spaces/scikit-learn/anomaly-detection
- Classification: https://huggingface.co/spaces/scikit-learn/classification

We can have below demo (but more official version 😅) embedded in your documentation.
<img width="1155" alt="Ekran Resmi 2022-11-10 15 11 41" src="https://user-images.githubusercontent.com/53175384/201114005-5fd13d40-990a-412d-abe6-fdd01d0f87d9.png">

The current workflow for users is to download python code or run binder. This reduces amount of work in this workflow too!
If you think embedded demos is a bit overkill what we could do is to create these demos and host them on [Spaces](https://huggingface.co/spaces) and put link to Space instead (like it is with Keras examples or kornia examples, you can see them [here](https://huggingface.co/keras-io) and [here](https://huggingface.co/kornia), they're linked from their tutorials on both [Keras.io/examples](https://keras.io/examples/) and Kornia docs) We will also host the Spaces in better hardware (8 vCPU 32 GiB RAM) to make sure it's always running and all good. ✨ 

You can see how it's implemented in Kornia for rst docs [here](https://raw.githubusercontent.com/kornia/kornia/627ebcaaab1547c362908fc9ad9a68c6316c5993/docs/source/filters.rst). It looks like [this](https://kornia.readthedocs.io/en/latest/filters.html#interactive-demo) inside Kornia docs.

<img width="1353" alt="Ekran Resmi 2022-11-10 15 15 08" src="https://user-images.githubusercontent.com/53175384/201114865-d44b6af5-0b85-44d1-b490-0450d8ea05aa.png">

As for Keras, we just put a redirection link inside docs since their document generation is more layered.  
<img width="1309" alt="Ekran Resmi 2022-11-10 15 09 57" src="https://user-images.githubusercontent.com/53175384/201113694-a4c5b804-dce4-4e72-b23e-bbe449bbc150.png">

We definitely want to reduce the core maintainers' workflow so what would be cool is that we (team at [Gradio](https://gradio.app/) & community)  will be developing the demos and maintaining them through GitHub actions such that they will not break every time there's a breaking change in sklearn (this happens rarely, though 🙂)

Hoping to see how we could collaborate!

COMMENT:
And finally there is also https://shiny.rstudio.com/py/docs/shinylive.html.

Labels: Documentation, RFC
Building interactive demos for examples

### Describe the issue linked to the documentation

This is not an issue but rather a good-to-have feature for documentation and this issue is more of a discussion.

It would be nice to have links to or embedding interactive demos made with Gradio inside documentation. 
I've built two apps that you might see how it looks like:
- Anomaly detection: https://huggingface.co/spaces/scikit-learn/anomaly-detection
- Classification: https://huggingface.co/spaces/scikit-learn/classification

We can have below demo (but more official version 😅) embedded in your documentation.
<img width="1155" alt="Ekran Resmi 2022-11-10 15 11 41" src="https://user-images.githubusercontent.com/53175384/201114005-5fd13d40-990a-412d-abe6-fdd01d0f87d9.png">

The current workflow for users is to download python code or run binder. This reduces amount of work in this workflow too!
If you think embedded demos is a bit overkill what we could do is to create these demos and host them on [Spaces](https://huggingface.co/spaces) and put link to Space instead (like it is with Keras examples or kornia examples, you can see them [here](https://huggingface.co/keras-io) and [here](https://huggingface.co/kornia), they're linked from their tutorials on both [Keras.io/examples](https://keras.io/examples/) and Kornia docs) We will also host the Spaces in better hardware (8 vCPU 32 GiB RAM) to make sure it's always running and all good. ✨ 

You can see how it's implemented in Kornia for rst docs [here](https://raw.githubusercontent.com/kornia/kornia/627ebcaaab1547c362908fc9ad9a68c6316c5993/docs/source/filters.rst). It looks like [this](https://kornia.readthedocs.io/en/latest/filters.html#interactive-demo) inside Kornia docs.

<img width="1353" alt="Ekran Resmi 2022-11-10 15 15 08" src="https://user-images.githubusercontent.com/53175384/201114865-d44b6af5-0b85-44d1-b490-0450d8ea05aa.png">

As for Keras, we just put a redirection link inside docs since their document generation is more layered.  
<img width="1309" alt="Ekran Resmi 2022-11-10 15 09 57" src="https://user-images.githubusercontent.com/53175384/201113694-a4c5b804-dce4-4e72-b23e-bbe449bbc150.png">

We definitely want to reduce the core maintainers' workflow so what would be cool is that we (team at [Gradio](https://gradio.app/) & community)  will be developing the demos and maintaining them through GitHub actions such that they will not break every time there's a breaking change in sklearn (this happens rarely, though 🙂)

Hoping to see how we could collaborate!

COMMENT:
Wanted to leave some examples on it:
- https://huggingface.co/spaces/sklearn-docs/sklearn-spectral-clustering
- https://huggingface.co/spaces/sklearn-docs/MNIST-Dimensionality-Reduction
- https://huggingface.co/spaces/sklearn-docs/MNIST_classification_using_multinomial_logistic_L1

Labels: Documentation, RFC
Building interactive demos for examples

### Describe the issue linked to the documentation

This is not an issue but rather a good-to-have feature for documentation and this issue is more of a discussion.

It would be nice to have links to or embedding interactive demos made with Gradio inside documentation. 
I've built two apps that you might see how it looks like:
- Anomaly detection: https://huggingface.co/spaces/scikit-learn/anomaly-detection
- Classification: https://huggingface.co/spaces/scikit-learn/classification

We can have below demo (but more official version 😅) embedded in your documentation.
<img width="1155" alt="Ekran Resmi 2022-11-10 15 11 41" src="https://user-images.githubusercontent.com/53175384/201114005-5fd13d40-990a-412d-abe6-fdd01d0f87d9.png">

The current workflow for users is to download python code or run binder. This reduces amount of work in this workflow too!
If you think embedded demos is a bit overkill what we could do is to create these demos and host them on [Spaces](https://huggingface.co/spaces) and put link to Space instead (like it is with Keras examples or kornia examples, you can see them [here](https://huggingface.co/keras-io) and [here](https://huggingface.co/kornia), they're linked from their tutorials on both [Keras.io/examples](https://keras.io/examples/) and Kornia docs) We will also host the Spaces in better hardware (8 vCPU 32 GiB RAM) to make sure it's always running and all good. ✨ 

You can see how it's implemented in Kornia for rst docs [here](https://raw.githubusercontent.com/kornia/kornia/627ebcaaab1547c362908fc9ad9a68c6316c5993/docs/source/filters.rst). It looks like [this](https://kornia.readthedocs.io/en/latest/filters.html#interactive-demo) inside Kornia docs.

<img width="1353" alt="Ekran Resmi 2022-11-10 15 15 08" src="https://user-images.githubusercontent.com/53175384/201114865-d44b6af5-0b85-44d1-b490-0450d8ea05aa.png">

As for Keras, we just put a redirection link inside docs since their document generation is more layered.  
<img width="1309" alt="Ekran Resmi 2022-11-10 15 09 57" src="https://user-images.githubusercontent.com/53175384/201113694-a4c5b804-dce4-4e72-b23e-bbe449bbc150.png">

We definitely want to reduce the core maintainers' workflow so what would be cool is that we (team at [Gradio](https://gradio.app/) & community)  will be developing the demos and maintaining them through GitHub actions such that they will not break every time there's a breaking change in sklearn (this happens rarely, though 🙂)

Hoping to see how we could collaborate!

COMMENT:
I like the idea of having interactive figures directly in the user guide (somehow activated by user interaction to avoid large downloads). I think being able to explore stuff as you are reading about it is super cool. It would also be a lot of work to write the guide so that it works together with the example, etc. But luckily we have quite a few people with experience in teaching. Count this as a vote for having a way to have interactive figures in the user guide.

Labels: Documentation, RFC
Building interactive demos for examples

### Describe the issue linked to the documentation

This is not an issue but rather a good-to-have feature for documentation and this issue is more of a discussion.

It would be nice to have links to or embedding interactive demos made with Gradio inside documentation. 
I've built two apps that you might see how it looks like:
- Anomaly detection: https://huggingface.co/spaces/scikit-learn/anomaly-detection
- Classification: https://huggingface.co/spaces/scikit-learn/classification

We can have below demo (but more official version 😅) embedded in your documentation.
<img width="1155" alt="Ekran Resmi 2022-11-10 15 11 41" src="https://user-images.githubusercontent.com/53175384/201114005-5fd13d40-990a-412d-abe6-fdd01d0f87d9.png">

The current workflow for users is to download python code or run binder. This reduces amount of work in this workflow too!
If you think embedded demos is a bit overkill what we could do is to create these demos and host them on [Spaces](https://huggingface.co/spaces) and put link to Space instead (like it is with Keras examples or kornia examples, you can see them [here](https://huggingface.co/keras-io) and [here](https://huggingface.co/kornia), they're linked from their tutorials on both [Keras.io/examples](https://keras.io/examples/) and Kornia docs) We will also host the Spaces in better hardware (8 vCPU 32 GiB RAM) to make sure it's always running and all good. ✨ 

You can see how it's implemented in Kornia for rst docs [here](https://raw.githubusercontent.com/kornia/kornia/627ebcaaab1547c362908fc9ad9a68c6316c5993/docs/source/filters.rst). It looks like [this](https://kornia.readthedocs.io/en/latest/filters.html#interactive-demo) inside Kornia docs.

<img width="1353" alt="Ekran Resmi 2022-11-10 15 15 08" src="https://user-images.githubusercontent.com/53175384/201114865-d44b6af5-0b85-44d1-b490-0450d8ea05aa.png">

As for Keras, we just put a redirection link inside docs since their document generation is more layered.  
<img width="1309" alt="Ekran Resmi 2022-11-10 15 09 57" src="https://user-images.githubusercontent.com/53175384/201113694-a4c5b804-dce4-4e72-b23e-bbe449bbc150.png">

We definitely want to reduce the core maintainers' workflow so what would be cool is that we (team at [Gradio](https://gradio.app/) & community)  will be developing the demos and maintaining them through GitHub actions such that they will not break every time there's a breaking change in sklearn (this happens rarely, though 🙂)

Hoping to see how we could collaborate!

COMMENT:
There is another contender, namely [voici](https://voici.readthedocs.io), the WASM version of voila dashboards for jupyter/ipywidgets.

Here is a demo:

- https://voici.readthedocs.io/en/latest/_static/lite/voici/tree/index.html

I don't know if they can be embedded in a sphinx rendered HTML page though. We could probably use an iframe if needed but maybe there is a better way to do it.

Edit: I opened a feature request for embeddable apps: https://github.com/voila-dashboards/voici/issues/79.

Labels: Documentation, RFC
partial_dependence should respect sample weights

### Describe the workflow you want to enable

Currently, the inspect.partial_dependence funtions calculate arithmetic averages over predictions. For models fitted with sample weights, this is between suboptimal and wrong.

### Describe your proposed solution

Add new argument "sample_weight = None". If vector of right length, replace arithmetic average of predictions by weighted averages.

Note that this does not affect the calculation of ICE curves, just the aggregate.

### Describe alternatives you've considered, if relevant

_No response_

### Additional context

_No response_

COMMENT:
@mayer79, have you already started working on this issue? I would love to solve it if you didn't. :)

Labels: New Feature, module:inspection