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

Assessing smallest clusters

In this exercise you're going to have a look at the clusters that came out of DBSCAN, and flag certain clusters as fraud:

  • you first need to figure out how big the clusters are, and filter out the smallest
  • then, you're going to take the smallest ones and flag those as fraud
  • last, you'll check with the original labels whether this does actually do a good job in detecting fraud.

Available are the DBSCAN model predictions, so n_clusters is available as well as the cluster labels, which are saved under pred_labels. Let's give it a try!

Bu egzersiz

Fraud Detection in Python

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

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Count observations in each cluster number
counts = np.bincount(____[____ >= 0])

# Print the result
print(counts)
Kodu Düzenle ve Çalıştır