Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
test_rng Namespace Reference

Functions

 generate_correlated (R, n_samples, rng)
 
 summarize_case (name, R, n_samples=50000)
 
 equicorrelation (n, rho)
 

Variables

 rng = np.random.default_rng(42)
 
list cases
 
list all_summaries = []
 
dict results = {}
 
 y = data["y"]
 
 L
 
 sample_corr = data["sample_corr"]
 
 err
 
 means
 
 stds
 
 summary
 
 name
 
 R = data["R"]
 
 n_samples
 
 summary_df = pd.DataFrame(all_summaries).set_index("case")
 
 df_corr = pd.DataFrame(results[name]["sample_corr"])
 
 df_err = pd.DataFrame(results[name]["err"])
 
 vmin
 
 vmax
 
 subset = y[:5000, :]
 
 s
 
 vals = y[:, 0]
 
 bins
 
 density
 
 xs = np.linspace(vals.min(), vals.max(), 400)
 
tuple pdf = (1.0 / sqrt(2 * pi)) * np.exp(-0.5 * xs * xs)
 

Function Documentation

◆ equicorrelation()

test_rng.equicorrelation (   n,
  rho 
)

Definition at line 34 of file test_rng.py.

◆ generate_correlated()

test_rng.generate_correlated (   R,
  n_samples,
  rng 
)

Definition at line 9 of file test_rng.py.

◆ summarize_case()

test_rng.summarize_case (   name,
  R,
  n_samples = 50000 
)

Definition at line 16 of file test_rng.py.

Variable Documentation

◆ all_summaries

list test_rng.all_summaries = []

Definition at line 48 of file test_rng.py.

◆ bins

test_rng.bins

Definition at line 100 of file test_rng.py.

◆ cases

list test_rng.cases
Initial value:
1= [
2 ("Identity (no correlation)", np.eye(3)),
3 ("Equicorrelation rho=0.5", equicorrelation(3, 0.5)),
4 ("Block: rho12=0.8, var3 indep", np.array([[1.0, 0.8, 0.0],
5 [0.8, 1.0, 0.0],
6 [0.0, 0.0, 1.0]], dtype=float)),
7 ("Nearly singular equicorr rho=0.999", equicorrelation(3, 0.999)),
8]

Definition at line 39 of file test_rng.py.

◆ density

test_rng.density

Definition at line 100 of file test_rng.py.

◆ df_corr

test_rng.df_corr = pd.DataFrame(results[name]["sample_corr"])

Definition at line 67 of file test_rng.py.

◆ df_err

test_rng.df_err = pd.DataFrame(results[name]["err"])

Definition at line 68 of file test_rng.py.

◆ err

test_rng.err

Definition at line 52 of file test_rng.py.

◆ L

test_rng.L

Definition at line 52 of file test_rng.py.

◆ means

test_rng.means

Definition at line 52 of file test_rng.py.

◆ n_samples

test_rng.n_samples

Definition at line 52 of file test_rng.py.

◆ name

test_rng.name

Definition at line 52 of file test_rng.py.

◆ pdf

tuple test_rng.pdf = (1.0 / sqrt(2 * pi)) * np.exp(-0.5 * xs * xs)

Definition at line 102 of file test_rng.py.

◆ R

test_rng.R = data["R"]

Definition at line 52 of file test_rng.py.

◆ results

dict test_rng.results = {}

Definition at line 49 of file test_rng.py.

◆ rng

test_rng.rng = np.random.default_rng(42)

Definition at line 7 of file test_rng.py.

◆ s

test_rng.s

Definition at line 91 of file test_rng.py.

◆ sample_corr

test_rng.sample_corr = data["sample_corr"]

Definition at line 52 of file test_rng.py.

◆ stds

test_rng.stds

Definition at line 52 of file test_rng.py.

◆ subset

test_rng.subset = y[:5000, :]

Definition at line 89 of file test_rng.py.

◆ summary

test_rng.summary

Definition at line 52 of file test_rng.py.

◆ summary_df

test_rng.summary_df = pd.DataFrame(all_summaries).set_index("case")

Definition at line 64 of file test_rng.py.

◆ vals

test_rng.vals = y[:, 0]

Definition at line 98 of file test_rng.py.

◆ vmax

test_rng.vmax

Definition at line 76 of file test_rng.py.

◆ vmin

test_rng.vmin

Definition at line 76 of file test_rng.py.

◆ xs

test_rng.xs = np.linspace(vals.min(), vals.max(), 400)

Definition at line 101 of file test_rng.py.

◆ y

test_rng.y = data["y"]

Definition at line 52 of file test_rng.py.