terrasensetk.performance.metrics package

Submodules

terrasensetk.performance.metrics.IMetrics module

class terrasensetk.performance.metrics.IMetrics.IMetrics[source]

Bases: object

Base class for metric calculation Based on the work present in: https://github.com/ECGomes/nilm_metrics/blob/master/metrics/metrics_base.py

callFunction(name, gt, pred)[source]
checkFunction(name)[source]
check_metrics(results, metric_list, normalization_value=None)[source]
Parameters
  • results – Results Array

  • metric_list – Set of metrics to calculate

  • normalization_value – The ymax-ymin, not required

Returns

Dataframe containing metrics for the Results objects

terrasensetk.performance.metrics.RegressionMetrics module

class terrasensetk.performance.metrics.RegressionMetrics.RegressionMetrics[source]

Bases: terrasensetk.performance.metrics.IMetrics.IMetrics

cmd_abse(state_gt, state_pred)[source]

Calculate the Average Error of the ground truth vs predicted values ae = sum()

cmd_ae(state_gt, state_pred)[source]

Calculate the Average Error of the ground truth vs predicted values ae = sum()

cmd_cv_rmsd(state_gt, state_pred)[source]

Calculates the 1 - Covariance of the RMSD inv_cv = 1 - (RMSE / mean(ground_truth))

cmd_eav1(state_gt, state_pred, alpha_param=1.4)[source]

Calculate energy accuracy

cmd_ee(state_gt, state_pred)[source]

Calculates the energy error of the predictions versus the ground truth values

cmd_mae(state_gt, state_pred)[source]

Calculates the Mean Absolute Error of the ground truth vs predicted values

cmd_psde(state_gt, state_pred)[source]

Percent Standard Deviation Explained: 1 - sqrt(1 - r-squared) Percent deviation measures the degree to which individual data points in a statistic deviate from the average measurement of that statistic.

cmd_rmse(gt, pred)[source]

Calculates the root mean squared values

cmd_rsquared(state_gt, state_pred)[source]

Calculates the r-squared value

cmd_sde(state_gt, state_pred)[source]

Calculate the standard deviation error

terrasensetk.performance.metrics.metric_utils module

terrasensetk.performance.metrics.metric_utils.aux_error_checking(state_gt, state_pred)[source]

Checks for list/array size incompatibility

terrasensetk.performance.metrics.metric_utils.aux_get_size(state_gt)[source]

Gets the size of list/array for iteration

Module contents