turicreate.SArray.cumulative_var

SArray.cumulative_var()

Return the cumulative variance of the elements in the SArray.

Returns an SArray where each element in the output corresponds to the variance of all the elements preceding and including it. The SArray is expected to be of numeric type, or a numeric vector type.

Returns:
out : SArray[int, float]

Notes

  • Missing values are ignored while performing the cumulative aggregate operation.

Examples

>>> sa = SArray([1, 2, 3, 4, 0])
>>> sa.cumulative_var()
dtype: float
rows: 3
[0.0, 0.25, 0.6666666666666666, 1.25, 2.0]