Skip to content
项目

关于

Anomaly Detection Algorithms with Java

其他项目

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

AnomalyDetection

This Project aim of implements most of Anomaly Detection Algorithms in Java. If you want to contribute source code, please write Email to [email protected], or you can add my WeChat Number: JeemyJohn

1. Isolation Forest

This algorithm is realized in package iforest.
Algorithm Home Page: http://blog.csdn.net/u013709270/article/details/73436588

Source Paper:
             http://cs.nju.edu.cn/zhouzh/zhouzh.files/publication/icdm08b.pdf
             http://cs.nju.edu.cn/zhouzh/zhouzh.files/publication/tkdd11.pdf

Usage step:

  1. Create an object of class IForest
      IForest iForest = new IForest();
  1. Get samples and train
      double[][] samples = new double[1000][2];
      
      //get samples
      ...
      
      int[] ans = iForest.train(samples, 100);

     We have two declaration of function train, the implementation of them are same to each other. The only difference of them is one have default parameter. As the results of function train ans, if ans[i]==0 means it's an Anomaly(or Isolation) Point, else a Normal Point.

  1. Predict a new sample

     If a sample does not in samples, we can use function predict to judge it a Normal point or not.

     double[] sample = ...
     int label = iForest.predict(sample);
     System.out.println(label);

对机器学习,人工智能感兴趣的小伙伴可以加我微信:JeemyJohn,我拉你进我的机器学习群(群里很多高手哦!),或者扫描二维码!当然你也可以关注我的公众号,点击链接:燕哥带你学算法公众号团队简介

这里写图片描述

探索相关项目

加载中…