tfmot.clustering.keras.CentroidInitialization
Stay organized with collections
Save and categorize content based on your preferences.
Specifies how the cluster centroids should be initialized.
LINEAR
: Cluster centroids are evenly spaced between the minimum and
maximum values of a given weight tensor.
RANDOM
: Centroids are sampled using the uniform distribution between the
minimum and maximum weight values in a given layer.
DENSITY_BASED
: Density-based sampling obtained as follows: first a
cumulative distribution function is built for the weights, then the Y
axis is evenly spaced into as many regions as many clusters we want to
have. After this the corresponding X values are obtained and used to
initialize the clusters centroids.
KMEANS_PLUS_PLUS
: cluster centroids using the kmeans++ algorithm
Class Variables |
DENSITY_BASED
|
<CentroidInitialization.DENSITY_BASED: 'CentroidInitialization.DENSITY_BASED'>
|
KMEANS_PLUS_PLUS
|
<CentroidInitialization.KMEANS_PLUS_PLUS: 'CentroidInitialization.KMEANS_PLUS_PLUS'>
|
LINEAR
|
<CentroidInitialization.LINEAR: 'CentroidInitialization.LINEAR'>
|
RANDOM
|
<CentroidInitialization.RANDOM: 'CentroidInitialization.RANDOM'>
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-05-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-05-26 UTC."],[],[]]