Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface INumberStats

number statistics object

Hierarchy

  • Omit<IBoxPlot, "items">
  • INumericStats<number>
    • INumberStats

Index

Properties

center?: number

optional center for diverging

count: number

number of values (valid + missing)

depth: number

in case of nested arrays what is the max nested depth

flatCount: number

number of items in the array

flatItems: readonly number[]

the items in this stats

flatMissing: number

number of missing items in the array

hist: readonly Readonly<IBin<number>>[]

histogram

iqr: number

inter quantile range (q3 - q1)

items: readonly (number | (readonly number[]) | Set<number>)[]

the items in this stats

kde: KernelDensityEstimator
max: number

maximum value in the given data

maxBin: IBin<number>

maximal items in a bin

mean: number

arithmetic mean

median: number

median value in the given data

min: number

minimum value in the given data

missing: number

number of missing values (NaN, null, undefined) in the data

outlier: readonly number[]

outliers that are outside of the whiskers on both ends

q1: number

25% quantile

q3: number

75% quantile

variance: number

variance

whiskerHigh: number

whisker / fence above the 75% quantile (upper one) by default is computed as the largest element that satisfies (e <= q3 + 1.5IQR && e >= q1)

whiskerLow: number

whisker / fence below the 25% quantile (lower one) by default is computed as the smallest element that satisfies (e >= q1 - 1.5IQR && e <= q1)

Methods

  • [toPrimitive](hint: "default"): string
  • [toPrimitive](hint: "string"): string
  • [toPrimitive](hint: "number"): number
  • [toPrimitive](hint: string): string | number
  • Converts a Stats object to a string.

    Parameters

    • hint: "default"

    Returns string

  • Converts a Stats object to a string.

    Parameters

    • hint: "string"

    Returns string

  • Converts a Stats object to a number.

    Parameters

    • hint: "number"

    Returns number

  • Converts a Stats object to a string or number.

    throws

    {TypeError} If 'hint' was given something other than "number", "string", or "default".

    Parameters

    • hint: string

      The strings "number", "string", or "default" to specify what primitive to return.

    Returns string | number

    A number if 'hint' was "number", a string if 'hint' was "string" or "default".

  • color(v: T): string
  • converts a given (normalized) value to a color

    Parameters

    • v: T

    Returns string

  • format(v: T): string
  • converts the given value to a label

    Parameters

    • v: T

    Returns string

  • invert(v: number): T
  • invert operation given a number between 0 and 1 convert it back

    Parameters

    • v: number

    Returns T

  • scale(v: T): number
  • converts the given value to a value between 0 and 1

    Parameters

    • v: T

    Returns number

Generated using TypeDoc