Class MeanAbsolutePercentageError
The mean absolute percentage error (MAPE), also known as mean absolute percentage deviation (MAPD), is a measure of prediction accuracy of a forecasting method in statistics, for example in trend estimation, also used as a Loss function for regression problems in Machine Learning.
Inherited Members
Namespace: SiaNet.Losses
Assembly: SiaNet.dll
Syntax
public class MeanAbsolutePercentageError : BaseLoss
Constructors
| Improve this Doc View SourceMeanAbsolutePercentageError()
Initializes a new instance of the MeanAbsolutePercentageError class.
Declaration
public MeanAbsolutePercentageError()
Methods
| Improve this Doc View SourceBackward(Tensor, Tensor)
Backpropagation method to calculate gradient of the loss function
Declaration
public override Tensor Backward(Tensor preds, Tensor labels)
Parameters
Type | Name | Description |
---|---|---|
Tensor | preds | The predicted result. |
Tensor | labels | The true result. |
Returns
Type | Description |
---|---|
Tensor |
Overrides
| Improve this Doc View SourceForward(Tensor, Tensor)
Forwards the inputs and calculate the loss.
Declaration
public override Tensor Forward(Tensor preds, Tensor labels)
Parameters
Type | Name | Description |
---|---|---|
Tensor | preds | The predicted result. |
Tensor | labels | The true result. |
Returns
Type | Description |
---|---|
Tensor |