We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
# 获得其他簇的样本 ptsNoInCluster = dataSet[np.nonzero( clusterAssment[:, 0].A != j)[0]] # 获得剩余数据集的误差 nonSplitedError = np.sum(ptsNoInCluster[:, 1])
获得剩余数据集的误差不需要dataSet,而是clusterAssment 即整体改为: # 获得剩余数据集的误差 nonSplitedError = np.sum(clusterAssment[np.nonzero( clusterAssment[:, 0].A != j)[0]][:, 1])
The text was updated successfully, but these errors were encountered:
No branches or pull requests
获得剩余数据集的误差不需要dataSet,而是clusterAssment
即整体改为:
# 获得剩余数据集的误差
nonSplitedError = np.sum(clusterAssment[np.nonzero(
clusterAssment[:, 0].A != j)[0]][:, 1])
The text was updated successfully, but these errors were encountered: