Metrics.fromJson constructor

Metrics.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Metrics.fromJson(Map<String, dynamic> json) {
  return Metrics(
    errorMetrics: (json['ErrorMetrics'] as List?)
        ?.whereNotNull()
        .map((e) => ErrorMetric.fromJson(e as Map<String, dynamic>))
        .toList(),
    rmse: json['RMSE'] as double?,
    weightedQuantileLosses: (json['WeightedQuantileLosses'] as List?)
        ?.whereNotNull()
        .map((e) => WeightedQuantileLoss.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}