Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.78 KB

File metadata and controls

38 lines (29 loc) · 1.78 KB

KmeansParameters

Parameters for K-means clustering (deprecated, use algorithm_params)

Properties

Name Type Description Notes
n_clusters int Number of clusters to form [optional] [default to 8]
max_iter int Maximum number of iterations [optional] [default to 300]
random_state int Random seed for reproducibility [optional] [default to 42]
n_init int Number of times k-means will run with different centroid seeds [optional] [default to 10]
tol float Tolerance for convergence [optional] [default to 1.0E-4]
init str Method for initialization ('k-means++' or 'random') [optional] [default to 'k-means++']
verbose int Verbosity mode [optional] [default to 0]
copy_x bool If True, the original data is not modified [optional] [default to True]
algorithm str K-means algorithm to use ('lloyd', 'elkan', or 'auto') [optional] [default to 'lloyd']

Example

from mixpeek.models.kmeans_parameters import KmeansParameters

# TODO update the JSON string below
json = "{}"
# create an instance of KmeansParameters from a JSON string
kmeans_parameters_instance = KmeansParameters.from_json(json)
# print the JSON string representation of the object
print(KmeansParameters.to_json())

# convert the object into a dict
kmeans_parameters_dict = kmeans_parameters_instance.to_dict()
# create an instance of KmeansParameters from a dict
kmeans_parameters_from_dict = KmeansParameters.from_dict(kmeans_parameters_dict)

[Back to Model list] [Back to API list] [Back to README]