Delete model_card.md
Browse files- model_card.md +0 -92
model_card.md
DELETED
@@ -1,92 +0,0 @@
|
|
1 |
-
---
|
2 |
-
license: mit
|
3 |
-
tags:
|
4 |
-
- pytorch
|
5 |
-
- anomaly-detection
|
6 |
-
- time-series
|
7 |
-
- gru
|
8 |
-
- sequence-model
|
9 |
-
- binary-classification
|
10 |
-
model-index:
|
11 |
-
- name: GRU Sequence Anomaly Detector
|
12 |
-
results: []
|
13 |
-
---
|
14 |
-
|
15 |
-
# GRU Sequence Anomaly Detector
|
16 |
-
|
17 |
-
This model uses a bidirectional GRU (Gated Recurrent Unit) architecture to detect anomalies in sequential tabular data β such as transaction records, log events, or sensor readings. It's designed for general-purpose anomaly detection and can be fine-tuned on domain-specific datasets.
|
18 |
-
|
19 |
-
---
|
20 |
-
|
21 |
-
## π§ Model Architecture
|
22 |
-
|
23 |
-
- **Type:** Bidirectional GRU
|
24 |
-
- **Input:** Sequence of numerical feature vectors `(batch_size, time_steps, input_dim)`
|
25 |
-
- **Output:** Binary classification (0 = normal, 1 = anomaly)
|
26 |
-
- **Layers:** 2-layer GRU β BatchNorm β Dense β Sigmoid
|
27 |
-
|
28 |
-
---
|
29 |
-
|
30 |
-
## π οΈ Intended Use
|
31 |
-
|
32 |
-
This model is ideal for:
|
33 |
-
- Transaction anomaly detection
|
34 |
-
- Time-series pattern disruption
|
35 |
-
- Sequential event log monitoring
|
36 |
-
|
37 |
-
It is **open for fine-tuning** using your labeled anomaly dataset via `fine_tune_template.py`.
|
38 |
-
|
39 |
-
---
|
40 |
-
|
41 |
-
## π How to Use
|
42 |
-
|
43 |
-
```python
|
44 |
-
import torch
|
45 |
-
from models.model import TxnAnomalyGRU
|
46 |
-
|
47 |
-
model = TxnAnomalyGRU(input_dim=32)
|
48 |
-
model.load_state_dict(torch.load("models/txn_anomaly_model.pt"))
|
49 |
-
model.eval()
|
50 |
-
```
|
51 |
-
|
52 |
-
Or use the ONNX version with ONNX Runtime:
|
53 |
-
|
54 |
-
```python
|
55 |
-
import onnxruntime
|
56 |
-
session = onnxruntime.InferenceSession("models/txn_anomaly_model.onnx")
|
57 |
-
outputs = session.run(None, {"input": your_input_array})
|
58 |
-
```
|
59 |
-
|
60 |
-
---
|
61 |
-
|
62 |
-
## π Fine-Tuning
|
63 |
-
|
64 |
-
To fine-tune on your own dataset:
|
65 |
-
|
66 |
-
```bash
|
67 |
-
python fine_tune_template.py --data your_dataset.csv
|
68 |
-
```
|
69 |
-
|
70 |
-
Ensure your data is preprocessed into sequences of the same input dimension (`input_dim=32` by default).
|
71 |
-
|
72 |
-
---
|
73 |
-
|
74 |
-
## π¦ Files Included
|
75 |
-
|
76 |
-
- `models/txn_anomaly_model.pt` β Pretrained PyTorch model
|
77 |
-
- `models/txn_anomaly_model.onnx` β ONNX export
|
78 |
-
- `fine_tune_template.py` β Script to fine-tune on your dataset
|
79 |
-
- `pipeline/main.py` β End-to-end pipeline
|
80 |
-
|
81 |
-
---
|
82 |
-
|
83 |
-
## π License
|
84 |
-
|
85 |
-
This model is released under the **MIT License**. You are free to use, modify, and distribute it for research or commercial purposes.
|
86 |
-
|
87 |
-
---
|
88 |
-
|
89 |
-
## π€ Author
|
90 |
-
|
91 |
-
Developed by [Your Name]
|
92 |
-
For contributions, bug reports, or questions, please use GitHub Issues.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|