Compute the histogram pairs from the random variates of the given 2 samples/frequencies for size_times.
Parameters
----------
data1, data2 : sequence of 1-D ndarrays
Input data. Observed samples or frequencies.
bins : [scalar|1-D array], optional, default : 0
If bins is an int, it defines the number of equal-width bins in the given
range. If bins is zero, the given data will be assumed to be frequency data,
and it defines the bin index. If bins is an 1-D array, it defines the bin
edges, including the rightmost edge, allowing for non-uniform bin widths.
kind : [str|(str,str)], optional, default : "binbybin"
Bin-by-bin test
bin_mean : [scalar|(scalar,scalar)], optional, default : 1
The desired mean count in each bin of the output histograms. For example,
if a histogram has 10000 entries and 100 bins, the bin_mean is 100. It is
ignored when entries is given.
size : int, optional, default : 1
The number of repetitions for computing the histograms.
entries : [scalar|(scalar,scalar)], optional, default : 0
The desired entries of the output histograms. If entries is 0, the entries
size of the input data will be used instead.
freeze : [bool,(bool,bool)], optional. default : False
if True, the output histogram will be the frozen distribution of the input
data
Yields
------
hist1, hist2 : (1-D array, 1-D array)
Histogram pairs
Definition at line 38 of file power_of_test.py.
38 def rvs_pairs(data1, data2, bins = 0, kind = 'binbybin', bin_mean = 1, size = 1, entries = 0, freeze = False):
40 Compute the histogram pairs from the random variates of the given 2 samples/frequencies for size_times.
44 data1, data2 : sequence of 1-D ndarrays
45 Input data. Observed samples or frequencies.
46 bins : [scalar|1-D array], optional, default : 0
47 If bins is an int, it defines the number of equal-width bins in the given
48 range. If bins is zero, the given data will be assumed to be frequency data,
49 and it defines the bin index. If bins is an 1-D array, it defines the bin
50 edges, including the rightmost edge, allowing for non-uniform bin widths.
51 kind : [str|(str,str)], optional, default : "binbybin"
53 bin_mean : [scalar|(scalar,scalar)], optional, default : 1
54 The desired mean count in each bin of the output histograms. For example,
55 if a histogram has 10000 entries and 100 bins, the bin_mean is 100. It is
56 ignored when entries is given.
57 size : int, optional, default : 1
58 The number of repetitions for computing the histograms.
59 entries : [scalar|(scalar,scalar)], optional, default : 0
60 The desired entries of the output histograms. If entries is 0, the entries
61 size of the input data will be used instead.
62 freeze : [bool,(bool,bool)], optional. default : False
63 if True, the output histogram will be the frozen distribution of the input
68 hist1, hist2 : (1-D array, 1-D array)
71 data1 = data1.astype(float)
72 data2 = data2.astype(float)
73 entries = np.resize(entries, 2)
74 freeze = np.resize(freeze, 2)
75 hist1 =
_hist_fill(data1, bins, entries[0], freeze[0])
76 hist2 =
_hist_fill(data2, bins, entries[1], freeze[1])