Clustering using Gower's Distance
Ältere Kommentare anzeigen
Hello all, I have a dataset that includes both categorical and numerical features, and I'm looking to perform clustering on it. I've read that Gower's Distance (code is available) is suitable for handling mixed data types. However, I am getting an "isnan" error. How can I fix the problem? Thanks for the help.
DataSet = readtable("Test.xlsx", 'ReadVariableNames', true);
GowerDst = gower(DataSet);
[Idx, C] = kmedoids(DataSet, 2, 'Distance', GowerDst);
Error using isnan
Invalid data type. Argument must be numeric, char, or logical.
Error in kmedoids (line 220)
wasnan = any(isnan(X),2);
^^^^^^^^
Error in Gower_Distance (line 9)
[Idx, C] = kmedoids(DataSet, 2, 'Distance', GowerDst);
2 Kommentare
the cyclist
am 22 Jul. 2025
Can you upload the data, or a representative sample that illustrates the problem? You can use the paper clip icon in the INSERT section of the toolbar.
MB
am 22 Jul. 2025
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Process Point Clouds finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!