This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding=utf-8 | |
| # auc值的大小可以理解为: 随机抽一个正样本和一个负样本,正样本预测值比负样本大的概率 | |
| # 根据这个定义,我们可以自己实现计算auc | |
| import random | |
| import time | |
| def timeit(func): | |
| """ | |
| 装饰器,计算函数执行时间 |