-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
遇到了一个问题 #1
Comments
哇,谢谢你,没想到过了这么久还能有回复^_^^_^
发自我的iPhone
… 在 2022年8月8日,上午10:53,linguiqiu ***@***.***> 写道:
我也遇到这个问题,是因为find_closest_cluster_center函数中distance = np.power((cluster_centers - data[i, :]), 2)这一句出错了,聚类中心和tfidf形状不一致导致的(可能是稀疏矩阵无法直接相减导致的),直接在原函数中改成 distance = np.power((cluster_centers - data[i, :].toarray()), 2)就可以运行了。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
(我又来了,上午回复过删掉的)是因为find_closest_cluster_center函数中distance = np.power((cluster_centers - data[i, :]), 2)这一句出错了,聚类中心和数据形状不一致导致的(可能是稀疏矩阵无法直接相减导致的?),直接在原函数中改成 distance = np.power((cluster_centers - data[i, :].toarray()), 2),同时要记得把__main__函数删掉,它里面调用了iris数据集,iris数据集的形式可能和自己导入的不一样了。 |
好的^_^😁😁
发自我的iPhone
… 在 2022年8月8日,下午3:54,linguiqiu ***@***.***> 写道:
(我又来了,上午回复过删掉的)是因为find_closest_cluster_center函数中distance = np.power((cluster_centers - data[i, :]), 2)这一句出错了,聚类中心和数据形状不一致导致的(可能是稀疏矩阵无法直接相减导致的?),直接在原函数中改成 distance = np.power((cluster_centers - data[i, :].toarray()), 2),同时要记得把__main__函数删掉,它里面调用了iris数据集,iris数据集的形式可能和自己导入的不一样了。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
请问test的最后一行为什么运行不了呢?
The text was updated successfully, but these errors were encountered: