#resultList = ['1','2','3']#['not at all', 'in small doses', 'in large doses' ]
percentTats = float(raw_input("percentage of time spent playing video games?"))
ffMiles = float(raw_input("frequent flier miles earned per year?"))
iceCream = float(raw_input("liters of ice cream consumed per year?"))
datingDataMat,datingLabels = file2matrix('datingTestSet.txt')
normMat,ranges,minVals = autoNorm(datingDataMat)
inArr = array([ffMiles,percentTats,iceCream])
classifierResult = classify0((inArr-minVals)/ranges, normMat, datingLabels,3)
print "You will probably like this person: %s" % classifierResult
댓글 없음:
댓글 쓰기