View source: R/quality_criteria.R
quality_criteria | R Documentation |
Computation of common quality criteria for evaluation of model predictions performance: standard qc (average fold error, maximal error), bias (mean predictions error), precision (root mean square error), Student's t-Test, correlation test and linear regression.
quality_criteria(
run,
predictions = "PRED",
log_data = FALSE,
alpha = 0.05,
drop_empty_splits = FALSE
)
run |
|
predictions |
character. Name of the predictions column in the result
tables. Default is |
alpha |
numeric. Alpha risk. Used for bias confidence interval
computation and T-test comparing observations and predictions. Default is
|
drop_empty_splits |
logical. Drop empty split groups from QC results. |
For quality criteria computations, residuals are computed based on the formula:
pred_err_i = pred_i - obs_i
Standard QC
Maximal Error:
ME=max(|obs-pred|)
Absolute Average Fold Error:
AAFE=10^(mean(log10(pred/obs)))
For reference, see https://www.ncbi.nlm.nih.gov/pubmed/26696327
Bias: Mean Prediction Error (MPE)
Absolute:
mean(pred_err)
Confidence interval for a given alpha
Relative: mean(pred_err/obs)
Precision: Root Mean Square Error (RMSE)
Absolute: Student's t-Test estimate of
t.test((obs - pred)^2)
Confidence interval for a given
alpha
Relative: rmse/mean(obs)
Student's t-Test: observations vs predictions (paired, two-sided)
Returns estimate, statistic, p-value, degrees of freedom (parameter) and
confidence interval given alpha
.
Correlation test between observations and predictions
Returns estimate, statistic, p-value, degrees of freedom (parameter) and
confidence interval given alpha
.
Linear regression: pred
= intercept + slope * obs
Returns intercept and slope estimates, standard errors, statistics and
p-values given alpha
.
A list containing the quality criteria analysis results.
EXAMPLERUN %>% quality_criteria()
EXAMPLERUN %>% quality_criteria(alpha = 0.01)
EXAMPLERUN %>% group_by(SEX) %>% quality_criteria()
EXAMPLERUN %>% filter(STUD == 2) %>% quality_criteria()
EXAMPLERUN %>% filter(STUD != 2) %>% quality_criteria()
EXAMPLERUN %>% filter(AGE <= 24) %>% quality_criteria()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.