MyNixOS website logo
Description

Generalized Random Forests.

Forest-based statistical estimation and inference. GRF provides non-parametric methods for heterogeneous treatment effects estimation (optionally using right-censored outcomes, multiple treatment arms or outcomes, or instrumental variables), as well as least-squares regression, quantile regression, and survival regression, all with support for missing covariates.

third_party/random

What are these files?

They are copies of random and algorithm headers from the llvm standard library.

Motivation

Users complained about stability of random numbers across machines when setting seed across different platforms. See issue #379.

As pointed out by @jtibshirani:

the mersenne twister has the same implementation across platforms, the other random methods may differ from compiler to compiler

In PR #469, @halflearned included this reduced copy of the relevant headers, ensuring random number generation is done in a consistent way across compilers.

How to reproduce

File random.hpp

Extract only the relevant classes and functions from random.hpp:

  • __independent_bits_engine
  • __clz
  • __log2
  • __log2_imp
  • __generate_canonical
  • uniform_int_distribution
  • poisson_distribution
  • uniform_real_distribution
  • normal_distribution
  • exponential_distribution
  • discrete_distribution

From each class, remove all methods associated with operator<<.

Find and remove the following _LIBCPP macros:

  • _LIBCPP_BEGIN_NAMESPACE_STD
  • _LIBCPP_CONSTEXPR
  • _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
  • _LIBCPP_END_NAMESPACE_STD
  • _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
  • _LIBCPP_INLINE_VISIBILITY
  • _LIBCPP_MSVCRT
  • _LIBCPP_POP_MACROS
  • _LIBCPP_PUSH_MACROS
  • _LIBCPP_RANDOM
  • _LIBCPP_TEMPLATE_VIS
  • _LIBCPP_TYPE_VIS
  • _LIBCPP_USING_DEV_RANDOM

Find and replace prefix:

  • _VSTD:: -> std::

Add namespace nonstd.

File algorithm.hpp

Include modified random.hpp

Extract relevant class:

  • shuffle

Replace prefix:

  • std::uniform_int_distribution -> nonstd::uniform_int_distribution

Add namespace nonstd.

Metadata

Version

2.3.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows