Feature Generators

Module Contents

class xr_fresh.feature_calculator_series.abs_energy[source]

Bases: TimeModule

Returns the absolute energy of the time series, which is the sum of the squared values.

\[E = \sum_{i=1}^{n} x_i^2\]
Parameters:

x (numpy.ndarray) – Geowombat series object containing a time series of images.

Returns:

The absolute energy of the time series.

Return type:

E (numpy.ndarray)

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.absolute_sum_of_changes[source]

Bases: TimeModule

Returns the sum over the absolute value of consecutive changes in the series x.

\[\sum_{i=1}^{n-1} \mid x_{i+1} - x_i \mid\]
Parameters:

x (numpy.ndarray) – Geowombat series object contain time series of images.

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.autocorrelation(lag=1)[source]

Bases: TimeModule

Calculates the autocorrelation of the specified lag, according to the formula [1].

\[\frac{1}{(n-l)\sigma^{2}} \sum_{t=1}^{n-l}(X_{t}-\mu )(X_{t+l}-\mu)\]

where \(n\) is the length of the time series \(X_i\), \(\sigma^2\) its variance and \(\mu\) its mean. l denotes the lag.

References

[1] https://en.wikipedia.org/wiki/Autocorrelation#Estimation

Parameters:
  • x (numpy.ndarray) – Geowombat series object contain time series of images.

  • lag (int) – lag at which to calculate the autocorrelation (default: {1}).

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.count_above_mean(mean=None)[source]

Bases: TimeModule

Returns the number of values in x that are higher than the mean of x.

\[N_{\text{above}} = \sum_{i=1}^n (x_i > \bar{x})\]
Parameters:
  • x (numpy.ndarray) – Geowombat series object contain time series of images.

  • mean (int) – An integer to use as the “mean” value of the raster

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.count_below_mean(mean=None)[source]

Bases: TimeModule

Returns the number of values in x that are lower than the mean of x.

\[N_{\text{below}} = \sum_{i=1}^n (x_i < \bar{x})\]
Parameters:
  • x (numpy.ndarray) – Geowombat series object contain time series of images.

  • mean (int) – An integer to use as the “mean” value of the raster

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.doy_of_maximum(dates=None)[source]

Bases: TimeModule

Returns the day of the year (doy) location of the maximum value of the series - treats all years as the same.

Parameters:
  • dates (numpy.ndarray) – An array holding the dates of the time series as integers or as datetime objects.

  • x (numpy.ndarray) – Geowombat series object contain time series of images.

Returns:

The day of the year of the maximum value.

Return type:

int

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.doy_of_minimum(dates=None)[source]

Bases: TimeModule

Returns the day of the year (doy) location of the minimum value of the series - treats all years as the same.

Parameters:
  • dates (numpy.ndarray) – An array holding the dates of the time series as integers or as datetime objects.

  • x (numpy.ndarray) – Geowombat series object contain time series of images.

Returns:

The day of the year of the minimum value.

Return type:

int

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.kurtosis(fisher=True)[source]

Bases: TimeModule

Compute the sample kurtosis of a given array along the time axis.

\[G_2 = \frac{\mu_4}{\sigma^4} - 3\]

where \(\mu_4\) is the fourth central moment and \(\sigma\) is the standard deviation.

Parameters:
  • array (GeoWombat series object) – An object that contains geospatial and temporal metadata.

  • fisher (bool, optional) – If True, Fisher’s definition is used (normal ==> 0.0). If False, Pearson’s definition is used (normal ==> 3.0).

Returns:

Returns the kurtosis of x (calculated with the adjusted Fisher-Pearson standardized moment coefficient G2).

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.kurtosis_excess(Fisher=True)[source]

Bases: TimeModule

Compute the excess kurtosis of a given array along the time axis.

\[G_2 = \frac{\mu_4}{\sigma^4} - 3\]

where \(\mu_4\) is the fourth central moment and \(\sigma\) is the standard deviation.

Parameters:
  • array (GeoWombat series object) – An object that contains geospatial and temporal metadata.

  • fisher (bool, optional) – If True, Fisher’s definition is used (normal ==> 0.0). If False, Pearson’s definition is used (normal ==> 3.0).

