I am using K-medoids to reduce my data (potential future scenarios of a stock's price) from 500 scenarios to n = 25.
I computed the distance amtrix based on the Eucledian distance:
C = pairwise(Euclidean(), data', data')
where data is my 500 scenarios.
Then I run K-medoids:
kmedoids(C, n, init = :kmpp)
I get the error:
ERROR: AssertionError: !(isempty(grp))
Does any of you know what could be wrong?