nondeterministicRanking: Create a nondeterministic ranking

Description Usage Arguments Value

View source: R/selection.r

Description

Create a permutation of the sequence s = 1:l representing a ranking. If p = 1, the ranking will be completely deterministic, i.e. equal to 1:l. If p = 0, the ranking will be completely random. If 0 < p < 1, the places in the ranking will be determined by iterative weighted sampling without replacement from the sequence s := 1:l. At each step of this iterated weighted sampling, the first remaining element of s will be selected with probability p, the second element with probability p * (1 - p), the third element with probability p * (1 - p) ^ 2, and so forth.

Usage

1

Arguments

l

The numer of elements in the ranking.

p

The "degree of determinism" of the ranking to create.

Value

A ranking permutation of the values 1:l.


rgp documentation built on May 30, 2017, 12:45 a.m.