statistics.std¶
Import path: earth2studio.statistics.std
Documentation¶
Statistic for calculating the sample standard deviation over a set of given dimensions.
Parameters:
-
reduction_dimensions(list[str]) –A list of names corresponding to dimensions to perform the statistical reduction over. Example: ['lat', 'lon']
-
weights(Tensor, default:None) –A tensor containing weights to assign to the reduction dimensions. Note that these weights must have the same number of dimensions as passed in reduction_dimensions. Example: if reduction_dimensions = ['lat', 'lon'] then assert weights.ndim == 2. By default None.
-
batch_update(bool, default:False) –Whether to applying batch updates to the standard deviation with each invocation of call. This is particularly useful when data is recieved in a stream of batches. Each invocation of call will return the running standard deviation. By default False.
__call__ ¶
Apply the sample standard deviation operation over the tensor x.
If batch_update was passed True upon metric initialization then this method returns the running sample standard deviation over all seen batches.
Parameters:
-
x(Tensor) –Input data to compute sample standard deviation.
-
coords(CoordSystem) –Coordinates referring to the input data, x.