Three novelty detectors
Finally, you know enough to run some tests on the use of a few anomaly detectors on the arrhythmia dataset. To test their performance, you will train them on an unlabeled training dataset, but then compare their predictions to the ground truth on the test data using their method .score_samples(). This time, you will be asked to import the detectors as part of the exercise, but you do have the data X_train, X_test, y_train, y_test preloaded as usual.
Deze oefening maakt deel uit van de cursus
Designing Machine Learning Workflows in Python
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Import the novelty detector
from sklearn.____ import ____ as onesvm
# Fit it to the training data and score the test data
svm_detector = ____.____(X_train)
scores = svm_detector.____(X_test)