这里是3.x版本的Python,对代码做了一些修改。 其中画图的函数直接使用的是原代码中的函数,也做了一些修改。 书本配套的数据和2.7版本的源码可以在这里获取 :https://www.manning.com/books/machine-learning-in-action from math import lo…
from math import log
数据集链接
计算给定数据集的香农熵
def calcShannonEnt(dataSet):numEntrieslen(dataSet)labelCounts{}for featVec in dataSet:currentLabelfeatVec[-1]#print(calcShannonEnt函数输出featVec:)#print(featVec)if currentLabel not in la…
MinIO The access key ID you provided does not exist in our records 需要你在minio console 的identity user里设置一个新的User 会让填入access key 和secret key 。用这个账户的access key 和 secret key 来配置在代码里去登陆。
本来以为是用安装minio的时候设置的账号…