# %% setup
import sys 
sys.path.append('../')
sys.path.append('../scripts')
from scripts.utilities import get_file_data
from perception_nassir import Perception
import numpy as np
import pandas as pd
import os
from scripts.utilities import get_file_data

# %%
classifiers = [
    # 'HBOS',  # to be ignored, first run in loop slower
    # 'HBOS',
    # 'IForest',
    # 'KNN',
    # 'LOF',
    # 'MCD',
    # 'OCSVM',
    'Perception',
]

classifiers[0]

# %% get file data
base_path = "../data/ODDS_multivariate/"
data_properties_df = None

dataset_name, X_original, y = get_file_data(base_path, 'musk.mat')

dataset_name

# %% 
predict_data = X_original
metrics_df = None
labels = np.empty(len(predict_data))
scores = np.array(len(predict_data))

# initialise classifier
clf, init_time = call_init_classifier(clf_name)

# fit classifier
clf, train_time = call_fit(clf, clf_name, train_data)

# predict using classifier to get labels and scores
labels, scores, predict_time = call_predict(
    clf,
    clf_name, predict_data)