Skip to content
Advertisement

How to print KMeans intiatial parameters?

I am using PyCharm to run Kmeans using Iris data.

JavaScript

When I run this, simply prints KMeans() But I would like it to print the following:

JavaScript

How can this be accomplished?

Advertisement

Answer

Simply run kmeans.get_params(). This will print out the parameters (default or custom) used while instantiating the function in a dictionary format.

Please refer this link for more information.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement