Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures | Namespaces | Enumerations | Functions
MathLin_LeastSquares.hxx File Reference
#include <MathUtils_Types.hxx>
#include <MathUtils_Config.hxx>
#include <MathLin_Gauss.hxx>
#include <MathLin_SVD.hxx>
#include <MathLin_Householder.hxx>
#include <MathUtils_Core.hxx>
#include <cmath>

Data Structures

struct  MathLin::LeastSquaresResult
 Result for least squares problems. More...
 

Namespaces

namespace  MathLin
 

Enumerations

enum class  MathLin::LeastSquaresMethod { MathLin::NormalEquations , MathLin::QR , MathLin::SVD }
 Method for solving least squares problems. More...
 

Functions

LeastSquaresResult MathLin::LeastSquares (const math_Matrix &theA, const math_Vector &theB, LeastSquaresMethod theMethod=LeastSquaresMethod::QR, double theTolerance=1.0e-15)
 Solve overdetermined linear least squares: minimize ||Ax - b||_2.
 
LeastSquaresResult MathLin::WeightedLeastSquares (const math_Matrix &theA, const math_Vector &theB, const math_Vector &theW, LeastSquaresMethod theMethod=LeastSquaresMethod::QR, double theTolerance=1.0e-15)
 Solve weighted least squares: minimize ||W^{1/2}(Ax - b)||_2.
 
LeastSquaresResult MathLin::RegularizedLeastSquares (const math_Matrix &theA, const math_Vector &theB, double theLambda, double theTolerance=1.0e-15)
 Solve regularized least squares (Tikhonov/Ridge regression): minimize ||Ax - b||_2^2 + lambda*||x||_2^2.
 
double MathLin::OptimalRegularization (const math_Matrix &theA, const math_Vector &theB, double theLambdaMin=1.0e-10, double theLambdaMax=1.0e2, int theNbPoints=20)
 Compute optimal regularization parameter using Leave-One-Out Cross-Validation.