from:http://kubicode.me/2016/09/19/Machine%20Learning/AUC-Calculation-by-Python/ AUC介绍 AUC(Area Under Curve)是机器学习二分类模型中非常常用的评估指标,相比于F1-Score对项目的不平衡有更大的容忍性,目前常见的机器学习库中(比如scikit-learn)一般也都是集成该指标的计算,其计算原理可以参考这个ROC和AUC介绍以及如何计算AUC,但是有时候模型是单独的或者自己编写的,此时想要评
导入必要的第三方库 from requests import get import matplotlib.pyplot as plt /usr/lib/python3/dist-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment. warnings.warn('Matplotlib is b
clear;clc;close all format compact %% 正态分布的拟合 % 生成随机数 num = 50; y = randn(1000,1); x = 1:num; y = hist(y,num); xx = x(:); yy = y(:); % Set up fittype and options. ft = fittype('y0+(a/(w*sqrt(pi/2)))*exp(-2*((x-xc)/w).^2)', 'independent', 'x', 'depend
前些日子在做绩效体系的时候,遇到了一件囧事,居然忘记怎样在Excel上拟合正态分布了,尽管在第二天重新拾起了Excel中那几个常见的函数和图像的做法,还是十分的惭愧.实际上,当时有效偏颇了,忽略了问题的本质,解决数据分析和可视化问题,其实也是Python的拿手好戏. 例如,画出指定区间的一个多项式函数: Python 代码如下: import numpy as np import matplotlib.pyplot as plt X = np.linspace(-4, 4, 1024) Y =