|
| 1 | +--- |
| 2 | +title: "Enhancing user experience through interactive inspection" |
| 3 | +date: January 6, 2026 |
| 4 | + |
| 5 | +#### Post Category and Tags #### |
| 6 | +# Format in titlecase without dashes (Ex. "Open Source" instead of "open-source") |
| 7 | +categories: |
| 8 | + - Updates |
| 9 | +tags: |
| 10 | + - Open Source |
| 11 | + - Funding |
| 12 | + - Diversity |
| 13 | + - Machine Learning |
| 14 | +featured-image: sklearn_czi.png |
| 15 | + |
| 16 | +#### Author Info #### |
| 17 | +# Can accomodate multiple authors |
| 18 | +# Add SQUARE Author Image to /assets/images/author_images/ folder |
| 19 | +postauthors: |
| 20 | + - name: Dea María Léon |
| 21 | + website: https://deamarialeon.com |
| 22 | + email: deamarialeon@gmail.com |
| 23 | + image: dea-leon.png |
| 24 | +--- |
| 25 | +<div> |
| 26 | + <img src="/assets/images/posts_images/{{ page.featured-image }}" alt=""> |
| 27 | + {% include postauthor.html %} |
| 28 | +</div> |
| 29 | + |
| 30 | + |
| 31 | +User experience (UX) has always been an important focus for `scikit-learn`. |
| 32 | +As we know, UX encompasses many aspects, but here we will focus specifically on |
| 33 | +how easy it is for the user to understand `scikit-learn` models during development, |
| 34 | +especially while using tools like jupyter notebooks. |
| 35 | + |
| 36 | +## First visualizations |
| 37 | + |
| 38 | +Initial work to allow users to inspect their models interactively began in 2019, |
| 39 | +when Thomas J. Fan introduced HTML visualizations for estimators. |
| 40 | +He continued to build on this foundation with additional improvements |
| 41 | +in subsequent contributions. |
| 42 | + |
| 43 | +## Lack of resources to go forward |
| 44 | + |
| 45 | +In June 2023, [issue 26595 was opened by Gaël Varoquaux](https://github.com/ |
| 46 | +scikit-learn/scikit-learn/issues/26595) outlining several potential enhancements |
| 47 | +to the HTML displays. These ideas stemmed from direct interactions with users, |
| 48 | +which clearly highlighted the need for further work in this area. |
| 49 | +Unfortunately, due to a lack of resources, the issue remained open for |
| 50 | +approximately a year and a half. |
| 51 | + |
| 52 | +## Wellcome grant awarded to `scikit-learn` |
| 53 | + |
| 54 | +This was until the end of 2023, when Guillaume Lemaitre applied for a grant with |
| 55 | +the help of NumFOCUS, that the broader topic of Predictive model evaluation and |
| 56 | +inspection was formalized. Enhancing user experience through interactive inspection |
| 57 | +is an essential part of this effort and falls within the scope of the grant. |
| 58 | + |
| 59 | +The grant was awarded to `scikit-learn`and it is from the Chan Zuckerberg |
| 60 | +Initiative (CZI) through its Essential Open-Source Software for Science |
| 61 | +(EOSS) program. It is funded by The Wellcome Trust and administered by NumFOCUS. |
| 62 | +Thanks to this financial support, work is well underway. And several objectives |
| 63 | +from the said issue have already been completed. |
| 64 | +[See the grant application here.](https://github.com/scikit-learn/ |
| 65 | +administrative/blob/master/czi_eoss_proposal/EOSS6-0000000551_202312181059.pdf) |
| 66 | + |
| 67 | +## First milestone: Added interactive parameters table for each element |
| 68 | + |
| 69 | +The first milestone was introduced in`scikit-learn` version 1.7, released in |
| 70 | +June 2025. A parameters table was added to the HTML representation of models, |
| 71 | +displaying parameter names and their corresponding values. |
| 72 | +Non-default parameters—those explicitly set by the user—are highlighted. |
| 73 | +In addition, a copy-to-clipboard button is available for each parameter name. |
| 74 | +The parameter name that is copied to the clipboard is the fully classified name, |
| 75 | +which is shown on hover as well. The parameters table is collapsed by default |
| 76 | +and can be opened by the user. |
| 77 | + |
| 78 | +The following two images show a pipeline table before and after the milestone. |
| 79 | + |
| 80 | +<figure> |
| 81 | +<img src="/assets/images/posts_images/enhancing-UX/before1_7.png" |
| 82 | +alt="HTML visualization before scikit-learn 1.7" /> |
| 83 | +<figcaption> |
| 84 | +HTML visualization before scikit-learn version 1.7 |
| 85 | +</figcaption> |
| 86 | +</figure> |
| 87 | + |
| 88 | +<figure> |
| 89 | +<img src="/assets/images/posts_images/enhancing-UX/scikit-learn1_7.png" |
| 90 | +alt="HTML visualization with scikit-learn 1.7" |
| 91 | +style="width:50%" |
| 92 | +/> |
| 93 | +<figcaption> |
| 94 | +HTML visualization with scikit-learn version 1.7 |
| 95 | +</figcaption> |
| 96 | +</figure> |
| 97 | + |
| 98 | + |
| 99 | +## Second milestone: Links to parameters documentation and tooltip preview |
| 100 | + |
| 101 | +This feature was further enhanced in version 1.8, released in December 2025. |
| 102 | +We added tooltips that provide documentation for each parameter, |
| 103 | +as well as links to the online documentation. |
| 104 | +See the GIF below or this example for more details: |
| 105 | +[Displaying estimators and complex pipelines](https://scikit-learn.org/ |
| 106 | +stable/auto_examples/miscellaneous/plot_estimator_representation.html). |
| 107 | + |
| 108 | + |
| 109 | +<figure> |
| 110 | +<img src="/assets/images/posts_images/enhancing-UX/scikit-learn-1_8.gif" |
| 111 | +alt="HTML visualization with scikit-learn 1.8" /> |
| 112 | +<figcaption> |
| 113 | +HTML visualization after scikit-learn 1.8 |
| 114 | +</figcaption> |
| 115 | +</figure> |
| 116 | + |
| 117 | +## Planned improvements |
| 118 | + |
| 119 | +More features are now being implemented. In particular, users will be able to |
| 120 | +visualize feature names and values, display fitted attributes and further improve |
| 121 | +the overall appearance of the interactive displays. |
| 122 | + |
| 123 | + |
0 commit comments