MeanAbsolutePercentageError

public class MeanAbsolutePercentageError

A metric that computes the mean of absolute difference between labels and predictions.

Inherited Constants

Public Constructors

MeanAbsolutePercentageError(Ops tf, String name, long seed, Class<T> type)
Creates a Mean Absolute Error metric

Public Methods

Operand<T>
call(Operand<? extends TNumber> labels, Operand<? extends TNumber> predictions)
Calculates the weighted loss between labels and predictions

Inherited Methods

Public Constructors

public MeanAbsolutePercentageError (Ops tf, String name, long seed, Class<T> type)

Creates a Mean Absolute Error metric

Parameters
tf the TensorFlow Ops
name the name of this metric, if null then metric name is getSimpleName().
seed the seed for random number generation. An initializer created with a given seed will always produce the same random tensor for a given shape and data type.
type the type for the variables and result

Public Methods

public Operand<T> call (Operand<? extends TNumber> labels, Operand<? extends TNumber> predictions)

Calculates the weighted loss between labels and predictions

Parameters
labels the truth values or labels
predictions the predictions
Returns
  • the loss