ComeçarComece de graça

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 exercício faz parte do curso

Designing Machine Learning Workflows in Python

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# 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 e executar o código