188 PCreg(
string strpar,
int order,
int dim);
215 PLreg(
int order,
int dim);
1D Array class for any type T
2D Array class for any type T
void Resize(const int &nx)
Resizes the array.
Definition Array1D.h:545
Stores data of any type T in a 1D array.
Definition Array1D.h:61
Stores data of any type T in a 2D array.
Definition Array2D.h:60
Class for linear parameteric regression.
Definition lreg.h:41
int GetNbas() const
Get the number of bases.
Definition lreg.h:87
Array1D< double > LSQ_computeBestLambdas()
Compute the best values for regulariation parameter vector lambda, for LSQ.
Definition lreg.cpp:384
Array1D< double > ydata_
ydata array
Definition lreg.h:115
Array1D< double > diagP_
Diagonal of projection matrix.
Definition lreg.h:133
void BCS_BuildRegr(Array1D< int > &selected, double eta)
Build BCS regression.
Definition lreg.cpp:206
int nbas_
Number of bases.
Definition lreg.h:120
Array1D< double > sigma2_
Variance.
Definition lreg.h:124
bool dataSetFlag_
Flag to indicate whether data has been set or not.
Definition lreg.h:150
~Lreg()
Destrcutor.
Definition lreg.h:47
void SetRegWeights(Array1D< double > &weights)
Set weights.
Definition lreg.cpp:197
double LSQ_computeGCV()
COmpute generalized-cross-validation error for LSQ.
Definition lreg.cpp:504
virtual void SetParamsRBF()
Set parameters (for RBF)
Definition lreg.h:59
bool residFlag_
Flag to indicate whether residual is computed.
Definition lreg.h:131
void GetCoef(Array1D< double > &coef)
Get coefficients.
Definition lreg.h:93
Array2D< double > xdata_
xdata array
Definition lreg.h:113
Array2D< double > A_inv_
Definition lreg.h:139
int GetNpt() const
Get the number of points.
Definition lreg.h:83
Array1D< double > Hty_
Definition lreg.h:140
void GetCoefCov(Array2D< double > &coef_cov)
Get coefficient covariance.
Definition lreg.h:91
int GetNdim() const
Get dimensionality.
Definition lreg.h:85
void getResid()
Compute the residual vector, if not already computed.
Definition lreg.cpp:423
Array1D< double > computeErrorMetrics(string method)
Compote error according to a selected metrics.
Definition lreg.cpp:454
Array2D< double > coef_cov_
Definition lreg.h:139
virtual void StripBases(Array1D< int > &used)
Strip bases.
Definition lreg.h:63
string regMode_
Regression mode (m, ms, msc for mean-only, mean+variance, mean+covariance)
Definition lreg.h:152
virtual void GetMindex(Array2D< int > &mindex)
Get multiindex.
Definition lreg.h:53
virtual void SetMindex(Array2D< int > &mindex)
Set multiindex.
Definition lreg.h:51
Array2D< double > bdata_
Auxiliary matrix or vector; see UQTk Manual.
Definition lreg.h:139
double computeRVE(Array2D< double > &xval, Array1D< double > &yval, Array1D< double > &yval_regr)
Compute validation error.
Definition lreg.cpp:470
double GetSigma2() const
Get the variance of the data.
Definition lreg.h:89
Array1D< double > resid_
Residuals.
Definition lreg.h:129
virtual void EvalBases(Array2D< double > &xx, Array2D< double > &bb)
Evaluate bases.
Definition lreg.h:61
int ndim_
Dimensionality.
Definition lreg.h:122
void InitRegr()
Initialize.
Definition lreg.cpp:133
Array1D< double > coef_
Definition lreg.h:140
void Proj(Array1D< double > &array, Array1D< double > &proj_array)
Project.
Definition lreg.cpp:368
void SetRegMode(string regmode)
Set the regression mode.
Definition lreg.h:72
Array2D< double > A_
Definition lreg.h:139
Array1D< double > coef_erb_
Definition lreg.h:140
void EvalRegr(Array2D< double > &xcheck, Array1D< double > &ycheck, Array1D< double > &yvar, Array2D< double > &ycov)
Evaluate the regression expansion.
Definition lreg.cpp:301
Array1D< double > weights_
Weights.
Definition lreg.h:127
void LSQ_BuildRegr()
Build LSQ regression.
Definition lreg.cpp:238
virtual void SetWidths(Array1D< double > &widths)
Set widths (for RBF)
Definition lreg.h:57
void SetupData(Array2D< double > &xdata, Array1D< double > &ydata)
Setup data (1d ydata)
Definition lreg.cpp:151
double LSQ_computeLOO()
Compute Leave-one-out error for LSQ.
Definition lreg.cpp:492
void getDiagP()
Compute the diagonal of projection matrix, if not already computed.
Definition lreg.cpp:436
double LSQ_computeBestLambda()
Compute the best value for regulariation parameter lambda, for LSQ.
Definition lreg.cpp:404
int npt_
Number of samples.
Definition lreg.h:118
bool diagPFlag_
Flag to indicate whether diagonal of projetion matrix is computed.
Definition lreg.h:135
virtual void SetCenters(Array2D< double > ¢ers)
Set centers (for RBF)
Definition lreg.h:55
Lreg()
Constructor.
Definition lreg.h:45
Derived class for PC regression.
Definition lreg.h:185
~PCreg()
Destructor.
Definition lreg.h:191
PCreg(string strpar, int order, int dim)
Constructors:
Definition lreg.cpp:76
Array2D< int > mindex_
Multiindex.
Definition lreg.h:204
void EvalBases(Array2D< double > &xx, Array2D< double > &bb)
Evaluate the bases.
Definition lreg.cpp:540
string pctype_
PC type.
Definition lreg.h:206
void SetMindex(Array2D< int > &mindex)
Set multiindex.
Definition lreg.h:198
void StripBases(Array1D< int > &used)
Strip the bases.
Definition lreg.cpp:596
void GetMindex(Array2D< int > &mindex)
Get multiindex.
Definition lreg.h:200
Derived class for polynomial regression.
Definition lreg.h:212
void StripBases(Array1D< int > &used)
Strip the bases.
Definition lreg.cpp:610
void SetMindex(Array2D< int > &mindex)
Set multiindex.
Definition lreg.h:225
void GetMindex(Array2D< int > &mindex)
Get multiindex.
Definition lreg.h:227
PLreg(int order, int dim)
Constructors:
Definition lreg.cpp:104
void EvalBases(Array2D< double > &xx, Array2D< double > &bb)
Evaluate the bases.
Definition lreg.cpp:553
Array2D< int > mindex_
Multiindex.
Definition lreg.h:232
~PLreg()
Destructor.
Definition lreg.h:218
Derived class for RBF regression.
Definition lreg.h:158
void SetWidths(Array1D< double > &widths)
Set widths.
Definition lreg.cpp:532
RBFreg(Array2D< double > ¢ers, Array1D< double > &widths)
Constructor:
Definition lreg.cpp:64
void EvalBases(Array2D< double > &xx, Array2D< double > &bb)
Evaluate the bases.
Definition lreg.cpp:574
~RBFreg()
Destructor.
Definition lreg.h:163
Array2D< double > centers_
RBF centers.
Definition lreg.h:177
void StripBases(Array1D< int > &used)
Strip the bases.
Definition lreg.cpp:624
void SetCenters(Array2D< double > ¢ers)
Set centers.
Definition lreg.cpp:523
Array1D< double > widths_
RBF bases' widhts.
Definition lreg.h:179