从蒙特卡罗抽样模型输出计算不确定性度量。
mc-uncertaint的Python项目详细描述
mc不确定度
用于蒙特卡罗抽样模型输出的不确定性估计函数。
安装
pip install mc-uncertainty
用法
importmc_uncertaintyasmcu# All functions accept data with shape (mc_samples, n, classes)data=np.array(...# Varianceprint(mcu.variance(data).shape)# [n, classes]# Entropyprint(mcu.entropy(data).shape)# [mc_samples, n]# Predicted entropyprint(mcu.predicted_entropy(data).shape)# [n,]# Mutual informationprint(mcu.mutual_information(data).shape)# [n,]