thduynguyen
6d697f2c92
heuristic in EliminationPreferCholesky to work around the Indeterminant exception while solving linear constrained systems.
...
Instead of turning Hessian factors into Jacobian factors -- so that they can be eliminated with constrained Jacobian factors using the special QR in Constrained's noise model -- we combine all Hessian factors, eliminate the variable first to have a conditional and a new factor 1, then combine the constrained Jacobians with this conditional (also a Jacobian) to eliminate again, producing the final conditional, and a new factor 2. The two new factors are then combined into a new Hessian factor to be returned.
2014-09-11 14:51:35 -04:00
thduynguyen
47ed9f3687
matlab code to reproduce test results
2014-08-06 11:10:36 -04:00
thduynguyen
2895b0515c
Support non positive definite Hessian factors while doing EliminatePreferCholesky with some constrained factors.
...
Currently, when eliminating a constrained variable, EliminatePreferCholesky converts every other factors to JacobianFactor before doing the special QR factorization for constrained variables. Unfortunately, after a constrained nonlinear graph is linearized, new hessian factors from constraints, multiplied with the dual variable (-lambda*\hessian{c} terms in the Lagrangian objective function), might become negative definite, thus cannot be converted to JacobianFactors.
Following EliminateCholesky, this version of EliminatePreferCholesky for constrained var gathers all unconstrained factors into a big joint HessianFactor before converting it into a JacobianFactor to be eliminiated by QR together with the other constrained factors.
Of course, this might not solve the non-positive-definite problem entirely, because (1) the original hessian factors might be non-positive definite and (2) large strange value of lambdas might cause the joint factor non-positive definite [is this true?]. But at least, this will help in typical cases.
2014-08-06 11:09:25 -04:00
thduynguyen
2fd3cf1bd0
unittest for QPSolver without initial point
2014-08-06 11:08:43 -04:00
thduynguyen
882a1fe22f
first unittest finding QP's feasible initial point works
2014-08-06 11:08:43 -04:00
thduynguyen
c91ab4a276
fix bugs in variable's columnNo index when passing to lpsolve. Obviously lpsolve modifies the raw buffer we pass to it!
2014-08-06 11:08:43 -04:00
thduynguyen
c637a75ebf
add lp_solve and the gtsam LPSolver interface
2014-08-06 11:08:43 -04:00
thduynguyen
e16efaab2c
QPSolver now returns dual values after solving. This can be used as a guessed dual value for the nonlinear level
2014-08-06 10:55:27 -04:00
thduynguyen
4681c05063
build dualgraph supports least-squares multipliers
2014-08-06 10:55:24 -04:00
thduynguyen
bb7522c947
Fix gtsam's old segfault bug in JacobianFactor::isConstrained: return false if it has no noisemodel. Test Nocedal06book, example 16.4, pg 475 passed.
2014-08-06 10:55:23 -04:00
thduynguyen
37079417d1
Test with Matlab's QP example
2014-08-06 10:55:23 -04:00
thduynguyen
f88c928ca0
refactor QPSolver into its own class
2014-08-06 10:55:22 -04:00
thduynguyen
c0e201f06c
Detailed comments for choosing the step size
2014-08-06 10:55:22 -04:00
thduynguyen
f00d673646
Detailed comments about the lambda<0 condition for good ineq <=0 constraints, wrt the Lagrangian L = f(x) - lambda*c(x)
2014-08-06 10:55:21 -04:00
thduynguyen
9fd78faf4b
first ineq QP test passed!
2014-08-06 10:55:21 -04:00
thduynguyen
ba1273ae6b
fix bug in NoiseModel signs for ineq weights. Unittest dual graph
2014-08-06 10:55:20 -04:00
thduynguyen
a31e9568a1
QPSolver in progress. Finish building dual graph, but not tested.
...
Use mixed constrained noise with sigma < 0 to denote inequalities.
Working set implements the active set method, turning inactive inequalities
to active one as equality constraints by setting their corresponding sigmas to 0
and vice versa. Dual graph now has to deal with mixed sigmas.
2014-08-06 10:55:20 -04:00
Richard Roberts
fe235b1209
Building timing scripts using new timing script support in GtsamTesting.cmake. Fixed compile errors in timing scripts but disabled a couple.
2014-06-07 19:02:11 -07:00
dellaert
89e6e27301
Additional unit test
2014-05-31 20:29:00 -04:00
dellaert
e730da95c4
Smarter noise models: Diagonal::Sigmas is now actually smart, and Gaussian::SqrtInformation now has a smart flag (default is true)
2014-05-28 09:17:31 -04:00
Richard Roberts
d725dd4816
Renamed unit tests that still had 'Unordered' in the name
2014-05-07 18:19:11 -07:00
dellaert
108357992c
Optimize an incomplete BayesNet
2014-05-06 02:18:52 -04:00
dellaert
92c9e9c0aa
Fixed "unused" warnings
2014-05-03 12:23:49 -04:00
Luca
51248072f9
fixed bug in hessianDiagonal (raw access)
2014-04-03 17:50:52 -04:00
Luca
dfeb9e2459
added test on hessian diagonal
2014-03-13 22:44:03 -04:00
Luca
6f692b1547
Merge branch 'develop'
...
Conflicts:
gtsam/base/SymmetricBlockMatrix.cpp
gtsam/linear/JacobianFactor-inl.h
gtsam_unstable/geometry/tests/testTriangulation.cpp
2014-03-12 12:57:59 -04:00
hchiu
b464b808ef
First cut on raw MultiplyHessianAdd for HessianFactor and JacobianFactor. Unit test is passed in testGaussianFactorGraphUnordered (multiplyHessianAdd3). Note the interface currently needs the accumulated diminsions of key variables. See GaussianFactorGraph::multiplyHessianAdd(double alpha,const double* x, double* y).
2014-03-04 01:58:34 -05:00
dellaert
e88b214b40
Small re-factor, no more finished()
2014-02-16 12:17:00 -05:00
dellaert
f8024bd6dd
Conversion from Hessian can have NULL node model
2014-02-16 12:15:52 -05:00
dellaert
19a06ca68f
Added unit tests for NULL noise model and fixed bug in hessianDiagonalXX for that case
2014-02-16 00:21:15 -05:00
dellaert
38d8de1537
Put in test
2014-02-14 13:39:07 -05:00
dellaert
411381fd88
unit test for Jacobian::hessianBlockDiagonal
2014-02-14 13:31:21 -05:00
dellaert
6e4433f589
Made correct test for HessianFactor::hessianBlockDiagonal
2014-02-14 13:19:17 -05:00
dellaert
d9431d3d40
Added expected values for hessianBlockDiagonal
2014-02-14 13:09:04 -05:00
dellaert
a272264e7d
Added unit test for hessianDiagonal
2014-02-14 01:38:08 -05:00
dellaert
239b0fda6f
removed obsolete comment
2014-02-14 01:33:29 -05:00
dellaert
d3ac03e419
rename
2014-02-14 01:28:48 -05:00
dellaert
2ab25b3f65
hessianDiagonal now unit tested for HessianFactor
2014-02-14 01:27:03 -05:00
dellaert
76959d4d18
Added hessianDiagonal; works for Gaussian factor graphs with JacobianFactors
2014-02-14 01:14:32 -05:00
Frank Dellaert
b048db4296
refactored matrices test and checked my understanding of diagonal
2014-02-13 14:58:29 -05:00
Richard Roberts
661a157553
Working on standardizing/simplifying building unit tests and examples. Much simpler cmake function to add a glob of tests, doing away with convenience libraries, and removing other options that we never change from their defaults.
2014-02-13 01:34:31 -05:00
indelman
5db9dd4081
Removed .finished() from testGaussianBayesTreeUnordered.cpp
2014-02-10 08:54:14 -05:00
indelman
01be5dce94
Added template parameters to resolve Mac issue.
2014-02-05 15:51:20 -05:00
jing
90786c0203
fix Vector_() in rest of gtsam folder
2014-01-23 01:44:55 -05:00
Alex Cunningham
dfb3e60171
Fixed issue with serialization by actively changing inf/nan values to zero in constrained noisemodel. Updated WhitenInPlace() and distance(). Apparently this caused a bunch of other unit tests to fail, though.
2014-01-04 20:01:05 -05:00
Alex Cunningham
54c1ec0dcb
comments only - found the source of the problem
2014-01-04 19:04:34 -05:00
Alex Cunningham
4aea198c84
Marked failure cases for serialization in the linear test - get "input stream error" with the constrained noise model on text and XML serialization modes, but not binary
2014-01-04 16:29:25 -05:00
Frank Dellaert
a3003a0736
Merge branch 'origin/release/2.4.0'
...
Mainly improvements in EssentialMatrix stuff, but also has the new precisions in the diagonal noise model.
2014-01-04 00:29:32 -05:00
Frank Dellaert
29085b94a2
Check invsigmas and precisions indeed infinity in case of constrained models
2014-01-02 18:38:47 -05:00
Richard Roberts
880d9a8e3c
Switched to new Eigen built-in special comma initializer
2013-12-16 21:33:12 +00:00
Richard Roberts
5f87cbea7f
New SymmetricBlockMatrix interface - should be safer as all exposed functions use symmetric matrix expressions and the internal uninitialized values below the diagonal are never exposed.
2013-11-26 23:49:53 +00:00
Richard Roberts
1362eabd46
Fixed compile problems on Windows
2013-11-19 00:26:20 +00:00
Jing Dong
e4d56df32e
Fix Matrix_(...) to Mat() <<…
2013-11-14 05:39:29 +00:00
Jing Dong
c08a0ebcae
Fix Matrix_(...) to Mat() <<... in gtsam/linear
2013-11-13 05:27:20 +00:00
Alex Cunningham
03dcf17393
Added test to verify that GaussianFactorGraph worked in serialization
2013-11-08 21:55:35 +00:00
Richard Roberts
ec78d54f37
Removed old Index typedef and IndexFormatter
2013-11-08 16:35:28 +00:00
Alex Cunningham
1be1731c9b
Expanded the clone() test
2013-11-07 16:19:50 +00:00
Alex Cunningham
e3208a1f8e
Added negate() and clone() to GaussianFactorGraph
2013-11-07 15:29:38 +00:00
Richard Roberts
5defdbe73f
Fixed compile problems on windows
2013-11-05 16:06:10 +00:00
Frank Dellaert
d95ae93f91
Found and fixed the bug in multiplyHessian ! The storage scheme is evil !
2013-11-01 19:37:24 +00:00
Frank Dellaert
ccae63fd42
Removed degenerate example
2013-10-29 04:59:17 +00:00
Richard Roberts
3c33e44c46
Fixed compile errors on windows
2013-10-29 04:24:14 +00:00
Frank Dellaert
23cd20aa9b
Fixed unit test with different (non-degenerate) Hessian
2013-10-29 04:07:44 +00:00
Frank Dellaert
4591835223
gradientAtZero is now implemented in the fcators (Richard says, need to work on efficiency)
2013-10-29 03:42:33 +00:00
Frank Dellaert
b66841ca08
addInPlace_ (does not require structure to be the same)
2013-10-29 03:41:45 +00:00
Frank Dellaert
3c65fcfa19
Failed unit test, trace back to updateATA ?
2013-10-29 01:10:41 +00:00
Frank Dellaert
7c3131b533
Made multiplyHessian into multiplyHessianAdd
2013-10-27 14:58:51 +00:00
Frank Dellaert
9de0cacc27
Added vector(dims) method, and introduced Dims typedef
2013-10-26 22:04:37 +00:00
Frank Dellaert
17a74da786
Fixed unit test
2013-10-26 04:27:05 +00:00
Pablo Fernandez Alcantarilla
d03eafb6c0
Constructor that converts from Vector
2013-10-25 00:54:05 +00:00
Luca Carlone
42538c0252
unit tested multiplyHessian in HessianFactor
2013-10-24 23:12:18 +00:00
Luca Carlone
6f7d4ddb50
added multiplyHessian in HessianFactor (not ready)
2013-10-24 22:22:29 +00:00
Pablo Fernandez Alcantarilla
621483bc9b
multiplyHessian in JacobianFactor works
2013-10-24 16:40:25 +00:00
Pablo Fernandez Alcantarilla
6a383799d7
Skeleton code for GaussianFactorGraph::multiplyHessian
2013-10-24 15:52:32 +00:00
Jing Dong
40a7153272
Fix Vector_() to Vec() in gtsam/linear
2013-10-21 05:12:48 +00:00
Alex Cunningham
a4bd2adbc7
Added test for serializing a GaussianBayesTree
2013-09-17 14:04:11 +00:00
Richard Roberts
f3fdf8abe9
Reenabled some code relating to Hessian factors that I had accidently left disabled
2013-08-18 17:17:09 +00:00
Richard Roberts
14fef517d8
Fixed list_of problem on old boost and clang
2013-08-16 15:07:54 +00:00
Richard Roberts
0212bbc30d
Fixed some unit tests
2013-08-16 04:11:02 +00:00
Richard Roberts
ae4999414d
Fixed some compile errors when no C++11 extensions are enabled
2013-08-13 21:02:18 +00:00
Richard Roberts
871ffca204
Fixed unit test
2013-08-13 04:21:50 +00:00
Richard Roberts
f0c0a56365
Fixed warnings
2013-08-11 18:45:44 +00:00
Richard Roberts
3c8d482271
Reenabled dogleg unit tests and moved relevant parts to other test files
2013-08-11 18:17:32 +00:00
Richard Roberts
92459bc33b
Fixed gcc unit test compile errors
2013-08-08 16:30:14 +00:00
Richard Roberts
e39d100b6a
Made most global unit tests compile, includes dogleg, iterative, kalman filter, etc
2013-08-06 13:44:22 +00:00
Richard Roberts
ede0805fac
Global find+replace to remove Ordered
2013-08-05 22:31:44 +00:00
Richard Roberts
cb7eb1b510
Find+replace Ordered headers
2013-08-05 22:31:33 +00:00
Richard Roberts
09643929fd
Making some tests compile
2013-08-05 22:31:26 +00:00
Richard Roberts
0e80fe6418
Moved ordering tests, fixed serialization and constructors, to make all inference, symbolic, and linear tests pass
2013-08-05 22:31:09 +00:00
Duy-Nguyen Ta
587bfd3772
VectorValues constructor and append with initial values
2013-08-05 17:01:56 +00:00
Richard Roberts
be0b27a003
Removed obsolete Ordered classes and unit tests that have already been converted
2013-08-02 22:09:40 +00:00
Richard Roberts
682eddf3ef
Finished HessianFactor and Choesky in unordered
2013-08-02 22:09:32 +00:00
Richard Roberts
1f6ca330ee
Cleanups
2013-08-02 22:09:30 +00:00
Richard Roberts
4ea9fda03b
Working on HessianFactor
2013-08-01 21:57:56 +00:00
Richard Roberts
0d05bf5ac5
Started on HessianFactor, converted Nonlinear stuff and disabled a lot of more advanced classes so the library compiles with nonlinear using unordered.
2013-08-01 21:57:43 +00:00
Richard Roberts
5e3b4bf477
Added scalar * operator to VectorValues
2013-08-01 21:57:26 +00:00
Richard Roberts
3ade190128
Renamed old classes to "Ordered" and removed "Unordered" name from new classes
2013-07-29 23:55:40 +00:00
Richard Roberts
5746dedacb
Enabled and made GaussianBayesTree unit tests pass
2013-07-29 23:54:38 +00:00
Richard Roberts
b857dab6a9
Renamed unit tests already converted to 'Obsolete'
2013-07-17 03:13:00 +00:00
Richard Roberts
323d618c3e
Converted GBN and GFG unit tests
2013-07-16 20:22:14 +00:00