polychaos — A class to manage a Polynomial Chaos expansion.
tokenmatrix = polychaos_tokens () nb = polychaos_size () pc = polychaos_new ( file ) pc = polychaos_new ( srv , ny ) pc = polychaos_new ( pc , nopt , varopt ) polychaos_destroy (pc) polychaos_settarget ( pc , k , j , output ) polychaos_settarget ( pc , k , output ) polychaos_settarget ( pc , output ) polychaos_setsizetarget ( pc , np ) polychaos_setinput ( pc , ivar , invalue ) polychaos_setinput ( pc , invalue ) polychaos_setgroupempty ( pc ) polychaos_setgroupaddvar ( pc , ivar ) polychaos_setdimoutput ( pc , ny ) polychaos_setdegree ( pc , no ) polychaos_setanova ( pc ) polychaos_save ( pc , file ) polychaos_realisation ( pc ) polychaos_readtarget ( pc , file ) polychaos_propagateinput ( pc ) polychaos_propagateinput ( pc , inputvector ) polychaos_getvariance ( pc , ovar ) polychaos_getvariance ( pc ) output = polychaos_gettarget ( pc , k , j ) output = polychaos_gettarget ( pc , k ) output = polychaos_gettarget ( pc ) np = polychaos_getsizetarget ( pc ) polychaos_getsample ( pc , k , ovar ) polychaos_getquantile ( pc , k ) polychaos_getsample ( pc ) polychaos_getquantwilks ( pc , walpha , wbeta , ovar ) polychaos_getquantwilks ( pc , walpha , wbeta ) polychaos_getquantile ( pc , alpha , ovar ) polychaos_getquantile ( pc , alpha ) polychaos_getoutput ( pc , ovar ) polychaos_getoutput ( pc ) polychaos_getmultind ( pc ) polychaos_getmean ( pc , ovar ) polychaos_getmean ( pc ) polychaos_getlog ( pc ) polychaos_getinvquantile ( pc , threshold , ovar ) polychaos_getinvquantile ( pc , threshold ) polychaos_getindextotal ( pc , ivar , ovar ) polychaos_getindextotal ( pc , ivar ) polychaos_getindextotal ( pc ) polychaos_getindexfirst ( pc , ivar , ovar ) polychaos_getindexfirst ( pc , ivar ) polychaos_getindexfirst ( pc ) polychaos_getgroupinter ( pc , ovar ) polychaos_getgroupinter ( pc ) polychaos_getgroupind ( pc , ovar ) polychaos_getgroupind ( pc ) ny = polychaos_getdimoutput ( pc ) nx = polychaos_getdiminput ( pc ) p = polychaos_getdimexp ( pc ) no = polychaos_getdegree ( pc ) polychaos_getcovariance ( pc , ovar1 , ovar2 ) polychaos_getcovariance ( pc ) polychaos_getcorrelation ( pc , ovar1 , ovar2 ) polychaos_getcorrelation ( pc ) polychaos_getanovaordco ( pc , threshold , r ) polychaos_getanovaordco ( pc , threshold ) polychaos_getanovaord ( pc ) polychaos_getanova ( pc ) polychaos_getanova ( pc , r ) polychaos_generatecode ( pc , filename , funname ) polychaos_freememtarget ( pc ) polychaos_freememory ( pc ) polychaos_computeoutput ( pc , input ) polychaos_computeoutput ( pc ) polychaos_computeexp ( pc , srv , method ) polychaos_computeexp ( pc , pc2 , invalue , varopt ) polychaos_buildsample ( pc , type , np , order )
The polychaos_new function allows to create a new polynomial. The polychaos_destroy function allows to destroy an existing polynomial.
The polychaos_new function returns a token which is a unique identifier for the new polynomial. Indeed, when a new polynomial is created, a counter is updated which corresponds to the returned token. This way, each token is unique and can correspond only to one single polynomial.
The functions polychaos_tokens and polychaos_size allow to manage the polynomials which have already been created. The function polychaos_size returns the number of polynomials, while the polychaos_tokens function returns the list of current polynomials.
The following functions are available.
Returns a 1x(n) matrix containing the tokens of current polynomials, where n is the number of polynomials.
Returns a 1x(n) matrix containing the tokens of current polynomials, where n is the number of polynomials.
Creates a new PolynomialChaos based on given SetRandomVariable srv and number of output ny.
Create a new polychaos from another polychaos and an array of integers varopt with size nopt.
Creates a new polychaos from a data file.
Destroys the current polynomial.
Set the output value for experiment #k and output #j, where 1 ≤ k ≤ np and 1 ≤ j ≤ ny
Set the output for experiment #k to the matrix output, where 1 ≤ k ≤ np, where np is the number of experiments and output is a matrix with size 1 x (ny), where ny is the number of output random variables.
Set the output matrix where output is a matrix with size (np) x (ny), where np is the number of experiments and ny is the number of ouput random variables.
Set the number of experiments to np.
Set the input of input variable #ivar to value, where 1 ≤ ivar ≤ nx, where nx is the number of input random variables.
Set the input as a 1 x (nx) matrix, where nx is the number of input random variables.
Setup an empty group of input random variables.
Adds an input variable ivar to the group, with 1 ≤ ivar ≤ nx, where nx is the number of input random variables.
Set the number of output random variables to ny.
Set the degree of the polynomial.
Computes the anova.
Saves the polynomial chaos into file.
TODO
Read the output of the experiments from the file.
Propagate an input which has been set with the setinput method.
Propagate the given input data, where value is a 1 x (nx) matrix, with nx the number of input random variables.
Returns the variance of the output variable which index is ovar, where 1 ≤ ovar ≤ ny.
Returns the variance of the all output variables, as a 1 x (ny) matrix, where ny is the number of output random variables.
Returns the output value for experiment #k and input random variable #j, where 1 ≤ k ≤ np and 1 ≤ j ≤ nx
returns the output value for experiment #k and input #j, where 1 ≤ k ≤ np where output is a 1 x (nx) matrix with nx the number of input random variables.
Returns the output matrix as a (np) x (nx) matrix, where np is the number of experiments and nx is the number of input random variables.
Returns the number of experiments.
Returns the sample of experiment #k, where 1 ≤ k ≤ np, for output variable #ovar, where 1 ≤ ovar ≤ ny
Returns the sample of experiment #k, where 1 ≤ k ≤ np, as a (1) x ny matrix, where ny is the number of output random variables.
Returns the sampling as a (np) x (ny) matrix, where np is the number of experiments and ny is the number of output random variables.
Returns the Wilks quantile of order alpha for output variable #ovar, where 1 ≤ ovar ≤ ny
Returns the Wilks quantiles of order alpha for all output variables, as a (1) x ny matrix, where ny is the number of output random variables.
Returns the quantile of order alpha for output random variable #ovar, where 1 ≤ ovar ≤ ny, where ny is the number of output random variables.
Returns the quantiles of order alpha for all output variables, as a (1) x ny matrix, where ny is the number of output random variables.
Returns the output for output variable #ovar, where 1 ≤ ovar ≤ ny, where ny is the number of output random variables.
Returns the outputs for all output variables, as a (1) x ny matrix, where ny is the number of output random variables.
Prints the multiple indices.
Returns the mean of the output variable which index is ovar, where 1 ≤ ovar ≤ ny, where ny is the number of output random variables.
Returns the mean of the all output variables, as a 1 x (ny) matrix, where ny is the number of output random variables.
Prints out a log of current polynomial.
Returns the probability of having an output variable ovar over a given threshold, where 1 ≤ ovar ≤ ny with ny the number of output random variables.
returns the probability of having an output variable over a given threshold, as a 1 x (ny) matrix with ny the number of output random variables.
Returns the total index for the input variable #ivar and the output variable #ovar, where 1≤ ivar ≤ nx with nx the number of input random variables and 1 ≤ ovar ≤ ny with ny the number of output random variables.
Returns the total index of the input variable #ivar and the output variable #ovar=1, where 1 ≤ ivar ≤ nx with nx the number of input random variables.
Returns all total indices, as a (nx) x (ny) matrix with nx the number of input random variables and ny the number of output random variables.
Returns the first index order of the input variable #ivar and the output variable #ovar, where 1 ≤ ivar ≤ nx and 1 ≤ ovar ≤ ny, with nx the number of input random variables and ny the number of output random variables.
Returns the first index order of the input variable #ivar and the output variable #ovar=1, where 1 ≤ ivar ≤ nx, with nx the number of input random variables.
returns all first index order indices, as a (nx) x (ny) matrix, with nx the number of input random variables and ny the number of output random variables.
Returns the interaction indice of an output variable ovar, where 1 ≤ ovar ≤ ny, where ny is the number of output random variables.
Returns all interaction indices, as a 1 x (ny) matrix, where ny is the number of output random variables.
Returns the sensitivity indice of an output variable ovar, where 1 ≤ ovar ≤ ny, where ny is the number of output random variables.
Returns all sensitivity indices, as a 1 x (ny) matrix, where ny is the number of output random variables.
Returns the number of output random variables.
Returns the number of input random variables.
Returns the dimension of the expansion.
Returns the degree of the polynomial.
returns the covariance of the output random variables #ovar1 and #ovar2, where 1 ≤ ovar1, ovar2 ≤ ny, where ny is the number of output random variables.
Returns the covariance of the all output variables, as a (ny) x (ny) matrix, where ny is the number of output random variables.
returns the correlation of the output random variables #ovar1 and #ovar2, where 1 ≤ ovar1, ovar2 ≤ ny, where ny is the number of output random variables.
Returns the correlation of the all output variables, as a (ny) x (ny) matrix, where ny is the number of output random variables.
Prints out the anova ordered coefficients (TODO : what is treshold ? What is r ?).
Prints out the anova ordered coefficients (TODO : what is treshold ?).
Prints out the anova ordered coefficients.
Prints out the anova.
Prints out the anova (TODO : what is r ?).
Generates the source code to compute the polynomial chaos into the file filename. The generated function name is funname.
Free the memory associated with the output of the experiments.
Free the memory of the polynomial (TODO : what is the difference between freememory and freememtarget ?).
Propagate the input matrix with size 1 x (nx) where nx is the number of input random variables and compute the output y.
Computes the output y with size ny, where ny is the number of output random variables.
Computes the coefficients of the polynomial chaos expansion where srv is a setrandvar token and method is a string representing the computation algorithm.
The list of possible values for the string method is :
Compute the coefficient based on another polynomial chaos (TODO : what is varopt ? What is invalue ?).
Build an internal sampling of given type, with np experiments with order. (TODO : what is order ?)
The list of possible values for the input argument "type" is the following.