A set of python modules for anomaly detection
Project description
kenchi
This is a set of python modules for anomaly detection.
Requirements
Python (>=3.6)
matplotlib (>=2.1.1)
networkx (>=2.0)
numpy (>=1.14.0)
pandas (>=0.22.0)
scikit-learn (>=0.19.1)
scipy (>=1.0.0)
Installation
You can install via pip
pip install kenchi
or conda.
conda install -c y_ohr_n kenchi
Usage
import matplotlib.pyplot as plt
from kenchi.datasets import make_blobs
from kenchi.outlier_detection import SparseStructureLearning
# Generate the training data
X, _ = make_blobs(centers=1, random_state=1, shuffle=False)
# Fit the model according to the given training data
det = SparseStructureLearning(glasso_params={'alpha': 0.2}).fit(X)
# Plot the anomaly score for each training sample
det.plot_anomaly_score(linestyle='', marker='.')
plt.show()
License
The MIT License (MIT)
Copyright (c) 2017 Kon
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kenchi-0.7.0.tar.gz
(232.2 kB
view hashes)
Built Distribution
kenchi-0.7.0-py3-none-any.whl
(26.7 kB
view hashes)