Borrar filtros
Borrar filtros

I want to delete all of the outliers I got from DBSCAN clustering, which are labelled -1.

7 visualizaciones (últimos 30 días)
How do I delete outliers I got from DBSCAN clustering?

Respuestas (1)

Sharad
Sharad el 6 de Jul. de 2023
Hi,
As per my understanding, you are interested in deleting all the outliers obtained from DBSCAN clustering in MATLAB.
In order to do this, you can follow these steps:
  • The MATLAB dbscan function returns an array idx, containing the value that represents the cluster (cluster label) for each index or point in the input dataset.
idx = dbscan(X,epsilon,minpts)
  • The points which are outliers may be represented by -1 label, and you can easily locate those with the find() function.
outlierIndices = find(idx == -1);
  • Finally you can remove the outliers in the dataset like this.
newData = dataset;
newData(outlierIndices, :) = [];
Here are some documentation links that you might want to follow:
Thank you.

Productos


Versión

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by