Statistical

The samplesizelib.linear.statistical contains next classes:

class samplesizelib.linear.statistical.LagrangeEstimator(statmodel, **kwards)[source]

Description of Lagrange Method

Parameters:
  • statmodel (RegressionModel or LogisticModel) – the machine learning algorithm
  • ind_u (numpy.ndarray) – to do
  • epsilon (float) – 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

class samplesizelib.linear.statistical.LikelihoodRatioEstimator(statmodel, **kwards)[source]

Description of Likelihood Ratio Method

Parameters:
  • statmodel (RegressionModel or LogisticModel) – the machine learning algorithm
  • ind_u (numpy.ndarray) – to do
  • epsilon (float) – 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

class samplesizelib.linear.statistical.WaldEstimator(statmodel, **kwards)[source]

Description of Wald Method

Parameters:
  • statmodel (RegressionModel or LogisticModel) – the machine learning algorithm
  • ind_u (numpy.ndarray) – to do
  • epsilon (float) – 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