Rosetta
Classes | Namespaces
SVD_Solver.hh File Reference

SVD solver class. More...

#include <basic/svd/SVD_Solver.fwd.hh>
#include <platform/types.hh>
#include <string>
#include <utility/vector1.hh>
#include <ObjexxFCL/FArray2D.fwd.hh>
#include <ObjexxFCL/FArray1D.fwd.hh>

Classes

class  basic::svd::SVD_Solver
 

Namespaces

 basic
 Tags used to tag messeges sent by MPI functions used to decide whether a slave is requesting a new job id or flagging as job as being a bad input.
 
 basic::svd
 

Detailed Description

SVD solver class.

Solve over-determined set of linear equation to minimize ||A x - b||^2, using Singular Value Decomposition (SVD) method.

Parameters
Specifythe size of the problem in the constructor (M is the number of equations, N is the number of parameters to fit) M MUST be larger or equal than N. Use the set_* functions to set the data vector b and the matrix A. Use the run_* functions in the correct order to solve your system (run_decomp_svd, then run_solve_svd) You can score the result with run_score_svd_on_matrix You can retrieve your solution with get_svd_solution.
Returns
The score of the fitting : sqrt( ||A x - b||^2 ) with run_score_svd_on_matrix(); The fitted vector x with get_svd_solution();
Remarks
Calls in a wrong order of the functions will abort the program (i.e. if you try to solve the problem before you set a matrix A) Once the matrix is decomposed, you can change the vector b and solve Ax=b with the new vector. (That's why those 2 functions are separated) The matrix A is necessary to calculate the score (argument of run_score_svd_on_matrix), but the matrix A is not stored within the SVD_solver object, so make sure you have it available when scoring (this is done on purpose for speed up) Is it possible to speed up calculations by using ObjexxFCL::FArraynD.index() call? ObjexxFCL doc is not really clear.
References:

@authorv Christophe Schmitz