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();