temporarily located at ithaca/source/rank_repres.R
inputs:
data (data.table) with three variables: dataset, date, value
method (character) with seven options: mean, var (variance), slope, kge (Kling–Gupta Efficiency), tss (Taylor Skill Score), kld (Kullback–Leibler Divergence), all (default)
ensemble (character) with two options: mean, median (default)
output:
data.table with representativeness metric based on the selected method with respect to the ensemble mean/median.
For any method other than "all" output has two variables: dataset, repres_metric
For method "all" output has seven variables: dataset, mean, variance, slope, kge, tss, kld
Note
The representativeness metric is computed as 1 - abs((Xs - Xo)/Xo)
Where Xs is the mean/variance/slope of a dataset, and Xo is the corresponding mean/variance/solpe of the ensemble.
In other words, a relative difference of 100% or higher is deemed as not representative (repres_metric = 0)
closes #167
temporarily located at ithaca/source/rank_repres.R inputs: data (data.table) with three variables: dataset, date, value method (character) with seven options: mean, var (variance), slope, kge (Kling–Gupta Efficiency), tss (Taylor Skill Score), kld (Kullback–Leibler Divergence), all (default) ensemble (character) with two options: mean, median (default) output: data.table with representativeness metric based on the selected method with respect to the ensemble mean/median. For any method other than "all" output has two variables: dataset, repres_metric For method "all" output has seven variables: dataset, mean, variance, slope, kge, tss, kld
Note
The representativeness metric is computed as 1 - abs((Xs - Xo)/Xo) Where Xs is the mean/variance/slope of a dataset, and Xo is the corresponding mean/variance/solpe of the ensemble. In other words, a relative difference of 100% or higher is deemed as not representative (repres_metric = 0)
Demo