SiaNet/Metrics/BaseMetric.cs
/// <summary>
/// Gets the specified metric type.
/// </summary>
/// <param name="metricType">Type of the metric.</param>
/// <returns></returns>
Gets the specified metric type.
Gets the specified metric type .
internal static BaseMetric Get(MetricType metricType)
        {
            BaseMetric metric = null;
            switch (metricType)
            {
                case MetricType.Accuracy:
                    metric = new Accuracy();
                    break;
                case MetricType.BinaryAccurary:
                    metric = new BinaryAccuracy();
                    break;
                case MetricType.MSE:
                    metric = new MSE();
                    break;
                case MetricType.MAE:
                    metric = new MAE();
                    break;
                case MetricType.MAPE:
                    metric = new MAPE();
                    break;
                case MetricType.MSLE:
                    metric = new MSLE();
                    break;
                default:
                    break;
            }
            return metric;
        }
internal static BaseMetric Get ( MetricType metricType ) { BaseMetric metric = null ; switch ( metricType ) { case MetricType . Accuracy : metric = new Accuracy ( ) ; break ; case MetricType . BinaryAccurary : metric = new BinaryAccuracy ( ) ; break ; case MetricType . MSE : metric = new MSE ( ) ; break ; case MetricType . MAE : metric = new MAE ( ) ; break ; case MetricType . MAPE : metric = new MAPE ( ) ; break ; case MetricType . MSLE : metric = new MSLE ( ) ; break ; default : break ; } return metric ; }
Gets the specified metric type.
Gets the specified metric type .
None
metricType
MetricType
Type of the metric.
Type of the metric .