Ideas for a DBSCAN with different epsilon values in each dimension?

7 ビュー (過去 30 日間)
Felipe Bayona
Felipe Bayona 2020 年 7 月 8 日
回答済み: Sreeram 2024 年 8 月 9 日
Hi Community
Im clustering some 3D data points usiang DBSCAN.
I want to define a non uniform neighnorhood radio for my DBSCAN. For example, using epsilon = 15 for X and Y axis, but epsilon = 5 for the Z axis.
Some ideas?
Thx

回答 (1 件)

Sreeram
Sreeram 2024 年 8 月 9 日
Hi Felipe,
I understand that you want to define a non-uniform neighbourhood radius for DBSCAN in MATLAB. However according to the documentation, the dbscan function in MATLAB does not allow non-uniform epsilon values.
In DBSCAN, the epsilon parameter defines the radius of the neighbourhood around each point. For your example, by scaling the Z-axis data by the ratio of epsilon along X and Y axes to epsilon along Z axis, you effectively normalize the different epsilon value for the Z axis. You can pass the epsilon value along X and Y axis to the dbscan function. This ensures that the distance calculations in the DBSCAN algorithm make use of the desired non-uniform neighbourhood radius.
Here's how you can code it:
% Desired epsilons
epsilon_xy = 15;
epsilon_z = 5;
% Scale the Z-axis data
scale_z = epsilon_xy / epsilon_z; % Scaling factor
scaled_data = data;
scaled_data(:, 3) = scaled_data(:, 3) * scale_z;
% Apply DBSCAN on the scaled data
labels = dbscan(scaled_data, epsilon_xy, minPts); % Note that epsilon_xy is used here
You may read more about how DBSCAN works here: https://www.mathworks.com/help/stats/dbscan-clustering.html
Hope it helps.

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by