.. _f-kmeansconstraintz: module ``mlmodel.kmeans_constraint`` ==================================== .. inheritance-diagram:: mlinsights.mlmodel.kmeans_constraint Short summary +++++++++++++ module ``mlinsights.mlmodel.kmeans_constraint`` Implémente la classe :class:`ConstraintKMeans`. :githublink:`%|py|6` Classes +++++++ +-----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +===================================================================================+=====================================================================================================================+ | :class:`ConstraintKMeans ` | Defines a constraint :epkg:`k-means`. Clusters are modified to have an equal size. The algorithm is initialized ... | +-----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ Properties ++++++++++ +--------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | property | truncated documentation | +============================================================================================+==================================================================================================================+ | :py:meth:`_repr_html_ ` | HTML representation of estimator. This is redundant with the logic of `_repr_mimebundle_`. The latter should ... | +--------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ Methods +++++++ +-----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +=====================================================================================================+================================================================================================================================================+ | :py:meth:`__init__ ` | | +-----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`cluster_edges ` | Computes edges between clusters based on a `Delaunay `_ ... | +-----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`constraint_kmeans ` | Completes the constraint k-means. | +-----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`fit ` | Compute k-means clustering. | +-----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`predict ` | Computes the predictions. | +-----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`score ` | Returns the distances to all clusters. | +-----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`transform ` | Computes the predictions. | +-----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: mlinsights.mlmodel.kmeans_constraint :members: :special-members: __init__ :show-inheritance: