Hypergeometric Variable

Hypergeometric Variable#

class uqpce.pce.variables.discrete.HypergeometricVariable(M, n, N, interval_low=0, order=2, name='', number=0)#

Represents a discrete hypergeometric variable. The methods in this class correspond to those of a discrete hypergeometric variable.

Parameters:
  • M – the M parameter of the variable

  • n – the n parameter of the variable

  • N – the N parameter of the variable

  • interval_low – the low interval of the variable

  • order – the order of the model to calculate the orthogonal polynomials and norm squared values

  • name – the name of the variable

  • number – the number of the variable from the file

check_distribution(X)#

Overrides the Variable class check_distribution to align with a discrete hypergeometric distribution.

Parameters:

X – The array of samples to check against the variable distribution

check_num_string()#

Searches to replace sring ‘pi’ with its numpy equivalent in any of the values that might contain it.

find_high_lim()#

Finds the high interval to use in calculations for the variable basis and univariate norm squared values.

generate_samples(count, standardize=False)#

Overrides the Variable class generate_samples to align with a discrete uniform distribution.

Parameters:

samp_size – the number of points needed to be generated

get_mean()#

Returns the mean of a DiscreteVariable.

get_probability_density_func()#

Calculates the probabilities for the HypergeomericVariable x_values.

standardize(orig, std_vals)#

Overrides the Variable class standardize to align with a discrete Hypergeomeric distribution.

Parameters:
  • orig – the un-standardized values

  • std_vals – the attribue name for the standardized vals

standardize_points(values)#

Standardizes and returns the inputs points.

Parameters:

values – unstandardized points corresponding to the variable’s distribution

unstandardize_points(values)#

Calculates and returns the unscaled variable value from the standardized value.

Parameters:

values – the standardized value to be unstandardized