I am trying to run FindClusters[hex, DistanceFunction -> HammingDistance[IntegerDigits[#, 2, 8], IntegerDigits[0, 2, 8]] &]
over a list of data but I keep getting the error
(the number of cluster DistanceFunction ... can only be either a positive integer or automatic
)
There is no problem running FindClusters[hex]
or FindClusters[hex, DistanceFunction -> CanberraDistance]
I have also tried using DistanceFunction -> HammingDistance[BaseForm[#, 2], BaseForm[16^^0, 2]] &
DistanceFunction -> HammingDistance[#, 16^^0] &
Sort of at a loss as to what to try next. Any suggestions?
My data is just a list of integers. e.g. {85,137,229,...}
DistanceFunction -> (HammingDistance[IntegerDigits[#, 2, 8], IntegerDigits[0, 2, 8]] &)
$\endgroup$hex
anddist..
$\endgroup$( )
to make sure that the&
operator binds to the right thing, i.e.OptionName -> (something something &)
. $\endgroup$