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

LOF vs kNN

It is common to look first at the points with highest anomaly scores before taking any action. When several algorithms are used, the points with highest scores may differ.

In this final exercise, you'll calculate new LOF and kNN distance scores for the wine data, and print the highest scoring point for each.

Bu egzersiz

Introduction to Anomaly Detection in R

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

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Scaled wine data
wine_scaled <- scale(wine)

# Calculate distance matrix
wine_nn <- 

# Append score column to data
wine$score_knn <-
Kodu Düzenle ve Çalıştır