File size: 1,306 Bytes
b3f5ebd
 
 
 
 
 
 
 
dd6d3b2
cd03b6d
f958516
 
dd6d3b2
c231b50
8b751e5
dd6d3b2
528c2e7
179646a
 
528c2e7
179646a
 
cd03b6d
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
library_name: keras
pipeline_tag: text-classification
tags:
- security
- password
---

# Password security classifier
This is a keras model that gives a binary response showing how secure is a password.
I used this password list as a dataset + random password generation using the `random` library (I am aware of it being unsecure).
This model has a [huggingface space](https://huggingface.co/spaces/MoyAI/password-security). You can visit the link to try using the model online.
## Model & Training
The model was trained on 4,2MiB (`200 000` lines) of .csv data for 2 epochs on Adam with learning rate 0.00001, batch size 4 and mse loss.
The model embeds every input character with the ord() builtin python function. The model has `128 969` dense layer parameters.
## Evaluation
During training the model had:
**loss** - 0.0025
**accuracy** - 0.9972
The test metrics are:
**loss** - 0.0023
**accuracy** - 0.9972
## Model usage
The `start.py` file has a `clf` function that inputs a string of a password and responds with a 0-1 float value. 1 means secure and 0 insecure.
To train the model, create a `dataset.csv` file. Here's an example:
```csv
0,qwerty
0,123456
1,ISOdvsjs8r8
1,F(SEsDLxc__
```
After the `dataset.csv` file is created, now you can adjust the settings in the `net.py` file and run it.