CAB_samplers: For generating random samples

Description Usage srswo mcdowell_sampling

Description

Documentation for samplers.

Usage

1
2
3
4
5
mcdowell_sampling(fitness, fitness_weights)

srswo(choose, repeats, sample_size)

srs(choose_max, repeats, sample_size)

srswo

Simple random sampling without replacemant and uniform selection probabilities

Usage

srswo( choose, repeats, sample_size )

Arguments

choose

Numeric vector of elements to choose from.

repeats

Integer. How many repeats for the sampling.

sample_size

Integer. How many elements chosen per sample.

Value

Returns a matrix with the draws from each sample along the columns.

mcdowell_sampling

Sampling used in the supplementary material of McDowell (2013).

Usage

CAB.mcdowell_sampling( fitness, fitness_weights )

Arguments

fitness

Numeric vector of fitness values.

fitness_weights

Numeric vector of fitness weights.

Value

Returns a matrix with two columns and rows equal to the number of fitnss values. This matrix contains the indices of the values that are sampled. The indexing starts from zero.


Don-Li/CAB documentation built on May 6, 2019, 2:52 p.m.