MDOD是一个机器学习多维数据集的异常值检测python库。
pip install mdod
git clone https://github.com/mddod/mdod.git
cd mdod
python setup.py install
import numpy as np
import mdod
localFile = 'TestDataset.txt'
dets= np.loadtxt(localFile,delimiter=',')
# nd: 观察点在新增维度上的值
nd = 1
# sn: 统计的数量(计算值从大到小排序)
sn = 15
result = mdod.md(dets,nd,sn)
print(result)
data1,data2,data3,data4,data5,data6
data1,data2,data3,data4,data5,data6
data1,data2,data3,data4,data5,data6
...
[[data1 data2 data3 data4 data5 data6]
[data1 data2 data3 data4 data5 data6]
[data1 data2 data3 data4 data5 data6]
...]]
[value1, '[data1 data2 data3 data4 data5 data6]', '0']
[value2, '[data1 data2 data3 data4 data5 data6]', '1']
[value3, '[data1 data2 data3 data4 data5 data6]', '2']
...