We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import sys sys.path.append('../') import pandas as pd import loglizer from loglizer.models import * from loglizer import dataloader, preprocessing
run_models = ['PCA', 'InvariantsMiner', 'LogClustering'] struct_log = r'C:\Users\privus\Downloads\HDFS.npz' # The benchmark dataset
if name == 'main': (x_tr, y_train), (x_te, y_test) = dataloader.load_HDFS(struct_log, window='session', train_ratio=0.5, split_type='uniform') benchmark_results = [] for _model in run_models: print('Evaluating {} on HDFS:'.format(_model)) if _model == 'PCA': feature_extractor = preprocessing.FeatureExtractor() x_train = feature_extractor.fit_transform(x_tr, term_weighting='tf-idf', normalization='zero-mean') model = PCA() model.fit(x_train)
elif _model == 'InvariantsMiner': feature_extractor = preprocessing.FeatureExtractor() x_train = feature_extractor.fit_transform(x_tr) model = InvariantsMiner(epsilon=0.5) model.fit(x_train) elif _model == 'LogClustering': feature_extractor = preprocessing.FeatureExtractor() x_train = feature_extractor.fit_transform(x_tr, term_weighting='tf-idf') model = LogClustering(max_dist=0.3, anomaly_threshold=0.3) model.fit(x_train[y_train == 0, :]) # Use only normal samples for training
The text was updated successfully, but these errors were encountered:
It is probably caused by Python version mismatch.
Sorry, something went wrong.
No branches or pull requests
import sys
sys.path.append('../')
import pandas as pd
import loglizer
from loglizer.models import *
from loglizer import dataloader, preprocessing
run_models = ['PCA', 'InvariantsMiner', 'LogClustering']
struct_log = r'C:\Users\privus\Downloads\HDFS.npz' # The benchmark dataset
if name == 'main':
(x_tr, y_train), (x_te, y_test) = dataloader.load_HDFS(struct_log,
window='session',
train_ratio=0.5,
split_type='uniform')
benchmark_results = []
for _model in run_models:
print('Evaluating {} on HDFS:'.format(_model))
if _model == 'PCA':
feature_extractor = preprocessing.FeatureExtractor()
x_train = feature_extractor.fit_transform(x_tr, term_weighting='tf-idf',
normalization='zero-mean')
model = PCA()
model.fit(x_train)
The text was updated successfully, but these errors were encountered: