From 0b98aee265262317352c6e67ebf3bd9b03bfcda0 Mon Sep 17 00:00:00 2001 From: DesireeWyrzylala <74858504+DesireeWyrzylala@users.noreply.github.com> Date: Thu, 13 Feb 2025 20:54:39 +0100 Subject: [PATCH] fix file suffix --- docs/evaluation/Vergleich der Ergebnisse.md | 12 +++ src/models/desi/test_hyperparameters.ipynb | 80 +++++++++++++++++++ ...call_sub_iforestpy => call_sub_iforest.py} | 0 3 files changed, 92 insertions(+) create mode 100644 src/models/desi/test_hyperparameters.ipynb rename src/models/sofia_modelle/{call_sub_iforestpy => call_sub_iforest.py} (100%) diff --git a/docs/evaluation/Vergleich der Ergebnisse.md b/docs/evaluation/Vergleich der Ergebnisse.md index 7fa4db5..0871f39 100644 --- a/docs/evaluation/Vergleich der Ergebnisse.md +++ b/docs/evaluation/Vergleich der Ergebnisse.md @@ -538,6 +538,18 @@ + Daphnet: 0.036445 (MGAB: 0.085299) + nach VUS-PR: + MGAB: 0.036645 (vgl. MGAB 0.01, + 0.027, $\approx$ 270 %; Daphnet: 0.039747) + +**TAO DATENSATZ** +*Optimale Hyperparameter der Autoren:* ++ {'periodicity': 2, 'n_clusters': 10} +*Hyperparameter nach Tuning pro Datensatz:* ++ {'periodicity': 1, 'n_clusters': 30} ,257_TAO_id_1_Environment_tr_500_1st_3.csv ++ {'periodicity': 3, 'n_clusters': 20},258_TAO_id_2_Environment_tr_500_1st_4.csv ++ {'periodicity': 2, 'n_clusters': 40},259_TAO_id_3_Environment_tr_500_1st_7.csv +*Werte mit optimalen Hpyerparametern der Autoren:* ++ 257_TAO_id_1_Environment_tr_500_1st_3.csv: ++ 258_TAO_id_2_Environment_tr_500_1st_4.csv: ++ 259_TAO_id_3_Environment_tr_500_1st_7.csv # Sub-OCSVM + Prozessor: CPU + Modell: iCore 5 8th diff --git a/src/models/desi/test_hyperparameters.ipynb b/src/models/desi/test_hyperparameters.ipynb new file mode 100644 index 0000000..aac5ce7 --- /dev/null +++ b/src/models/desi/test_hyperparameters.ipynb @@ -0,0 +1,80 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import sys\n", + "import pathlib\n", + "sys.path.append(str(pathlib.Path.absolute)+ '../../')\n", + "from src.utils.slidingWindows import find_length_rank\n", + "from src.run_model_wrapper import main\n", + "from src.models.ahmad.KMeansAD import KMeansAD\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#Hyperparamater\n", + "params = {'periodicity': 2, 'n_clusters': 10}" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#Fit Funktion\n", + "def run_KMeansAD_U(data, n_clusters=20, periodicity=1,n_jobs=1):\n", + " slidingWindow = find_length_rank(data, rank=periodicity)\n", + " clf = KMeansAD(k=n_clusters, window_size=slidingWindow, stride=1, n_jobs=n_jobs)\n", + " score = clf.fit_predict(data)\n", + " return score.ravel()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "model = 'run_KMeansAD_U'\n", + "output_path = '../../../docs/evaluation/'" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.3" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/src/models/sofia_modelle/call_sub_iforestpy b/src/models/sofia_modelle/call_sub_iforest.py similarity index 100% rename from src/models/sofia_modelle/call_sub_iforestpy rename to src/models/sofia_modelle/call_sub_iforest.py -- GitLab