sampleWeights {mcMST}R Documentation

Sample weights

Description

Sample random weights \lambda_1, ... \lambda_n, \sum_{i=1}^{n} \lambda_i = 1 for weighted-sum scalarization.

Usage

sampleWeights(n)

Arguments

n

[integer(1)]
Number of weights to sample.

Value

[numeric] Weight vector.

Examples

sampleWeights(2)

weights = replicate(10, sampleWeights(3L))
colSums(weights)

[Package mcMST version 1.1.1 Index]