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