public double[] Normalize(double[] data) { double max = data.Max(); return data.Select(d => d / max).ToArray(); }