# Creating 4 clusters with k-means model.fit(features_rsi_adx) error

Creating 4 clusters with k-means

model.fit(features_rsi_adx)

 

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[44], line 11
      8 model = KMeans(n_clusters=4, random_state=40)
     10 # Creating 4 clusters with k-means
---> 11 model.fit(features_rsi_adx)
     13 model

It works on your system, your codes do not work on my computer.
 
AttributeError: 'NoneType' object has no attribute 'split'

Hi Drudu,



I am not able to replicate this issue. It works fine on my local system. One probable reason for this error might be a different scikit-learn version in your local system. I would suggest you to please check the scikit-learn version on your system. It should be "0.24.2". If the version is different you can re-install the scikit-learn library with 0.24.2 version using the below code:

!pip install scikit-learn==0.24.2

Please do let us know if the issue still persists.



Thanks,

Akshay