RandomBoolean / New Layer

Generate a new column with random boolean values (True/False) using specified probability distributions. Similar to numpy.random.choice([True, False]) or rbinom() in R. Supports both uniform (equal probability) and Bernoulli (weighted probability) distributions.

Table
0
0
Table
Uniform

Generate boolean values with equal probability (50% True, 50% False). Probability mass function: This is equivalent to a fair coin flip.

Generate boolean values with specified probability of True. Probability mass function: where p is the Probability parameter. Similar to biased coin flip with specified odds.

Probability (p) of generating True. Must be between 0 and 1. Examples:

  • 0.5: Equal chance (same as Uniform)
  • 0.25: 25% True, 75% False
  • 0.75: 75% True, 25% False

Seed

oneof
Random

Use system-provided randomization. Each execution produces different boolean values. Suitable for security-sensitive applications, cryptographic operations, simulation, and cases where true randomness is required.

Use seeded random generation for reproducible results. Like random.seed() in Python or set.seed() in R. Essential for testing and reproducible experiments. Note: Not suitable for security-sensitive applications where predictability could be a vulnerability.

64

Seed value for the random number generator. Same Value guarantees identical sequence of random boolean values. Should not be used for security-critical operations.

Name for the new column. If not provided, the system generates a unique name. If AsColumn matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.