It's a known issue, see https://github.com/scikit-learn/scikit-learn/issues/17966
Someone would would need to investigate more to find a fix though.
If you have a minimal reproducible example that's different from the one in that issue, and could post it there it would help.

Roman

On 11/02/2021 17:29, Farzana Anowar wrote:
Hello everyone,

I was trying to run the BIRCH clustering algorithm. However, after fitting the model I am facing the following error:

AttributeError: '_CFSubcluster' object has no attribute 'sq_norm_'

This error occurs only after fitting the model and I couldn't find any proper explanation of this. Could anyone give me any suggestions on that? It would be really helpful.

Here is my code:

from sklearn.cluster import Birch

# Creating the BIRCH clustering model
model = Birch(n_clusters = None)

# Fit the data (Training)
model.fit(df)

# Predict the same data
pred = model.predict(df)

_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn

Reply via email to