made stuff a bit more userfriendly

This commit is contained in:
Simon Klüttermann 2021-09-19 14:44:26 +02:00
parent c4eb649d28
commit d219cd5b5f
2 changed files with 17 additions and 6 deletions

19
main.py
View File

@ -1,14 +1,21 @@
#data loading
import numpy as np
from stroo import *
f=np.load("useragents.npz")
model=train_model(f["train"],n=2)
from stroo import train_model
#understands pure strings
#definitely not the best possible model
#so if this is at least >0.55 (on more complicated data) we should be able to do something with it
#also migth be included into an isolation forest
model=train_model(f["train"],n=3)
#calculate auc. Has disparity between normal, abnormal: np.mean(testy)~=0.065
print(model.eval(f["testx"],f["testy"]))
#in my tests reaches >0.99

4
requirements.txt Normal file
View File

@ -0,0 +1,4 @@
numpy
keras
tqdm
sklearn