Opinion Pooling: private API
PortfolioOptimisers.robust_probabilities — Function
robust_probabilities(ow::VecNum, args...)
robust_probabilities(ow::VecNum, pw::MatNum, p::Number)Compute robust opinion probabilities for consensus formation in opinion pooling.
robust_probabilities adjusts the vector of opinion probabilities (ow) used in opinion pooling algorithms to account for robustness against outlier or extreme opinions. If a penalty parameter p is not nothing, the method penalises opinions that diverge from the consensus by down-weighting them according to their Kullback-Leibler divergence from the pooled distribution. If no penalty parameter is set, the original opinion probabilities are returned unchanged.
Mathematical definition
\[\begin{align} D_k &= \sum_{t=1}^{T} p_{tk} \log\!\frac{p_{tk}}{c_t}\,, \quad c_t = \sum_{k=1}^{K} \alpha_k p_{tk}\,, \\ \tilde{\alpha}_k &= \frac{\alpha_k \exp(-\rho D_k)}{\sum_{j=1}^{K} \alpha_j \exp(-\rho D_j)}\,. \end{align}\]
Where:
- $\alpha_k$: Opinion probability of expert $k$, the input
ow. - $p_{tk}$: Scenario weight for scenario $t$ from expert $k$, column $k$ of
pw. - $c_t$: Consensus scenario weight.
- $D_k$: Kullback-Leibler divergence from expert $k$ to the consensus.
- $\rho$: Penalty parameter, the argument
p. - $T$: Number of observations.
The consensus $\boldsymbol{c}$ is always the linear pool, whatever OpinionPoolingAlgorithm the caller selected. The divergence is also directed: it reads $D_k = \mathrm{KL}(\boldsymbol{p}_k \,\|\, \boldsymbol{c})$, from each opinion to the consensus. The kld field of the result runs the other way, from the consensus to each opinion, so the two are different numbers and neither is the other's mirror.
$\exp(-\rho D_k)$ decreases in $D_k$, so a larger $\rho$ concentrates the mass on the opinions nearest the consensus. As $\rho$ grows without bound the pool tends to the single opinion of smallest divergence.
Algorithm
The steps below are those of the three-argument method. The args... method takes no step and returns ow.
- Pool the opinions linearly, giving the consensus
c. - Read the Kullback-Leibler divergence of each column of
pwagainstc, givingkldivs. - Scale each entry of
owbyexp(-p * kldivs), into a new vector. - Divide that vector by its sum, giving the penalised opinion probabilities.
Arguments
ow: Vector of opinion probabilities (length = number of opinions).pw: Matrix of prior weights for each opinion (observations × opinions).p: Robustness penalty parameter.
Returns
ow::VecNum: The opinion probabilities for pooling, summing to 1. The three-argument method returns a new vector, and theargs...method returns the argument itself. The argument is never modified either way, because it may be the estimator's ownwfield, or the immutablerangethat the uniform-weight branch ofpriorbuilds.
Related
OpinionPoolingPrior: the estimator that calls this to make its aggregation of opinions robust.compute_pooling
PortfolioOptimisers.show_fields — Method
show_fields(_::OpinionPoolingPrior) -> NTuple{7, Symbol}
Renders every field of a OpinionPoolingPrior except cache.
The state a cache holds is the running detail of an incremental fit, not the configuration a reader looks the type up for, and it prints under the estimator at every site that renders one. Set set_show_nothing_fields!(:OpinionPoolingPrior, true) to render it.
Arguments
::OpinionPoolingPrior: Prior estimator, read for its type alone.
Returns
fields::Tuple: The field names to render, which is(:pes, :pe1, :pe2, :p, :w, :alg, :ex).
Related