Last answered:

17 Jan 2024

Posted on:

15 Jan 2024

0

i have tried all way. But i am not able to get any right answers.Input :kmeans= KMeans(n_clusters=2)

input = kmeans = KMeans(n_clusters=2,random_state= 365).fit(x)

output = l In[33], line 1 ----> 1 kmeans = KMeans(n_clusters=2,random_state= 365).fit(x)  File ~/anaconda3/lib/python3.11/site-packages/sklearn/cluster/_kmeans.py:1455, in KMeans.fit(self, X, y, sample_weight)  1453 else:  1454 kmeans_single = _kmeans_single_lloyd -> 1455 self._check_mkl_vcomp(X, X.shape[0])  1457 best_inertia, best_labels = None, None  1459 for i in range(self._n_init):  1460 # Initialize centers  File ~/anaconda3/lib/python3.11/site-packages/sklearn/cluster/_kmeans.py:911, in _BaseKMeans._check_mkl_vcomp(self, X, n_samples)  909 n_active_threads = int(np.ceil(n_samples / CHUNK_SIZE))  910 if n_active_threads < self._n_threads: --> 911 modules = threadpool_info()  912 has_vcomp = "vcomp" in [module["prefix"] for module in modules]  913 has_mkl = ("mkl", "intel") in [  914 (module["internal_api"], module.get("threading_layer", None))  915 for module in modules  916 ]  File ~/anaconda3/lib/python3.11/site-packages/sklearn/utils/fixes.py:150, in threadpool_info()  148 return controller.info()...
--> 646 config = get_config().split()  647 if config[0] == b"OpenBLAS":  648 return config[1].decode("utf-8")  AttributeError: 'NoneType' object has no attribute 'split'Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

I have also tried kmean.params

input = kmeans.get_params()

output = algorithm': 'lloyd',  'copy_x': True,  'init': 'k-means++',  'max_iter': 300,  'n_clusters': 2,  'n_init': 'warn',  'random_state': None,  'tol': 0.0001,  'verbose': 0}


3 answers ( 0 marked as helpful)
Instructor
Posted on:

17 Jan 2024

0

Hey Shobhit,


Thank you for reaching out!


Unfortunately, I can only see a very small portion of your code and am not able to locate the problem. Please, download the notebook from the resources complementing this lecture and compare your code with the one provided. Then, don't forget to restart the kernel and run all cells in your notebook in order.


Let me know if the issue persists.


Kind regards,

365 Hristina

Posted on:

17 Jan 2024

0

Hi thank you mam, I have done that but that code is not working

Instructor
Posted on:

17 Jan 2024

0

Hey again Shobhit,


In that case, could you please copy-paste here your code for this lecture? Thank you.


Best,

365 Hristina

Submit an answer