Methods for voting for a consensus model based on the metrics of fit_distributions
Source:R/find_consensus_model.R
find_consensus_model.Rd
Methods for voting for a consensus model based on the metrics of fit_distributions
Arguments
- models
a list of models, e.g. derived from
fit_distributions
- method
one of
weighted_majority_vote
andrra
as a method of determining the best method.rra
requires the packageRobustRankAggreg
- metric
metrics used to fit models. Metrics should be ordered in descending priority. The first metric in the vector will be used to return the
consensus
model for the distribution determined through voting.- distribution_prioritization
if
method
isweighted_majority_voting
, a list of ranked distributions, to break ties- weights
required if
method
isweighted_majority_voting
. weights of each metric to be multiplied by rankings. Weights should be in decreasing order. A higher weight results in a higher priority of the metric.
Value
a list of the best model for each metric and a consensus
model representing the model with the consensus distribution and the lowest weighted metric. Each model is a list of the following data:
- par
A character string denoting the region_id of the Histogram
- dist
The distribution name
- metric
The metric used to fit the distribution
- value
The fitted value of the metric function
- dens
A function that returns the density of the fitted distribution
- seg_start
start index of the interval
- seg_end
end index of the interval
Examples
if (FALSE) {
data <- observations_to_histogram(rnorm(10000, mean = 20, sd = 10))
data <- data$histogram_data
models <- fit_distributions(data)
find_consensus_models(models)
}