其他分享
首页 > 其他分享> > DDM(Drift Detection Method)

DDM(Drift Detection Method)

作者:互联网

DDM

DDM的思想也很简单,就是control the online error-rate of the algorithm(控制算法的在线错误率)。如果样本数据是稳定分布的,那么随着数据的输入,模型的错误率就会逐渐下降;当概率分布发生变化时,模型的错误率就会上升。所以DDM就是在线控制模型训练过程中的错误率。

DDM会为错误率设置两个阀值,一个是warning,另一个是drift。当样本数据中的第w个数据输入时,错误率达到了warning值,说明有样本概率分布改变的前兆,如果接连输入的数据没有让错误率降低,并且当第d个数据输入时错误率达到了drift值,则确定样本概率分布发生了变化,为了适应新的样本数据,模型就将以w之后的数据进行学习;而如果接连输入的数据让错误率降低了,则说明是一个false alarm(假报警)。

关于warning和drift这两个阀值的大小,是通过错误率的概率分布来确定的。假设输入的样本序列是这样的(xi, yi),xi是一个多维的特征,yi是真实值,模型对xi的预测值为yi^,通过比较yi^和yi就可以确定第i个样本的预测结果是False还是True,所以最后就可以得到这样一个Bernoulli distribution (伯努利分布)。这样第i个点的错误率就是这个点的False的概率观测值pi,同时这个点的标准差也可以得到 si = sqrt( pi ( 1 - pi ) / i ),根据confidence level(置信度)来确定warning和drift level。warning设置为95%的置信度,即pi + si >= min(p) + 2*min(s),drift设置为99%的置信度,即pi + si >= min(p) + 3*min(s)。

DDM方法主要是用于incremental或者是online算法,通过这个方法可以更好地选择合适的、稳定分布的数据集用于对模型的训练。

Klinkenberg提出了三种指标来衡量检测concept drift的效果。

 

accuracy(准确率)

recall(召回率)

precision(精确率)

Accuracy is the probalility, that a random instance is classified correctly, and is estimated as the number of correct classifications divided by the total number of classifications.

 

Recall is the probalility, that the classifier recognizes a relevant document as relevant, and is computed as the number of relevant documents found relevant by the classifier divided by the total number of relevant documents.

 

Precision is the probalility, that a document found relevant by the classifier actually is relevant, and is estimated by the number of relevant documents found relevant by the classifier divided by the total number of documents found relevant by the classifier.

除了上面三种,还有F1-Measure(综合评价指标,也称为F1-Score),是综合考虑Precision和Recall指标的方法

R、P、F1这几种指标也常用来衡量一些unbalanced的数据,例如要做异常点分类,1000个样本中只有10个异常,把所有数据都当作正常数据,那么也有99%的准确率,显然这不是我们想要的结果,所以这时用accuracy这一个指标就不合适了。

 

https://blog.csdn.net/FrankieHello/article/details/81988751

标签:relevant,错误率,drift,样本,Drift,number,Detection,DDM,Method
来源: https://www.cnblogs.com/dawwn/p/15117305.html