From d219cd5b5fe3a1ef7743021f5f5e4ea98f3ba5ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Kl=C3=BCttermann?= Date: Sun, 19 Sep 2021 14:44:26 +0200 Subject: [PATCH] made stuff a bit more userfriendly --- main.py | 19 +++++++++++++------ requirements.txt | 4 ++++ 2 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 requirements.txt diff --git a/main.py b/main.py index 8d35c0d..55b0ecb 100644 --- a/main.py +++ b/main.py @@ -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 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..ab89ee0 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +numpy +keras +tqdm +sklearn