updated docs of the new clustering models APIs#21
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
Proposed Changes:
This brings the docs in line with the new encoder API. The encoders no longer take pre-fitted
kmeans_model/gmm_modelobjects or lean on the pretrainedKMeansWeights/GMMWeightsenums as the primary path — they're now configured from parameters (n_clusters/n_componentspluskmeans_params/gmm_params/pca_params), trained withlearn(), and persisted withsave_to_disk/load_from_disk. The old weight-enum path still works but is deprecated, and the docs needed to say so.The main changes:
pyvisim.clusteringpackage (KMeans,GaussianMixtureModel,PCA) that the encoders now build their vocabulary from — what each model exposes, the diagonal-covariance constraint on the GMM, and the internal_from_sklearnadoption path the legacy weights use.learn()+save_to_disk()replacement. Also fixed a couple of now-stale internals (the PCA is loaded by_load_pretrained_weights, notImageEncoderBase.__init__).clustering/area and replaces the "pretrained weights are enums" bullet with the.encoderpersistence story.I kept the deprecated weights page around rather than deleting it, since the enum path still functions — it just warns now.
How did you test it?
Docs-only change, no code touched. Verified the relative links between the new and edited pages resolve, and that the referenced symbols (
save_to_disk,load_from_disk,kmeans_params,gmm_params,pca_params,_from_sklearn,_load_pretrained_weights) match the currentpyvisimsource.Notes for the reviewer
Worth a sanity check that the code snippets in vlad.md / fisher_vector.md match the actual constructor signatures, and that I've described the diagonal-covariance constraint and the "don't pass
n_clusters/n_componentsin both places"ValueErrorbehavior correctly.Checklist
docs:.