Method var
static member var: Tensor<'T> * int64 option -> 'T
Calculates the variance of the tensor.
Declaration
static member var: a:Tensor<'T> * ddof:int64 option -> 'T
Parameters
Type | Name | Description |
---|---|---|
Tensor<'T> | a | The tensor containing the source values. |
int64 option | ddof |
Returns
Type | Description |
---|---|
'T | The variance estimate. |
Remarks
The variance is calculated over all elements of the tensor.
The parameter ddof
specifies the difference between the number of elements and the
degrees of freedom for the computation of the variance. Use ddof=1
to obtain an unbiased estimate and
ddof=0
for a maximum-likelihood estimate.
Examples
let a = HostTensor.ofList2D [[1.0; 2.0; 3.0; 4.0]
[5.0; 6.0; 7.0; 8.0]]
let b = Tensor.var a