The standard way of using k-means clustering in AOCL-DA is as follows.
Initialize a
aoclda.clustering.kmeans()object with options set in the class constructor.Compute the k-means clusters using
aoclda.clustering.kmeans.fit().Perform further transformations or predictions using
aoclda.clustering.kmeans.transform()oraoclda.clustering.kmeans.predict().Extract results from the
aoclda.clustering.kmeans()object via its class attributes.
Initialize a
da_handlewithda_handle_typeda_handle_kmeans.Set the number of clusters required and other options using da_options_set_? (see below).
Pass data to the handle using da_kmeans_set_data_?.
Optionally set the initial centres using da_kmeans_set_init_centres_?.
Compute the k-means clusters using da_kmeans_compute_?.
Perform further computations as required, using da_kmeans_transform_? or da_kmeans_predict_?.
Extract results using da_handle_get_result_?.