Heuristic

The samplesizelib.linear.heuristic contains classes:

class samplesizelib.linear.heuristic.BootstrapEstimator(statmodel, **kwards)[source]

Description of Bootstrap 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.heuristic.CrossValidationEstimator(statmodel, **kwards)[source]

Description of Cross Validation 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
  • test_size (float) – 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.heuristic.LogisticRegressionEstimator(statmodel, **kwards)[source]

Description of Logistic Regression Method

Parameters:
  • statmodel (RegressionModel or LogisticModel) – the machine learning algorithm
  • ind (int) – to do
  • alpha (float) – to do
  • beta (float) – 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