Returns:

Returns the excess kurtosis of X (calculated with the adjusted Fisher-Pearson standardized moment coefficient G2).

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.large_standard_deviation(r=2)[source]

Bases: TimeModule

Boolean variable denoting if the standard dev of x is higher than ‘r’ times the range.

Parameters:

r (float, optional) – The percentage of the range to compare with. Default is 2.0.

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.longest_strike_above_mean(mean=None)[source]

Bases: TimeModule

Returns the length of the longest consecutive subsequence in x that is bigger than the mean of x.

Parameters:

x (numpy.ndarray) – Geowombat series object contain time series of images.

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.longest_strike_below_mean(mean=None)[source]

Bases: TimeModule

Returns the length of the longest consecutive subsequence in x that is smaller than the mean of x.

Parameters:

x (numpy.ndarray) – Geowombat series object contain time series of images.

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.maximum[source]

Bases: TimeModule

Returns the maximum value of the time series x.

\[x_{\text{max}}\]
Parameters:

x (numpy.ndarray) – Geowombat series object contain time series of images.

Returns:

The maximum value.

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(x)

Calculates the user function.

calculate(x)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.mean[source]

Bases: TimeModule

Returns the mean value of the time series x.

\[\bar{x} = \frac{1}{n} \sum_{i=1}^{n} x_i\]
Parameters:

x (numpy.ndarray) – Geowombat series object contain time series of images.

Returns:

The mean value.

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(x)

Calculates the user function.

calculate(x)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.mean_abs_change[source]

Bases: TimeModule

Returns the mean over the absolute differences between subsequent time series values which is

\[\frac{1}{n-1} \sum_{i=1}^{n-1} | x_{i+1} - x_{i} |\]
Parameters:

x (numpy.ndarray) – Geowombat series object contain time series of images.

Returns:

The mean absolute change.

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(x)

Calculates the user function.

calculate(x)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.mean_change[source]

Bases: TimeModule

Returns the mean over the differences between subsequent time series values which is

\[\frac{1}{n-1} \sum_{i=1}^{n-1} ( x_{i+1} - x_{i} )\]
Parameters:

x (numpy.ndarray) – Geowombat series object contain time series of images.

Returns:

The mean change.

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.mean_second_derivative_central[source]

Bases: TimeModule

Returns the mean value of a central approximation of the second derivative of the time series.

\[\frac{1}{2(n-2)} \sum_{i=1}^{n-2} \frac{1}{2} (x_{i+2} - 2 \cdot x_{i+1} + x_{i})\]
Parameters:

x (numpy.ndarray) – Geowombat series object contain time series of images.

Returns:

The mean second derivative.

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.median[source]

Bases: TimeModule

Returns the median of the time series x.

\[\tilde{x}\]
Parameters:

x (numpy.ndarray) – Geowombat series object contain time series of images.

Returns:

The median value.

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(x)

Calculates the user function.

calculate(x)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.minimum[source]

Bases: TimeModule

Returns the minimum value of the time series x.

\[x_{\text{min}}\]
Parameters:

x (numpy.ndarray) – Geowombat series object contain time series of images.

Returns:

The minimum value.

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(x)

Calculates the user function.

calculate(x)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.ols_slope_intercept(returns='slope')[source]

Bases: TimeModule

Calculate the slope, intercept, and R2 of the time series using ordinary least squares.

Parameters:
  • gw (array) – the time series data

  • returns (str, optional) – What to return, “slope”, “intercept” or “rsquared”. Defaults to “slope”.

Returns:

Return desired time series property array.

Return type:

array

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.quantile(q=None, method='linear')[source]

Bases: TimeModule

Calculates the q-th quantile of x. This is the value of x greater than q% of the ordered values from x.

Parameters:
  • x (numpy.ndarray) – Geowombat series object contain time series of images.

  • q (float) – Probability or sequence of probabilities for the quantiles to compute. Values must be between 0 and 1 inclusive.

Returns:

The q-th quantile of x.

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.ratio_beyond_r_sigma(r=2)[source]

Bases: TimeModule

