ixfx
    Preparing search index...
    • Returns a function that computes zscore-based normalisation.

      // Calculate necessary components
      const m = mean(data);
      const s = standardDeviation(data);

      // Get the function
      const fn = compute(m, s);

      // Use it
      fn(10); // Yields the normalised value

      It can be used to normalise a whole array

      const normalised = someData.map(fn);
      

      If you want to calculate for a whole array, use array.

      Parameters

      • mean: number

        Mean of data

      • standardDeviation: number

        Standard deviation of data

      Returns (value: number) => number