fixed docstring formatting
@@ -28,6 +28,7 @@ def obrien_fleming(information_fraction, alpha=0.05):
e.g. the share of the maximum sample size
:type information_fraction: scalar or array-like
:param alpha: type-I error rate
+
:return: redistributed alpha value at the time point with the given information fraction
:rtype: float
"""
@@ -56,6 +57,7 @@ def group_sequential(x, y, spending_function='obrien_fleming', estimated_sample_
:type alpha: float
:param cap: upper bound of the adapted z-score
:type cap: int
+
:return: results of type EarlyStoppingTestStatistics
:rtype: EarlyStoppingTestStatistics
"""
@@ -130,6 +132,7 @@ def HDI_from_MCMC(posterior_samples, credible_mass=0.95):
:type posterior_samples: array-like
:param credible_mass: the range of credible interval. 0.95 means 95% represents credible interval.
:type credible_mass: float
+
:return: corresponding lower and upper bound for the credible interval
:rtype: list[float]
"""
@@ -157,6 +160,7 @@ def _bayes_sampling(x, y, distribution='normal', num_iters=25000, inference="sam
:type distribution: str
:param num_iters: number of iterations of sampling
:type num_iters: int
+
:return: the posterior samples, sample size of x, sample size of y, absolute mean of x, absolute mean of y
:rtype: tuple[array-like, array-like, array-like, float, float]
"""
@@ -236,6 +240,7 @@ def bayes_factor(x, y, distribution='normal', num_iters=25000, inference='sampli
:type num_iters: int
:param inference: sampling or variational inference method for approximation the posterior
:type inference: str
+
:return: results of type EarlyStoppingTestStatistics (without p-value and stat. power)
:rtype: EarlyStoppingTestStatistics
"""
@@ -288,6 +293,7 @@ def bayes_precision(x, y, distribution='normal', posterior_width=0.08, num_iters
:type num_iters: int
:param inference: sampling or variational inference method for approximation the posterior
:type inference: str
+
:return: results of type EarlyStoppingTestStatistics (without p-value and stat. power)
:rtype: EarlyStoppingTestStatistics
"""
@@ -322,6 +328,7 @@ def get_trace_normalized_effect_size(distribution, traces):
:param distribution: name of the KPI distribution model, which assumes a Stan model file with the same name exists
:param traces: sampling statistics
+
:return: sample of data points from posterior distribution of some parameter
:rtype: array-like
"""
@@ -351,6 +358,7 @@ def get_or_compile_stan_model(model_file, distribution):
:type model_file: str
:param distribution: name of the KPI distribution model, which assumes a Stan model file with the same name exists
:type distribution: str
+
:return: compiled Stan model for the selected distribution or normal distribution as a default option
:rtype: Class representing a compiled Stan model
"""
