https://github.com/stratosphereips/number-anomaly-detector
An anomaly detector for numbers
https://github.com/stratosphereips/number-anomaly-detector
anomaly-detection
Last synced: 6 months ago
JSON representation
An anomaly detector for numbers
- Host: GitHub
- URL: https://github.com/stratosphereips/number-anomaly-detector
- Owner: stratosphereips
- Created: 2021-06-27T10:26:59.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-19T13:46:01.000Z (over 2 years ago)
- Last Synced: 2025-09-05T01:37:22.562Z (11 months ago)
- Topics: anomaly-detection
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Citation: CITATION.cff
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# Number Anomaly Detector
- Author: Sebastian Garcia (eldraco@gmail.com, @eldracote)
An anomaly detector for numbers.
You can give a file with one number per line and it will print the anomalies.
You can also give numbers in the STDIN and it will print the anomalies every X amount of numbers.
## Dependencies
Please install the following dependencies:
- pyod: PyOD is a comprehensive and scalable Python toolkit for detecting outlying objects in multivariate data.
```
pip install pyod
```
## Usage
### From a file
```
$ ./number_anomaly_detector.py -f test-numbers.txt
Simple Number Anomaly Detector. Version: 0.1
Author: Sebastian Garcia (eldraco@gmail.com)
Top anomalies
values score
35345 3.129754
24562 1.766415
2 1.338806
```
### From STDIN
```
$ cat test-numbers.txt | ./number_anomaly_detector.py
Simple Number Anomaly Detector. Version: 0.1
Author: Sebastian Garcia (eldraco@gmail.com)
Top anomalies
values score
35345 1.999886
Top anomalies
values score
35345 3.331550
2 1.284752
Top anomalies
values score
35345 3.129754
24562 1.766415
2 1.338806
```
# Performace
Using the PCA model, is capable of training and testing 1 million numbers in 0.38 seconds
# Docker
To run the tool using Docker use our Docker Hub image:
```bash
docker run stratosphereips/number_anomaly_detector:latest number_anomaly_detector.py -f test-numbers.txt
```