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
in kMeans.py in CH10. it does not work in python3.
def randCent(dataSet, k): n = shape(dataSet)[1] centroids = mat(zeros((k, n))) for j in range(n): minJ = min(dataSet[:,j]) rangeJ = float(max(dataSet[:,j]) - minJ)
i got a error
rangeJ = float(max(dataSet[:,j]) - minJ) TypeError: unsupported operand type(s) for -: 'map' and 'map'
The text was updated successfully, but these errors were encountered:
CH10 is not working with python3 yet, but to quick fix this, you can change this line in loadDataset()
from: fltLine = map(float,curLine) #map all elements to float() to: fltLine = list(map(float,curLine)) #map all elements to float()
Sorry, something went wrong.
No branches or pull requests
in kMeans.py in CH10. it does not work in python3.
i got a error
The text was updated successfully, but these errors were encountered: