Skip to content
Snippets Groups Projects
Commit b5fa1c6f authored by DesireeWyrzylala's avatar DesireeWyrzylala
Browse files
parents 8b578e6b 6913bf7f
No related branches found
No related tags found
No related merge requests found
......@@ -111,4 +111,27 @@ VUS_PR : 0.39033909329157723
**Evaluieren der Inferential Reproducibility**
**Ggf. gleiches Prozedere wie bei multivariaten Daten**
\ No newline at end of file
**Ggf. gleiches Prozedere wie bei multivariaten Daten**
# Laufzeiten
+ Spanne gemessen zwischen POLY (voraussichtlich schnellster Algorithmus lt. Autoren) vs. KNN (voraussichtlich längster Algorithmus im Training lt. Autoren)
+ Geschätzte für alles anhand einer 101 kB Datei für Datensatz mit 321 MB
+ Getestet am:
+ Laptop: iCore5-8th, 4 Kerne, 1,80 GHz
+ Uni-Rechner: iCore5-8th, 6 Kerne, 3,40 GHz
**KNN**
+ Einzeldatei (100kB):
+ am Laptop : 265,55 s
+ am Uni-Rechner: : 118.31 s
+ Laufzeit insgesamt geschätzt:
+ am Laptop: 852435,76 s $\approx$ 14.207 min $\approx$ 237 h $\approx$ 9,9 d
+ am Uni-Rechner: 379760,36 s $\approx$ 6.329,34 min $\approx$ 105,5 h $\approx$ 4,4 d
**POLY**
+ Einzeldatei (100kB):
+ am Laptop: 180,77 s
+ am Uni-Rechner: 84,54 s
+ Laufzeit insgesamt geschätzt:
+ am Laptop: 580256,86 s $\approx$ 9.670,26 min $\approx$ 161,18 h $\approx$ 6,72 d
+ am Uni-Rechner: 271.356,89 s $\approx$ 4.522,62 min $\approx$ 75,38 h $\approx$ 3,14 d
\ No newline at end of file
#Measure Runtime for KNN and POLY for singe File
import sys
import os
import time
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))
if BASE_DIR not in sys.path:
sys.path.append(BASE_DIR)
from src.models.sofia_modelle.KNN import KNN
from src.models.desi.POLY import POLY
from src.utils.slidingWindows import find_length_rank
from src.run_model_wrapper import main
#optimal hyperparameters from autors: 'POLY': {'periodicity': 1, 'power': 4}
params = {
'n_neighbors': [10, 20, 30, 40, 50],
'method': ['largest', 'mean', 'median']
}
def run_Sub_KNN(data, n_neighbors=10, method='largest', periodicity=1, n_jobs=1):
slidingWindow = find_length_rank(data, rank=periodicity)
clf = KNN(slidingWindow=slidingWindow, n_neighbors=n_neighbors,method=method, n_jobs=n_jobs)
clf.fit(data)
score = clf.decision_scores_
return score.ravel()
model = 'Sub_KNN_runtime'
output_path = '../docs/evaluation/'
print('Start processing with KNN')
start_time = time.time()
#writes results in .csv
main(run_Sub_KNN,params,model,data_folders = './data/', model_type='unsupervised',output_dir = output_path)
end_time = time.time()
duration = end_time-start_time
print(f'Runtime for KNN: singe File {duration} s, Estimation for total dataset: {duration * 3210} s')
#optimal hyperparameters from autors: 'POLY': {'periodicity': 1, 'power': 4}
params = {
'periodicity': [1, 2, 3],
'power': [1, 2, 3, 4,5]
}
def run_POLY(data, periodicity=1, power=3, n_jobs=1):
slidingWindow = find_length_rank(data, rank=periodicity)
clf = POLY(power=power, window = slidingWindow)
clf.fit(data)
score = clf.decision_scores_
return score.ravel()
model = 'POLY_runtime'
print('Start processing with POLY')
start_time = time.time()
#writes results in .csv
main(run_POLY,params,model,data_folders = './data/', model_type='unsupervised',output_dir = output_path)
end_time = time.time()
duration = end_time-start_time
print(f'Runtime for POLY: singe File {duration} s, Estimation for total dataset: {duration * 3210} s')
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment