Skip to contents

Input a sequence of probabilities and get back a new sequence based on a binomial distribution and these probabilities. Any resulting value greater than 1 in the new sequence will be set to 1.

Usage

new_features_from_probs(probs, density = 6, examples = 1)

Arguments

probs

Numeric vector, a sequence of probabilities between 0 and 1 used to generate the new sequence.

density

Integer, the number of trials (default is 6).

exmaples

Inger, the number of examples to generate (default is 1)

Value

If example is 1, a sequence same length as probs but with values following a binomial distribution based on the inputted probabilities, with any values greater than 1 set to 1. If example is > 1, a matrix of sequences, with the number of columns the same length as the probabilities, and sequences corresponding to rows.