PenalizedLeastSquaresAlgorithm¶
- class PenalizedLeastSquaresAlgorithm(*args)¶
- Penalized least squares algorithm. - Refer to Least squares problems numerical methods. - Available constructors:
- PenalizedLeastSquaresAlgorithm(x, y, psi, indices, penalizationFactor=0, useNormal=False) - PenalizedLeastSquaresAlgorithm(x, y, weight, psi, indices, penalizationFactor=0, useNormal=False) - PenalizedLeastSquaresAlgorithm(x, y, weight, psi, indices, penalizationFactor=0, penalizationMatrix, useNormal=False) 
 - Parameters:
- x2-d sequence of float
- The input random observations - where - is the input of the physical model, - is the input dimension and - is the sample size. 
- y2-d sequence of float
- The output random observations - where - is the output of the physical model, - is the output dimension and - is the sample size. 
- weightsequence of float
- Output weights 
- psisequence of Function
- Basis 
- indicessequence of int
- Indices allowed in the basis 
- penalizationFactorfloat, optional
- Penalization factor 
- penalizationMatrix2-d sequence of float
- Penalization matrix 
- useNormalbool, optional
- Solve the normal equation 
 
 - Methods - Accessor to the object's name. - Accessor to the coefficients. - getName()- Accessor to the object's name. - getPsi()- Accessor to the basis. - Accessor to the coefficients. - Accessor to the coefficients. - Accessor to the weights. - getX()- Accessor to the input sample. - getY()- Accessor to the output sample. - hasName()- Test if the object is named. - Get the model selection flag. - run()- Run the algorithm. - setName(name)- Accessor to the object's name. - Notes - For each output marginal - , solve the least-squares problem: - where - is the - -th marginal of the sample of output observations, - is the number of coefficients, - is the design matrix computed from the input sample x and - is the vector of coefficients. - __init__(*args)¶
 - getClassName()¶
- Accessor to the object’s name. - Returns:
- class_namestr
- The object class name (object.__class__.__name__). 
 
 
 - getName()¶
- Accessor to the object’s name. - Returns:
- namestr
- The name of the object. 
 
 
 - getRelativeError()¶
- Accessor to the coefficients. - Returns:
- relativeErrorfloat
- The relative error 
 
 
 - getResidual()¶
- Accessor to the coefficients. - Returns:
- coefficientsfloat
- The residual 
 
 
 - hasName()¶
- Test if the object is named. - Returns:
- hasNamebool
- True if the name is not empty. 
 
 
 - involvesModelSelection()¶
- Get the model selection flag. - A model selection method can be used to select the coefficients of the decomposition which enable to best predict the output. Model selection can lead to a sparse functional chaos expansion. - Returns:
- involvesModelSelectionbool
- True if the method involves a model selection method. 
 
 
 - run()¶
- Run the algorithm. 
 - setName(name)¶
- Accessor to the object’s name. - Parameters:
- namestr
- The name of the object. 
 
 
 
 OpenTURNS
      OpenTURNS