Skip to main content

Generate random numbers using an excellent discriminant

Convenience function that loads excellent discriminants, selects one by index, creates a PRNG configuration, and generates random numbers. Combines the functionality of multiple functions for ease of use.

Usage



generate_excellent_random(

  n = 10000,

  discriminant_index = 1,

  results_file = "discriminant_analysis_results/raw_results.rds",

  precision = 256

)

Parameters

n
any
Number of random numbers to generate (default: 10000)
discriminant_index
any
Index of discriminant to use where 1 = best,
  • 2 = second best, etc. (default: 1).
results_file
any
Path to the analysis results RDS file (default: “discriminant_analysis_results/raw_results.rds”).
precision
any
MPFR precision in bits (default: 256)

Returns

A numeric vector of n random numbers uniformly distributed on 0,1

Examples

Details

  • This function:
  • Loads the excellent discriminants from the results file
  • Selects the discriminant at the specified index (sorted by score)
  • Creates a PRNG configuration with cryptographic mixing enabled
  • Initializes the PRNG
  • Generates the requested random numbers
  • The discriminants are ordered by overall_score, so index 1 gives the
  • highest-scoring discriminant.