Bỏ qua

BooleanGenerator generator

Warning

The current page still doesn't have a translation for this language.

But you can help translating it: Contributing.

Generate a boolean with a configurable probability of returning true.

Why: Use BooleanGenerator for binary business states with a known prevalence, such as active or consented; use a constant when every row must have the same state.

Category: core.

Output: bool.

1
<key name="value" generator="BooleanGenerator(prob_true=0.8)"/>

Parameters

  • prob_true: float; Default 0.5 — Probability from 0.0 to 1.0 that a row evaluates to true.