Challenge: LOF in Practice
Завдання
Swipe to start coding
You are given a 2D dataset with clusters and some outliers.
Your task is to apply Local Outlier Factor (LOF) from sklearn.neighbors to identify which samples are locally inconsistent (low-density points).
Steps:
- Import and initialize
LocalOutlierFactorwithn_neighbors=20,contamination=0.1. - Fit the model on
Xand obtain predictions via.fit_predict(X). - Extract negative outlier factor values (
model.negative_outlier_factor_). - Print the number of detected outliers and example scores.
Remember:
-1= outlier;1= inlier.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 4. Розділ 4
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Awesome!
Completion rate improved to 4.55
Challenge: LOF in Practice
Свайпніть щоб показати меню
Завдання
Swipe to start coding
You are given a 2D dataset with clusters and some outliers.
Your task is to apply Local Outlier Factor (LOF) from sklearn.neighbors to identify which samples are locally inconsistent (low-density points).
Steps:
- Import and initialize
LocalOutlierFactorwithn_neighbors=20,contamination=0.1. - Fit the model on
Xand obtain predictions via.fit_predict(X). - Extract negative outlier factor values (
model.negative_outlier_factor_). - Print the number of detected outliers and example scores.
Remember:
-1= outlier;1= inlier.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 4. Розділ 4
single