As we mentioned in the previous chapter, DBSCAN algorithm classifies points as core, border, and noise. As a result, we can use this algorithm to clean our data from outliers. Let's create DBSCAN model, clean data, and look at the results.
Your task is to train DBSCAN model on the circles dataset, detect noise points, and remove them. Look at the visualization and compare data before and after cleaning. You have to:
- Import the
- Use DBSCAN class and
.fit()method of this class.
.labels_attribute of DBSCAN class.
clustering.labels_==-1to detect noise.
Everything was clear?