Skip to content

Add vector quantization example to KBinsDiscretizer docs #31613

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

pw42020
Copy link

@pw42020 pw42020 commented Jun 20, 2025

Add vector quantization example to KBinsDiscretizer docs

Reference Issues/PRs

#30621 regarding examples/cluster/plot_face_compress.py

What does this implement/fix? Explain your changes.

Adds additional documentation to the KBinsDiscretizer document in the form of an important note that it only outputs floats. This is shown to be an important use case in the Vector Quantization example where the size of the image is increased by 8x due to the transition from int8 (0-255) to float64.

Any other comments?

No.

pw42020 added 4 commits June 20, 2025 15:09
…drastically increase in size using this algorithm, shown by the example plot_face_Compress
Copy link

github-actions bot commented Jun 20, 2025

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 52fa55f. Link to the linter CI: here

Copy link
Contributor

@StefanieSenger StefanieSenger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a valuable addition, thanks a lot @pw42020!
I only have a little suggestion to improve wording.

Comment on lines +186 to +187
This can drastically increase the memory usage of the array. See the example on
:ref:`sphx_glr_auto_examples_cluster_plot_face_compress.py`
Copy link
Contributor

@StefanieSenger StefanieSenger Jun 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This can drastically increase the memory usage of the array. See the example on
:ref:`sphx_glr_auto_examples_cluster_plot_face_compress.py`
This can drastically increase the memory usage of the array. See the
:ref:`sphx_glr_auto_examples_cluster_plot_face_compress.py`

Otherwise it gets rendered as "See the example on Vector Quantization Example ....", which reads a bit redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants