m01ly / m01ly.github.io

0 stars 0 forks source link

机器学习算法之KNN | Hexo #39

Open m01ly opened 3 years ago

m01ly commented 3 years ago

https://m01ly.github.io/2021/04/26/machine-learning-classify-knn/

的函数: 词频:FreqDist(words_list), 接受list类型的参数,返回词典,key是元素,value是元素出现的次数 fdist = FreqDist(dist).keys() dist_max=set(fdist[0:50]) dist_min = set(fdist[-50:]) set() 函数创建一个无序不重复元素集,可进行关系测试,删除重复数据,