Found in the ML version up on HPCCSYstems:
The RecordID field in ML.Types.NumericField is defined as an UNSIGNED (unsigned8). The call to MyKMeans.Allegiances() returns a data structure of type ML.Mat.Types.Element which uses an UNSIGNED4 for the x and y fields - resulting in unusable allegiances if the record ids for the data being clustered actually uses all 8 bytes (e.g. ids generated using HASH64 for instance).
The fix I used locally was to change ML.Mat.Types to use an UNSIGNED8 for t_Index.