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 = 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 = window.append(i)
ilf = IsolationForest(n_estimators=100,verbose=2,)
ilf.fit(window)
print "isolation update finished"
return window,ilf
onlinedetectWithlittleData.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录