BaşlayınÜcretsiz Başlayın

Anomaly score

Your visualization suggested that thyroid disease could be detected from anomalous hormone measurements.

In this exercise you'll use an isolation forest to generate an anomaly score for thyroid levels, and compare the resulting score against the true disease status.

Bu egzersiz

Introduction to Anomaly Detection in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Fit an isolation forest to the thyroid hormone measurements.
  • Generate anomaly scores for the thyroid data and append the result to thyroid as the new column iso_score.
  • Use the boxplot() function to compare the score distribution for patients with and without thyroid disease, using the label column.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Fit isolation forest
thyroid_forest <- iForest(___, ___ = 200, phi = 100)

# Anomaly score 
thyroid$iso_score <- predict(thyroid_forest, ___)

# Boxplot of the anomaly score against labels
boxplot(___ ~ ___, ___, col = "olivedrab4")
Kodu Düzenle ve Çalıştır