df = Parser.load_parsed_data_from_file(filename + ".parsed_encoded_data") training_set_fraction = 0.7 training_data = df.loc[:training_set_fraction * float(df.shape[0])] ###### ###### ###### ###### ###### ###### START TRAINING ###### ###### ###### ###### ###### ###### import time stime = time.time() ### One Class Support Vector Machine ### import SVM from sklearn.externals import joblib OCSVM = SVM.trainOCSVM(training_data, tol=0.001, cache_size=2000, shrinking=False, nu=0.05, verbose=True) joblib.dump(OCSVM, filename=filename + ".fitted_SVM_model") clf = joblib.load(filename + ".fitted_SVM_model") ######################################## ### Autoassociative NN ### import Autoencoder import tensorflow as tf sess = tf.Session() x = tf.placeholder("float", [None, df.shape[1]]) autoencoder = Autoencoder.create(x, [48, 24, 12]) EWMACost = 0 Autoencoder.train_AE(df=training_data, sess=sess, x=x, denoising=False, verbose=False, autoencoder=autoencoder)