onlinedetect.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:onlineDetectForHadoop 作者: DawnsonLi 项目源码 文件源码
def updateWindow(window,buf,maxContainSize):
    if len(buf) >= maxContainSize:#??buf??
        print "buffer full "
        window = clusteringReminMost(window)
        print "window size after clustering without adding buffer :",len(window)
        for i in buf:
            window.append(i)
        ilf = IsolationForest(n_estimators=100,verbose=2,)
        ilf.fit(window)
        print "isolation update finished"

    else:                       #???????buf????
        print "higher than threads"
        for i in buf:
            window.append(i)
        ilf = IsolationForest(n_estimators=100,verbose=2,)
        ilf.fit(window)
        print "isolation update finished"
    return window,ilf
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号