[scikit-learn] View full sized k_means.labels_
Sole Galli
solegalli at protonmail.com
Sun May 29 03:40:04 EDT 2022
Maybe with numpy.set_printoptions?
See thread here:
https://stackoverflow.com/questions/1987694/how-to-print-the-full-numpy-array-without-truncation
Soledad Galli
https://www.trainindata.com/
Sent with Proton Mail secure email.
------- Original Message -------
On Friday, May 13th, 2022 at 10:35 AM, Mahmood Naderan <mahmood.nt at gmail.com> wrote:
> 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
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
More information about the scikit-learn
mailing list