Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/j-sephb-lt-n/unsupervised-fraud-detection
Exploring anomaly detection using unsupervised methods
https://github.com/j-sephb-lt-n/unsupervised-fraud-detection
Last synced: about 23 hours ago
JSON representation
Exploring anomaly detection using unsupervised methods
- Host: GitHub
- URL: https://github.com/j-sephb-lt-n/unsupervised-fraud-detection
- Owner: J-sephB-lt-n
- License: gpl-3.0
- Created: 2024-04-19T07:54:44.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-04-29T08:20:28.000Z (6 months ago)
- Last Synced: 2024-04-29T23:18:35.936Z (6 months ago)
- Language: Python
- Homepage:
- Size: 71.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# unsupervised-fraud-detection
Exploring anomaly detection using unsupervised methods![](./models/evaluation_output/roc_auc.png)
This repo is still massively under construction
Simulate transaction data:
```bash
$ poetry run python -m data.simdata
Simulated dataset written to 'data/input/simdata.csv'
```Create model training dataset:
```bash
$ poetry run python -m feature_eng.create_train_data
reading input data from 'data/input/simdata.csv'
Finished exporting data to 'feature_eng/output/train_data.csv'
```Run unsupervised anomaly detection models:
```bash
$ poetry run python -m models.train_predict.dist_to_dst_clust_median
$ poetry run python -m models.train_predict.dist_to_src_clust_median
$ poetry run python -m models.train_predict.local_outlier_factor
$ poetry run python -m models.train_predict.isolation_forest
```Evaluate models:
```bash
$ poetry run python -m models.evaluate
Exported results to 'models/evaluation_output/'
```Explain predictions for a specific transaction:
```bash
$ poetry run python -m models.explain_prediction --tid 100420
```