stats — QuadratiK 1.0.0 documentation

Skip to main content
`Ctrl`+`K`

# stats

QuadratiK.tools.stats(x, y=None)

  The stats function calculates statistics for one or multiple groups of data.

  ## Parameters

  > xnumpy.ndarray, pandas.DataFrame

  >   Data for which statistics is to be calculated.

  > ynumpy.ndarray, pandas.DataFrame, optional

  >   The parameter y is an optional input that can be either another set of observations, or the associated labels for observations (data points).

  ## Returns

  > summary statisticspandas.DataFrame

  >   Summary statistics of the input data.

  ## Examples

      >>> import numpy as np
      >>> from QuadratiK.tools import stats
      >>> np.random.seed(42)
      >>> X = np.random.randn(100,4)
      >>> stats(X)
      ...           Feature 0  Feature 1  Feature 2  Feature 3
          Mean     -0.009811   0.033746   0.022496   0.043764
          Std Dev   0.868065   0.952234   1.044014   0.982240
          Median   -0.000248  -0.024646   0.068665   0.075219
          IQR       1.244319   1.111478   1.318245   1.506492
          Min      -2.025143  -1.959670  -3.241267  -1.987569
          Max       2.314659   3.852731   2.189803   2.720169