Clustering using Gower’s Distance
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);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); 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); gower’s distance, clustering MATLAB Answers — New Questions