Beispiel #1
0
 public DataSet ComputeCentroids(DataSet initialCentroids)
 => KMeans.ComputeCentroids(UpdateCentroids(), initialCentroids, RowLength);
 private Func <DataSet, DataSet> UpdateCentroids()
 => centroids =>
 Source
 .GroupBy(row => KMeans.GetNearestCentroid(centroids, row))
 .Select(CalculateCenter)
 .ToImmutableList();