var#

Compute the variance of a tensor. ddof can be used optionally to control the bias term in the denominator

template<typename InType, int D>
__MATX_INLINE__ auto matx::var(const InType &in, const int (&dims)[D], int ddof = 1)#

Compute a variance reduction

Computes the variance of the input according to the output tensor rank and size

Template Parameters:
  • InType – Input data type

  • D – Num of dimensions to reduce over

Parameters:
  • in – Input data to reduce

  • dims – Array containing dimensions to reduce over

  • ddof – Delta Degrees Of Freedom used in the divisor of the result as N - ddof. Defaults to 1 to give an unbiased estimate

Returns:

Operator with reduced values of variance computed

template<typename InType>
__MATX_INLINE__ auto matx::var(const InType &in, int ddof = 1)#

Compute a variance reduction

Computes the variance of the input according to the output tensor rank and size

Template Parameters:

InType – Input data type

Parameters:
  • in – Input data to reduce

  • ddof – Delta Degrees Of Freedom used in the divisor of the result as N - ddof. Defaults to 1 to give an unbiased estimate

Returns:

Operator with reduced values of variance computed

Examples#

(t0 = var(t1)).run(exec);