Implement operator, that allows user compute n-th sample moment:
waveflow.stats.moment(sample, n=1, axis=0, type='CENTRAL')
Parameters:
- sample: tensor of any rank >= 1 - input data
- n: int scalar - order of the moment
- axis: int scalar - axis along which the moment is computed. If None, compute moment over the whole array of samples
- type: {RAW, CENTRAL}: type of moment; 'RAW' is just an expected value of X^n
Returns:
moment along the given axis or over all values if axis is None.
It should compute central moment by default (we want to stay consistent with scipy API). Try to compose it using existing tensorflow operators.
Implement operator, that allows user compute n-th sample moment:
waveflow.stats.moment(sample, n=1, axis=0, type='CENTRAL')Parameters:
Returns:
moment along the given axis or over all values if axis is None.
It should compute central moment by default (we want to stay consistent with scipy API). Try to compose it using existing tensorflow operators.