Returns the ratio of values that are more than r times the standard deviation away from the mean of the time series.

\[P_{r} = \frac{1}{n} \sum_{i=1}^{n} (| x_i - \bar{x} | > r \cdot \sigma)\]
Parameters:
  • x (numpy.ndarray) – Geowombat series object contain time series of images.

  • r (float) – The number of standard deviations. Defaults to 2.

Returns:

The ratio of values beyond r sigma.

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.skewness[source]

Bases: TimeModule

Returns the skewness of x.

\[\frac{n}{(n-1)(n-2)} \sum \left( \frac{X_i - \overline{X}}{s} \right)^3\]
Parameters:
  • x (numpy.ndarray) – Geowombat series object contain time series of images.

  • axis (int, optional) – Axis along which to compute the kurtosis. Default is 0.

  • fisher (bool, optional) – If True, Fisher’s definition is used (normal=0). If False, Pearson’s definition is used (normal=3). Default is False.

Returns:

The skewness.

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.standard_deviation[source]

Bases: TimeModule

Returns the standard deviation of x.

\[\sqrt{ \frac{1}{N} \sum_{i=1}^{n} (x_i - \bar{x})^2 }\]
Parameters:

x (numpy.ndarray) – Geowombat series object contain time series of images.

Returns:

The standard deviation.

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(x)

Calculates the user function.

calculate(x)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.sum[source]

Bases: TimeModule

Returns the sum of all values in x.

\[S = \sum_{i=1}^{n} x_i\]
Parameters:

x (numpy.ndarray) – Geowombat series object contain time series of images.

Returns:

The sum of values.

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(x)

Calculates the user function.

calculate(x)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.symmetry_looking(r=0.1)[source]

Bases: TimeModule

Measures the similarity of the time series when flipped horizontally. Boolean variable denoting if the distribution of x looks symmetric.

\[| x_{\text{mean}} - x_{\text{median}} | < r \cdot (x_{\text{max}} - x_{\text{min}} )\]
Parameters:
  • x (numpy.ndarray) – Geowombat series object contain time series of images.

  • r (float) – A threshold value, the percentage of the range to compare with (default: 0.1)

Returns:

The symmetry measure.

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.ts_complexity_cid_ce(normalize=True)[source]

Bases: TimeModule

Returns the time series complexity measure CID CE.

\[\sqrt{ \sum_{i=1}^{n-1} ( x_{i} - x_{i-1})^2 }\]
Parameters:
  • x (numpy.ndarray) – Geowombat series object contain time series of images.

  • normalize – should the time series be z-transformed? (default: True)

Returns:

The complexity measure.

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.unique_value_number_to_time_series_length[source]

Bases: TimeModule

Returns a factor which is 1 if all values in the time series occur only once, and below one if this is not the case. In principle, it just returns

# of unique values / # of values

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(array)

Calculates the user function.

calculate(array)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.variance[source]

Bases: TimeModule

Returns the variance of x.

\[\sigma^2 = \frac{1}{N} \sum_{i=1}^{n} (x_i - \bar{x})^2\]
Parameters:

x (numpy.ndarray) – Geowombat series object contain time series of images.

Returns:

The variance.

Return type:

float

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(x)

Calculates the user function.

calculate(x)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)

class xr_fresh.feature_calculator_series.variance_larger_than_standard_deviation[source]

Bases: TimeModule

Returns 1 if the variance of x is larger than its standard deviation and 0 otherwise.

\[\sigma^2 > \sigma\]
Parameters:

x (numpy.ndarray) – Geowombat series object containing a time series of images.

Returns:

1 if variance is larger than standard deviation, 0 otherwise.

Return type:

int

Methods

__call__(w, array, band_dict)

Call self as a function.

calculate(x)

Calculates the user function.

calculate(x)[source]

Calculates the user function.

Parameters:

| (data (numpy.ndarray) – jax.Array | torch.Tensor | tensorflow.Tensor): The input array, shaped [time x bands x rows x columns].

Returns:

numpy.ndarray | jax.Array | torch.Tensor | tensorflow.Tensor:

Shaped (time|bands x rows x columns)