User-Input Variable

User-Input Variable#

class uqpce.pce.variables.continuous.ContinuousVariable(pdf, interval_low, interval_high, order=2, name='', number=0)#

Class represents a continuous variable.

Parameters:
  • pdf – the equation that defines the pdf of the variable values

  • 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

bounds#
check_distribution(X)#

Checks all values in an array to ensure that they are standardized.

Parameters:

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

check_num_string()#

Checks for values in the input file that correspond to pi, -oo, or oo. If these values exist, they are converted into values that Python can use to create resampling points.

create_norm_sq(low, high, func)#

Calculates the norm squared values up to the order of polynomial expansion based on the probability density function and its corresponding orthogonal polynomials.

Parameters:
  • low – the low interval bound for the distribution

  • high – the high interval bound for the distribution

  • func – the function corresponding to the distribution

cum_dens_func#
dist#
distribution#
failed#
generate_samples(samp_size, **kwargs)#

Generates points according to the Latin hypercube; each point is in an interval of equal probability.

Parameters:

samp_size – the number of points needed to be generated

get_mean()#

Return the mean of the variable.

get_probability_density_func()#

Turns the input function into the corresponding probability density function.

get_resamp_vals(samp_size)#

Generates samp_num number of samples according to the pdf of the Variable.

Parameters:

samp_size – the number of samples to generate according to the distribution

high_approx#
interval_high#
interval_low#
low_approx#
mean#
name#
norm_sq_vals#
number#
order#
poly_denom#
recursive_var_basis(func, low, high, order)#

Recursively calculates the variable basis up to the input ‘order’.

Parameters:
  • func – the probability density function of the input equation

  • low – the low bound on the variable

  • high – the high bound on the variable

  • order – the order of polynomial expansion

samples#
standardize(orig, std_vals)#

For each variable, it adds a new attribute for the standardized values from the original input values.

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

std_bounds#
std_vals#
std_verify_vals#
test_samples#
type#
unstandardize_points(value)#

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

Parameters:

value – the standardized value to be unstandardized

vals#
var_orthopoly_vect#
var_str#
verify_vals#
x#