Uniform Variable#
- class uqpce.pce.variables.continuous.UniformVariable(interval_low, interval_high, order=2, name='', number=0)#
Represents a uniform variable. The methods in this class correspond to those of a uniform variable.
- Parameters:
interval_low – the low interval of the variable
interval_high – the high 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 uniform 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.
- generate_orthopoly()#
Generates the orthogonal polynomials for a uniform variable up to the order of polynomial expansion.
- generate_samples(count, standardize=False)#
Overrides the Variable class generate_samples to align with a uniform distribution.
- Parameters:
count – the number of points needed to be generated
standardize – boolean for generating samples for the standardized version of the variable
- get_mean()#
Return the mean of the variable.
- get_norm_sq_val(matrix_val)#
Overrides the Variable class get_norm_sq_val to align with a uniform distribution.
- Parameters:
matrix_val – the value in the model matrix to consider
- resample(count)#
Generates the resampled values.
- Parameters:
count – the number of resampled values
- standardize(orig, std_vals)#
Overrides the Variable class standardize to align with a uniform 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(value)#
Calculates and returns the unscaled variable value from the standardized value.
- Parameters:
value – the standardized value to be unstandardized