|
UQTk: Uncertainty Quantification Toolkit 3.1.5
|
Class for linear parameteric regression. More...
#include <lreg.h>
Public Member Functions | |
| Lreg () | |
| Constructor. | |
| ~Lreg () | |
| Destrcutor. | |
| virtual void | SetMindex (Array2D< int > &mindex) |
| Set multiindex. | |
| virtual void | GetMindex (Array2D< int > &mindex) |
| Get multiindex. | |
| virtual void | SetCenters (Array2D< double > ¢ers) |
| Set centers (for RBF) | |
| virtual void | SetWidths (Array1D< double > &widths) |
| Set widths (for RBF) | |
| virtual void | SetParamsRBF () |
| Set parameters (for RBF) | |
| virtual void | EvalBases (Array2D< double > &xx, Array2D< double > &bb) |
| Evaluate bases. | |
| virtual void | StripBases (Array1D< int > &used) |
| Strip bases. | |
| void | InitRegr () |
| Initialize. | |
| void | SetupData (Array2D< double > &xdata, Array1D< double > &ydata) |
| Setup data (1d ydata) | |
| void | SetupData (Array2D< double > &xdata, Array2D< double > &ydata) |
| Setup data (2d ydata) | |
| void | SetRegMode (string regmode) |
| Set the regression mode. | |
| void | SetRegWeights (Array1D< double > &weights) |
| Set weights. | |
| void | BCS_BuildRegr (Array1D< int > &selected, double eta) |
| Build BCS regression. | |
| void | LSQ_BuildRegr () |
| Build LSQ regression. | |
| void | EvalRegr (Array2D< double > &xcheck, Array1D< double > &ycheck, Array1D< double > &yvar, Array2D< double > &ycov) |
| Evaluate the regression expansion. | |
| int | GetNpt () const |
| Get the number of points. | |
| int | GetNdim () const |
| Get dimensionality. | |
| int | GetNbas () const |
| Get the number of bases. | |
| double | GetSigma2 () const |
| Get the variance of the data. | |
| void | GetCoefCov (Array2D< double > &coef_cov) |
| Get coefficient covariance. | |
| void | GetCoef (Array1D< double > &coef) |
| Get coefficients. | |
| void | Proj (Array1D< double > &array, Array1D< double > &proj_array) |
| Project. | |
| Array1D< double > | LSQ_computeBestLambdas () |
| Compute the best values for regulariation parameter vector lambda, for LSQ. | |
| double | LSQ_computeBestLambda () |
| Compute the best value for regulariation parameter lambda, for LSQ. | |
| void | getResid () |
| Compute the residual vector, if not already computed. | |
| void | getDiagP () |
| Compute the diagonal of projection matrix, if not already computed. | |
| Array1D< double > | computeErrorMetrics (string method) |
| Compote error according to a selected metrics. | |
| double | computeRVE (Array2D< double > &xval, Array1D< double > &yval, Array1D< double > &yval_regr) |
| Compute validation error. | |
Protected Attributes | |
| Array2D< double > | xdata_ |
| xdata array | |
| Array1D< double > | ydata_ |
| ydata array | |
| int | npt_ |
| Number of samples. | |
| int | nbas_ |
| Number of bases. | |
| int | ndim_ |
| Dimensionality. | |
| Array1D< double > | sigma2_ |
| Variance. | |
| Array1D< double > | weights_ |
| Weights. | |
| Array1D< double > | resid_ |
| Residuals. | |
| bool | residFlag_ |
| Flag to indicate whether residual is computed. | |
| Array1D< double > | diagP_ |
| Diagonal of projection matrix. | |
| bool | diagPFlag_ |
| Flag to indicate whether diagonal of projetion matrix is computed. | |
| Array2D< double > | bdata_ |
| Auxiliary matrix or vector; see UQTk Manual. | |
| Array2D< double > | A_ |
| Array2D< double > | A_inv_ |
| Array2D< double > | coef_cov_ |
| Array1D< double > | Hty_ |
| Array1D< double > | coef_ |
| Array1D< double > | coef_erb_ |
Private Member Functions | |
| double | LSQ_computeLOO () |
| Compute Leave-one-out error for LSQ. | |
| double | LSQ_computeGCV () |
| COmpute generalized-cross-validation error for LSQ. | |
Private Attributes | |
| bool | dataSetFlag_ |
| Flag to indicate whether data has been set or not. | |
| string | regMode_ |
| Regression mode (m, ms, msc for mean-only, mean+variance, mean+covariance) | |
Class for linear parameteric regression.
|
inline |
Constructor.
|
inline |
Destrcutor.
| void Lreg::BCS_BuildRegr | ( | Array1D< int > & | selected, |
| double | eta ) |
Build BCS regression.
| Array1D< double > Lreg::computeErrorMetrics | ( | string | method | ) |
Compote error according to a selected metrics.
| double Lreg::computeRVE | ( | Array2D< double > & | xval, |
| Array1D< double > & | yval, | ||
| Array1D< double > & | yval_regr ) |
Compute validation error.
| void Lreg::EvalRegr | ( | Array2D< double > & | xcheck, |
| Array1D< double > & | ycheck, | ||
| Array1D< double > & | yvar, | ||
| Array2D< double > & | ycov ) |
Evaluate the regression expansion.
|
inline |
Get coefficients.
|
inline |
Get coefficient covariance.
| void Lreg::getDiagP | ( | ) |
Compute the diagonal of projection matrix, if not already computed.
|
inlinevirtual |
|
inline |
Get the number of bases.
|
inline |
Get dimensionality.
|
inline |
Get the number of points.
| void Lreg::getResid | ( | ) |
Compute the residual vector, if not already computed.
|
inline |
Get the variance of the data.
| void Lreg::InitRegr | ( | ) |
Initialize.
| void Lreg::LSQ_BuildRegr | ( | ) |
Build LSQ regression.
| double Lreg::LSQ_computeBestLambda | ( | ) |
Compute the best value for regulariation parameter lambda, for LSQ.
| Array1D< double > Lreg::LSQ_computeBestLambdas | ( | ) |
Compute the best values for regulariation parameter vector lambda, for LSQ.
|
private |
COmpute generalized-cross-validation error for LSQ.
|
private |
Compute Leave-one-out error for LSQ.
|
inlinevirtual |
Set centers (for RBF)
Reimplemented in RBFreg.
|
inlinevirtual |
|
inlinevirtual |
Set parameters (for RBF)
|
inline |
Set the regression mode.
| void Lreg::SetRegWeights | ( | Array1D< double > & | weights | ) |
Set weights.
|
inlinevirtual |
Set widths (for RBF)
Reimplemented in RBFreg.
|
inlinevirtual |
|
protected |
|
protected |
|
protected |
Auxiliary matrix or vector; see UQTk Manual.
|
protected |
|
protected |
|
protected |
|
private |
Flag to indicate whether data has been set or not.
|
protected |
Diagonal of projection matrix.
|
protected |
Flag to indicate whether diagonal of projetion matrix is computed.
|
protected |
|
protected |
Number of bases.
|
protected |
Dimensionality.
|
protected |
Number of samples.
|
private |
Regression mode (m, ms, msc for mean-only, mean+variance, mean+covariance)
|
protected |
Residuals.
|
protected |
Flag to indicate whether residual is computed.
|
protected |
Variance.
|
protected |
Weights.
|
protected |
xdata array
|
protected |
ydata array