Hi ROOTers

I am trying to do a linear least-squares analysis using SVD via Root’s TDecompSVD class.

Two questions:

- Is it possible to setup constraints so for the solution to be larger than zero (constrain the solving procedure to zero or positive values)?
- Is there a way to handle/retrieve the error information for the solve system?

The example

provides a way to handle weighting factors to the SVD computation. I am not familiar with the weighting computations on this example (more of inexperience) but I wonder if there are other ways I can fit my own weights/errors into the computation and to compute the error vector (maybe an error matrix?) for the solved system.

Thank you,

Hi,

Answering your questions"

- Inequality constraints are not possible using TDecompSVD class . In this case use

TMinuit which allows you to specify the parameter range or have a look at the

Quadratic Programming, see http://root.cern.ch/root/html/MATH_QUADP_Index.html .
- Yes, although in some methods of solveLinear.C more direct than others.

The error in each parameter is nothing else than the sqrt of the appropriate diagonal element

in the matrix (A^T A)^-1. If one goes through TMinuit, there is a function call that the

delivers the error.

There is for linear fitting with TMinuit a specific implementation:

http://root.cern.ch/root/html/TLinearMinimizer.html

Concerning the weighting in solveLinear.C: The data points are just scaled by the data errors,.