ComenzarEmpieza gratis

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.

Este ejercicio forma parte del curso

Designing Machine Learning Workflows in Python

Ver curso

Ejercicio interactivo práctico

Prueba este ejercicio completando el código de muestra.

# 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)
Editar y ejecutar código