paddlets.metrics.metrics
- class MSE(mode: str = 'normal')[source]
Bases:
MetricMean Squared Error.
- Parameters
mode (str) – Supported metric modes, only normal and prob are valid values. Set to normal for non-probability use cases, set to prob for probability use cases. Note that mode = prob is currently not supported.
- _NAME
Metric name.
- Type
str
- _MAXIMIZE
Identify optimization direction.
- Type
bool
- metric_fn(y_true: ndarray, y_score: ndarray) float[source]
Mean squared error regression loss.
- Parameters
y_true (np.ndarray) – Ground truth (correct) target values.
y_score (np.ndarray) – Estimated target values.
- Returns
Mean squared error regression loss. A non-negative floating point value (the best value is 0.0).
- Return type
float
- class MAE(mode: str = 'normal')[source]
Bases:
MetricMean Absolute Error.
- Parameters
mode (str) – Supported metric modes, only normal and prob are valid values. Set to normal for non-probability use cases, set to prob for probability use cases. Note that mode = prob is currently not supported.
- _NAME
Metric name.
- Type
str
- _MAXIMIZE
Identify optimization direction.
- Type
bool
- metric_fn(y_true: ndarray, y_score: ndarray) float[source]
Mean absolute error regression loss.
- Parameters
y_true (np.ndarray) – Ground truth (correct) target values.
y_score (np.ndarray) – Estimated target values.
- Returns
Mean absolute error regression loss. A non-negative floating point value (the best value is 0.0).
- Return type
float
- class LogLoss(mode: str = 'normal')[source]
Bases:
MetricLog loss or cross-entropy loss.
- Parameters
mode (str) – Supported metric modes, only normal and prob are valid values. Set to normal for non-probability use cases, set to prob for probability use cases. Note that mode = prob is currently not supported.
- _NAME
Metric name.
- Type
str
- _MAXIMIZE
Identify optimization direction.
- Type
bool
- class MetricContainer(metric_names: List[str], prefix: str = '')[source]
Bases:
objectContainer holding a list of metrics.
- Parameters
metric_names (List[str]) – List of metric names.
prefix (str) – Prefix of metric names.
- _prefix
Prefix of metric names.
- Type
str
- _names
List of metric names associated with eval_name.
- Type
List[str]