Home Reference Source
public class | source

Statistics

Class for statistical processing for Matrix class.

  • These methods can be used in the Matrix method chain.
  • This class cannot be called directly.

Static Method Summary

Static Public Methods
public static

Correlation matrix or Correlation coefficient.

public static

Covariance matrix or Covariance value.

public static

Geometric mean.

public static

Mean absolute deviation.

public static

Maximum number.

public static

Arithmetic average.

public static

Median.

public static

Minimum number.

public static

Mode.

public static

Moment.

public static

Product of array elements.

public static

Skewness.

public static

Sort.

public static

The samples are standardize to a mean value of 0, standard deviation of 1.

public static

Standard deviation.

public static

Sum.

public static

Variance.

Static Public Methods

public static corrcoef(x: KMatrixInputData, y_or_type: KStatisticsSettings | KMatrixInputData, type: KStatisticsSettings): Matrix source

Correlation matrix or Correlation coefficient.

  • Get a correlation matrix from 1 matrix.
  • Get a correlation coefficient from 2 vectors.

Params:

NameTypeAttributeDescription
x KMatrixInputData
y_or_type KStatisticsSettings | KMatrixInputData
  • optional
type KStatisticsSettings
  • optional

Return:

Matrix

public static cov(x: KMatrixInputData, y_or_type: KStatisticsSettings | KMatrixInputData, type: KStatisticsSettings): Matrix source

Covariance matrix or Covariance value.

  • Get a variance-covariance matrix from 1 matrix.
  • Get a covariance from 2 vectors.

Params:

NameTypeAttributeDescription
x KMatrixInputData
y_or_type KStatisticsSettings | KMatrixInputData
  • optional
type KStatisticsSettings
  • optional

Return:

Matrix

public static geomean(x: KMatrixInputData, type: KStatisticsSettings): Matrix source

Geometric mean.

Params:

NameTypeAttributeDescription
x KMatrixInputData
type KStatisticsSettings
  • optional

Return:

Matrix

public static mad(x: KMatrixInputData, algorithm: string | ?number, type: KStatisticsSettings): Matrix source

Mean absolute deviation.

  • The "algorithm" can choose "0/mean"(default) and "1/median".

Params:

NameTypeAttributeDescription
x KMatrixInputData
algorithm string | ?number
  • optional
  • nullable: true
type KStatisticsSettings
  • optional

Return:

Matrix

public static max(x: KMatrixInputData, type: KStatisticsSettings): Matrix source

Maximum number.

Params:

NameTypeAttributeDescription
x KMatrixInputData
type KStatisticsSettings
  • optional

Return:

Matrix

max([A, B])

public static mean(x: KMatrixInputData, type: KStatisticsSettings): Matrix source

Arithmetic average.

Params:

NameTypeAttributeDescription
x KMatrixInputData
type KStatisticsSettings
  • optional

Return:

Matrix

public static median(x: KMatrixInputData, type: KStatisticsSettings): Matrix source

Median.

Params:

NameTypeAttributeDescription
x KMatrixInputData
type KStatisticsSettings
  • optional

Return:

Matrix

public static min(x: KMatrixInputData, type: KStatisticsSettings): Matrix source

Minimum number.

Params:

NameTypeAttributeDescription
x KMatrixInputData
type KStatisticsSettings
  • optional

Return:

Matrix

min([A, B])

public static mode(x: KMatrixInputData, type: KStatisticsSettings): Matrix source

Mode.

Params:

NameTypeAttributeDescription
x KMatrixInputData
type KStatisticsSettings
  • optional

Return:

Matrix

public static moment(x: KMatrixInputData, nth_order: number, type: KStatisticsSettings): Matrix source

Moment.

  • Moment of order n. Equivalent to the definition of variance at 2.

Params:

NameTypeAttributeDescription
x KMatrixInputData
nth_order number
type KStatisticsSettings
  • optional

Return:

Matrix

public static prod(x: KMatrixInputData, type: KStatisticsSettings): Matrix source

Product of array elements.

Params:

NameTypeAttributeDescription
x KMatrixInputData
type KStatisticsSettings
  • optional

Return:

Matrix

public static skewness(x: KMatrixInputData, type: KStatisticsSettings): Matrix source

Skewness.

Params:

NameTypeAttributeDescription
x KMatrixInputData
type KStatisticsSettings
  • optional

Return:

Matrix

public static sort(x: KMatrixInputData, order: string, type: KStatisticsSettings): Matrix source

Sort.

  • The "order" can choose "ascend"(default) and "descend".

Params:

NameTypeAttributeDescription
x KMatrixInputData
order string
  • optional
type KStatisticsSettings
  • optional

Return:

Matrix

public static standardization(x: KMatrixInputData, type: KStatisticsSettings): Matrix source

The samples are standardize to a mean value of 0, standard deviation of 1.

Params:

NameTypeAttributeDescription
x KMatrixInputData
type KStatisticsSettings
  • optional

Return:

Matrix

public static std(x: KMatrixInputData, type: KStatisticsSettings): Matrix source

Standard deviation.

Params:

NameTypeAttributeDescription
x KMatrixInputData
type KStatisticsSettings
  • optional

Return:

Matrix

public static sum(x: KMatrixInputData, type: KStatisticsSettings): Matrix source

Sum.

Params:

NameTypeAttributeDescription
x KMatrixInputData
type KStatisticsSettings
  • optional

Return:

Matrix

public static var(x: KMatrixInputData, type: KStatisticsSettings): Matrix source

Variance.

Params:

NameTypeAttributeDescription
x KMatrixInputData
type KStatisticsSettings
  • optional

Return:

Matrix