Let we have an array of integers e.g. Range@365
.
Each index has a specific value by which clusterization of integers should be done.
But these values cannot be calculated. It's WeatherData
or something like this.
They are presented as a data
List. So DistanceFunction
is:
df = Abs[data[[#1]]-data[[#2]]]&
I also tried next form:
idf[i_?IntegerQ, j_?IntegerQ]:= Abs[data[[i]]-data[[j]]];
But anyway
FindClusters[Range@365, df]
or
FindClusters[Range@365, (idf[#1,#2])&]
not work, with unclear errors.