Bayesian¶
The samplesizelib.linear.bayesian contains classes:
- samplesizelib.linear.bayesian.APVCEstimator
- samplesizelib.linear.bayesian.ACCEstimator
- samplesizelib.linear.bayesian.ALCEstimator
- samplesizelib.linear.bayesian.MaxUtilityEstimator
- samplesizelib.linear.bayesian.KLEstimator
-
class
samplesizelib.linear.bayesian.ACCEstimator(statmodel, **kwards)[source]¶ Description of ACC Method
Parameters: - statmodel (RegressionModel or LogisticModel) – the machine learning algorithm
- averaging (float) – to do
- alpha (float) – to do
- length (float) – to do
- begin (int) – to do
- end (int) – to do
- num (int) – to do
- multiprocess (bool) – to do
- progressbar (bool) – to do
-
forward(features, target)[source]¶ Returns sample size prediction for the given dataset.
Parameters: - features (array.) – The tensor of shape num_elements \(\times\) num_feature.
- target (array.) – The tensor of shape num_elements.
Returns: sample size estimation for the given dataset.
Return type: dict
-
class
samplesizelib.linear.bayesian.ALCEstimator(statmodel, **kwards)[source]¶ Description of ALC Method
Parameters: - statmodel (RegressionModel or LogisticModel) – the machine learning algorithm
- averaging (float) – to do
- alpha (float) – to do
- length (float) – to do
- begin (int) – to do
- end (int) – to do
- num (int) – to do
- multiprocess (bool) – to do
- progressbar (bool) – to do
-
forward(features, target)[source]¶ Returns sample size prediction for the given dataset.
Parameters: - features (array.) – The tensor of shape num_elements \(\times\) num_feature.
- target (array.) – The tensor of shape num_elements.
Returns: sample size estimation for the given dataset.
Return type: dict
-
class
samplesizelib.linear.bayesian.APVCEstimator(statmodel, **kwards)[source]¶ Description of APVC Method
Parameters: - statmodel (RegressionModel or LogisticModel) – the machine learning algorithm
- averaging (float) – to do
- epsilon (float) – to do
- begin (int) – to do
- end (int) – to do
- num (int) – to do
- multiprocess (bool) – to do
- progressbar (bool) – to do
-
forward(features, target)[source]¶ Returns sample size prediction for the given dataset.
Parameters: - features (array.) – The tensor of shape num_elements \(\times\) num_feature.
- target (array.) – The tensor of shape num_elements.
Returns: sample size estimation for the given dataset.
Return type: dict
-
class
samplesizelib.linear.bayesian.KLEstimator(statmodel, **kwards)[source]¶ Description of KL based Method
Parameters: - statmodel (RegressionModel or LogisticModel) – the machine learning algorithm
- averaging (float) – to do
- epsilon (float) – to do
- begin (int) – to do
- end (int) – to do
- num (int) – to do
- multiprocess (bool) – to do
- progressbar (bool) – to do
-
forward(features, target)[source]¶ Returns sample size prediction for the given dataset.
Parameters: - features (array.) – The tensor of shape num_elements \(\times\) num_feature.
- target (array.) – The tensor of shape num_elements.
Returns: sample size estimation for the given dataset.
Return type: dict
-
class
samplesizelib.linear.bayesian.MaxUtilityEstimator(statmodel, **kwards)[source]¶ Description of Utility Maximisation Method
Parameters: - statmodel (RegressionModel or LogisticModel) – the machine learning algorithm
- averaging (float) – to do
- c (float) – to do
- begin (int) – to do
- end (int) – to do
- num (int) – to do
- multiprocess (bool) – to do
- progressbar (bool) – to do
-
forward(features, target)[source]¶ Returns sample size prediction for the given dataset.
Parameters: - features (array.) – The tensor of shape num_elements \(\times\) num_feature.
- target (array.) – The tensor of shape num_elements.
Returns: sample size estimation for the given dataset.
Return type: dict