[scikit-learn] View full sized k_means.labels_

Mahmood Naderan mahmood.nt at gmail.com
Fri May 13 04:35:55 EDT 2022


Hi,
I have used the following lines of codes

    k_means = KMeans(n_clusters=i,
random_state=4).fit(principalComponents_dataFrame)
    print(k_means.labels_)

But the problem is for large vectors of labels, I see shortened
version like this:

    [4 4 0 ... 0 0 0]

How can I force it to print the full length vector?

Regards,
Mahmood


More information about the scikit-learn mailing list