piglot.utils.reductions.NegateReduction

class NegateReduction(reduction: Reduction)[source]

Bases: Reduction

Negate the result of another reduction function.

Methods

reduce

Reduce the input data to a single value.

reduce_torch

Reduce the input data to a single value.

test_reduction

Test the reduction function to check batch processing.

reduce(time: ndarray, data: ndarray, params: ndarray) ndarray

Reduce the input data to a single value.

Parameters

timenp.ndarray

Time points of the response.

datanp.ndarray

Data points of the response.

paramsnp.ndarray

Parameters for the given responses.

Returns

np.ndarray

Reduced value of the data.

reduce_torch(time: Tensor, data: Tensor, params: Tensor) Tensor[source]

Reduce the input data to a single value.

Parameters

timenp.ndarray

Time points of the response.

datanp.ndarray

Data points of the response.

paramsnp.ndarray

Parameters for the given responses.

Returns

np.ndarray

Reduced value of the data.

test_reduction() None

Test the reduction function to check batch processing.