Skip to content
Snippets Groups Projects
Commit e567431a authored by Desiree Wyrzykala's avatar Desiree Wyrzykala
Browse files

Merge branch 'run_cnn' into 'main'

adjust colors and check lstmad results

See merge request !20
parents 2f13bb15 9d71fc0b
Branches
No related tags found
1 merge request!20adjust colors and check lstmad results
This diff is collapsed.
......@@ -2,17 +2,16 @@ from CNN import CNN
import sys
import pathlib
sys.path.append(str(pathlib.Path.absolute)+ '../../')
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 = {
'window_size': [50, 100, 150],
'num_channel': [[32, 32, 40], [16, 32, 64]]
'lr': [5e-5, 1e-4, 5e-4, 8e-4, 1e-3]
}
def run_CNN(data_train, data_test, window_size=100, num_channel=[32, 32, 40], lr=0.0008, n_jobs=1):
clf = CNN(window_size=window_size, num_channel=num_channel, feats=data_test.shape[1], lr=lr, batch_size=128)
def run_CNN(data_train, data_test, window_size=100, num_channel=[32, 32, 40], lr=0.0008,batch_size=128, n_jobs=1):
clf = CNN(window_size=window_size, num_channel=num_channel, feats=data_test.shape[1], lr=lr, batch_size=batch_size)
clf.fit(data_train)
score = clf.decision_function(data_test)
return score.ravel()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment