These functions compute weights for ensemble model combinations based on validation scores. They handle score thresholding and weight normalization differently:
score2weight_*functions convert validation scores to weightsw_strech_*functions normalize weights after they are computed
Usage
w_strech_maxmin_squared(x)
w_strech_max_squared(x)
score2weight_mean(x, col = "validation_score", score_threshold = 0.7)
score2weight_min_mean(x, col = "validation_score", score_threshold = 0.7)
score2weight_invmean(x, col = "validation_score", score_threshold = 0.7)
score2weight_min_invmean(x, col = "validation_score", score_threshold = 0.7)Arguments
- x
[list or numeric]
Forscore2weight_*functions: a model result list with a column specified bycolparameter. Forw_strech_*functions: a numeric vector of weights.- col
[character(1)="validation_score"]
Column name inxcontaining validation scores.- score_threshold
[numeric(1)=0.7]
Minimum validation score threshold. Models with any validation score below this are assigned zero weight.
Details
Score to weight conversion functions:
score2weight_mean: Uses mean of all validation scoresscore2weight_min_mean: Uses mean only if all scores above thresholdscore2weight_invmean: Uses inverse of mean (harmonic mean-related)score2weight_min_invmean: Uses inverse mean only if all scores above threshold
Weight stretching/normalization functions:
w_strech_maxmin_squared: Rescales to 0,1, squares, then normalizes to sum to 1w_strech_max_squared: Divides by max, squares, then normalizes to sum to 1