Prev Next whats_new_16

@(@\newcommand{\R}[1]{ {\rm #1} } \newcommand{\B}[1]{ {\bf #1} } \newcommand{\W}[1]{ \; #1 \; }@)@ This is cppad_mixed--20220519 documentation: Here is a link to its current documentation .
Changes and Additions to cppad_mixed During 2016

11-09
11-07
11-04
11-02
10-30
10-28
10-27
10-25
10-24
10-18
10-16
10-15
10-14
10-06
09-30
09-27
09-24
09-23
07-28
07-27
07-26
07-25
07-20
07-18
07-14
07-13
07-12
07-10
07-09
06-24
06-22
06-19
06-18
06-17
06-13
06-12
06-11
06-07
06-06
06-05
06-04
06-03
     optimize_random
     optimize_fixed
     sample_random
05-15
05-11
05-08
05-06
05-04
05-03
04-29
04-27
04-23
04-19
04-18
04-17
04-16
04-10
04-15
04-09
04-08
04-07
04-06
04-05
04-03
04-02
04-01
03-29
03-28
03-09
02-26
02-06
01-26
01-25
01-22
01-21
01-19
01-16
01-15
01-14
01-13
01-10
01-09
01-05
01-04
01-01

11-09
The values true and false in the ar1_xam input arguments and output were changed to yes and no respectively. This was also done for the capture_xam program.

11-07
  1. Add the bin/speed_compare.py program (which has since been moved to bin/speed_old.py).
  2. Change order of input arguments to capture_xam be more similar to ar1_xam .


11-04
This the first version with cppad_mixed with the checkpoint_newton_step option. Previously, the Newton step was always checkpointed.

11-02
The sparsity pattern and other information related to the Hessian of the random likelihood , @(@ f_{uu} ( \theta , u ) @)@, was being computed twice, if quasi_fixed was false, or if information_mat was called. This has been fixed

10-30
  1. The A_rcv argument was missing from the initialize Syntax. This has been fixed.
  2. The value of number_random was increased (from 30 to 35) to lessen the change of a random failure during the make speed command; see speed .


10-28
Fix bug in sparse_ad_cholesky; to be more specific, the inverse permutation @(@ P^{-1} @)@ was being used where the permutation P in sparse_ad_cholesky was required. This the first version with cppad_mixed passes all its tests with use_atomic_cholesky true.

10-27
  1. Add the optimize_cppad_function option to the cmake command line.
  2. Advance to cppad-20161027.


10-25
  1. Add the use_atomic_cholesky option to the cmake command line.
  2. Fix another bug in sparse_ad_cholesky. To be specific, when search for the beginning of a row, do not check that at column index is less than an element known to be in the row before you get to the row.
  3. Fix a problem with, and improve, example_install.sh (the problem was introduced on 2016-10-24).
  4. Fix a problem with install_suitesparse.sh (introduced on 2016-10-24).


10-24
Fix a bug in the sparse_ad_cholesky class forward mode. To be specific, ignore higher order Taylor coefficients that do not appear in the sparsity patter for the zero order coefficient (they are no effects).

10-18
Fix a bug in implementation of the run_cmake.sh log_fatal_error option (which has since been removed).

10-16
Add the log_fatal_error option to the cppad_mixed configuration.

10-15
API Change:
The random constraint matrix A_rcv , is now specified in initialize instead derived_ctor . This was undone on 2017-03-08 .

10-14
  1. The way the install searches for libraries, and reports missing libraries, has been improved.
  2. Improve the suitesparse so that it automatically includes the metis package. Note that the proper value for metis_version , in the suitesparse install, is printed at the end of the ipopt install.


10-06
A class that performs sparse Cholesky factorization as a CppAD atomic operation has been added; see sparse_ad_cholesky.

09-30
  1. Use one value for libdir for all the install scripts; see cmake_libdir .
  2. Use a link to switch the build and install directories between the debug and release versions (when the install prefix ends with cppad_mixed). This enables one to build into the actual prefix (without debug or release at the end) by not ending the prefix with cppad_mixed.
  3. Advance to cppad-20160929.


09-27
Add sparse_up_tri_sol (plan to use this with a sparse atomic Cholesky AD operation).

09-24
Create sparse_low_tri_sol (plan to use this with a sparse atomic Cholesky AD operation).

09-23
Improve bin/install_eigen.sh , bin/install_ipopt.sh , and install_suitesparse.sh so they better ensure that debug and release versions got into proper directories.

07-28
  1. Improve the organization of the user_examples section.
  2. Add the start_near_solution argument to ar1_xam.cpp and capture_xam.cpp .
  3. Add the quasi_fixed argument to ar1_xam.cpp and change its position in capture_xam.cpp (so it has same relative location as in ar1_xam.cpp).
  4. Change the default for accept_after_max_steps to 2 and the default for obj_scaling_factor back to 1.


07-27
Mention having both debug and release versions of build on same file system; see build_type .

07-26
Change the fixed effects optimization default value for the Ipopt obj_scaling_factor from 1.0 to
     
obj_scaling_factor = 1.0 / sqrt( n_fixed + n_random )

This avoids scaling problems in ar1_xam.cpp with there is a large number of random effects (10,000 or more). To be specific, the number of backtracking line search steps ls is much smaller.

07-25
  1. Computing the derivative of the log of the determinant term in the Laplace approximation uses the inverse of the Hessian w.r.t. the random effects (where the Hessian is possibly non-zero). The ldlt_cholmod method for computing this inverse uses a special inverse subset algorithm; see method in ldlt_cholmod_inv. The method in ldlt_eigen_inv has not been changed.
  2. Make order the same for command line arguments that have the same name in ar1_xam.cpp and capture_xam.cpp . Change the argument number_times to number_random (in both programs). In addition, the derivative_test argument was added to both programs.


07-20
Add the hold_memory parameter to capture_xam.cpp and ar1_xam.cpp .

07-18
Add the bool_sparsity parameter to the following: initialize , information_mat , capture_xam.cpp , ar1_xam.cpp . In addition, remove bool_sparsity from the run_cmake.sh configuration script. This puts the choose between boolean and set sparsity patterns during run-time, instead of during the install process. The bool_sparsity parameter has since been moved for initialize and information_mat to derived_ctor .

07-14
A new method for computing the Hessian of the Laplace objective Hessian of the Laplace objective was implemented. To be specific, two partial Newton steps (instead of two full Newton steps) are used in the second order approximation for the optimal random effects @(@ W( \beta , \theta , u ) @)@. This should speed up the computation of the information matrix . It should also speed up optimize_fixed when quasi_fixed is false.

07-13
A new method for optimizing the random effects has been included; see evaluation_method . The new method is now the default. An option was added so the speed tests could use the new or old method; see ipopt_solve in capture_xam and ar1_xam .

07-12
  1. Improve the error messages when pkg-config cannot find the configuration information for gsl or ipopt .
  2. Fix a compile error (on some systems) in the file src/cholmod/sim_cov.cpp.
  3. Improve discussion of Ipopt callback ok flag; e.g., see ok in ipopt_xam_eval_f.


07-10
  1. Improve example_install.sh . To be specific, give the user the option to use existing installs.
  2. Add more input and output options to ar1_xam.cpp .
  3. Reduce that chance of random test failure using the example settings for capture_xam.cpp.


07-09
Change the auto_regressive_xam.cpp example to the ar1_xam.cpp example and speed test.

06-24
  1. There was a problem with how gsl was linked on some systems. This has been fixed.
  2. The script bin/debian_install has been moved to bin/example_install.sh and it should work for both Debian and Red Hat systems.


06-22
  1. Add the auto_regressive_xam.cpp example.
  2. Create the scripts bin/debian_install.sh for an easy install on Debian systems. There are some 2DO items in this install that need to be fixed so they work on all systems.
  3. Create the script bin/install_omhelp an easy install of omhelp for Debian systems. This is needed to do cppad_mixed development.


06-19
  1. If during a call to optimize_fixed a CppAD error occurs, it no longer aborts the optimization.
  2. Add the build_type choice (debug or release) to the install script for eigen , ipopt , and suitesparse . Compiling debug versus release for the installs above and for the build_type made a difference of 40.0 seconds versus 5.5 seconds for the average of 20 values of capture_xam optimize_fixed_seconds .


06-18
If during a call to optimize_fixed , the Hessian of the random likelihood @(@ f_{uu} ( \theta , u ) @)@ may not be positive definite. This case used to aborted the optimization with a fatal_error . Now a warning is used to report this condition and the solution is returned with
     
solution.fixed_opt
equal to the fixed effects for this warning.

06-17
  1. Continue to improve capture_xam.cpp example / speed test.
  2. Drop the a1_double version of the user defined ran_likelihood function. Also drop the corresponding template functions from the user_examples .


06-13
  1. There was a bug in sample_fixed that generated the assert Assertion `H_info.col[k] == j' failed. The problem was that H_info was not in column manor order . This has been fixed.
  2. Continue to improve capture_xam.cpp example / speed test.


06-12
  1. Remove the option, to use box_newton to optimize the random effects (added on 06-03 ). It turns out this had some problems and did not yield the hoped for improvements in speed.
  2. Add comment about fact that constant terms in fix_likelihood and ran_likelihood do not affect the result. In addition, change the user_examples to demonstrate this fact.
  3. Continue to improve capture_xam.cpp example / speed test.


06-11
Improve the capture_xam.cpp example:
  1. Make the correspondence to its reference clearer.
  2. Add lots of command line arguments for optional settings; see syntax .
  3. Add a normalization factor to avoid floating point overflow during evaluation of its ran_likelihood .


06-07
  1. When box_newton fails, change message from fatal_error to warning .
  2. Change the box_newton convergence tolerance to be in terms of the Newton step (instead of projected gradient).


06-06
Fix an minor error in box_newton line search termination criteria (did not affect any test results).

06-05
  1. Make box_newton more robust by doing line search in a scaled negative projected gradient direction. (Step size of one in negative projected gradient direction may be much too large or much too small).
  2. There was a bug in ldlt_cholmod_solve_H where an unnecessary condition was check and failed. The example cholmod_solve2_a.cpp has been change to demonstrate that only a subset of the right hand side values matter.
  3. There was an error in the ldlt_eigen_logdet function in the special case where the determinant was zero. This has been fixed.


06-04
Redirect CppAD error messages through fatal_error .

06-03
Add the option to use box_newton to optimize the random effects. This changed the user API for the functions listed below (but has since been remove and the API has been changed back):

optimize_random
The options argument determines if ipopt or box_newton is used.

optimize_fixed
The random_options have been split into random_box_options/ and random_ipopt_options .

sample_random
The random_options have been split into random_box_options/ and random_ipopt_options .

05-15
  1. The sample_fixed routine now uses an LDLT factorization of the implicit information matrix instead of the implicit covariance. This is more efficient.
  2. Provide sample_fixed results (with a warning) when the information matrix is invertible, but not positive definite. This is intended to help determine which variables are not determined by the model plus data.
  3. Remove sample_fixed wish list item.
  4. Add the adaptive and trace-adaptive choices to the derivative_test fixed effects options. Note that this gives the user direct control over doing this test (which can be time intensive for large problems).


05-11
  1. In sample_fixed , Replace the conditional covariance method by the implicit covariance method (which was removed on 2020-03-15 because it was to slow).
  2. Return a warning when the observed implicit covariance is not positive definite. In addition, simulate samples from a modified covariance so user can look for variables that vary a lot and are undetermined. This method is suspect. It would be better to do this in information matrix space; see the sample_fixed wish list item.


05-08
  1. Improve sample_fixed by removing fixed effects that have their upper or lower limits active (or equal); see fixed effects subset . With this change the information_mat only needs to be positive definite on a subset of the fixed effects. The example sample_fixed.cpp demonstrates this fact.
  2. Change sample_random to use the sparse observed information method. This reduces the memory and time for computing these samples.


05-06
Fix a bug in the information_mat and sample_fixed when the number of random effects n_random was zero.

05-04
Make some improvements to the solution check and its corresponding warning message.

05-03
  1. Change cholmod class to ldlt_cholmod class and choleig class to ldlt_eigen class.
  2. Change cholmod_cholesky to ldlt_cholmod in run_cmake.sh.
  3. There was a problem choosing ldlt_cholmod to be NO. This has been fixed by changing the ldlt_eigen_solve_H function to work the same as the ldlt_cholmod_solve_H function.
  4. Add more detection, and reporting as a fatal_error , when the Hessian w.r.t. the random effects @(@ f_{uu} ( \theta , u) @)@ is not positive definite.


04-29
Add an cholmod_solve2_sim.cpp, an example that shows how to use Cholmod to efficiently sample a distribution that has covariance equal to the inverse of a sparse positive definite matrix.

04-27
  1. Add more discussion about the connection between the Lagrange multipliers and the fixed effects bounds in the fixed_solution section.
  2. Relax the tolerance used by cppad_mixed when checking if a fixed effect bound or a fixed constraint bound is active. This should give better detection.


04-23
There was bug whereby the solution returned by optimize_fixed would have non-zero values for fixed_lag that should have been zero. This has been fixed.

04-19
Add sample_random for sampling the posterior of the random effects given the fixed effects.

04-18
Advance to newer version of CppAD; (must rerun bin/install_cppad.sh). This fixed the remaining warnings when building a release version.

04-17
Fix some errors and warnings when build_type was RELEASE.

04-16
  1. The routine ipopt_fixed_adapt_derivative_chk now checks ipopt_fixed_eval_jac_g in addition to ipopt_fixed_eval_grad_f.
  2. Fix a bug in the computation of the derivative of the random constraints.


04-10
  1. If the gradient check ipopt_fixed_adapt_derivative_chk fails, it now results in warning instead of a fatal error.
  2. Check the Hessian of the random likelihood @(@ f_uu ( \theta , u) @)@ is positive definite.


04-15
Fix sample_fixed so that it now works properly when some of the components of fix_constraint are active.

04-09
Improve documentation of fixed_ipopt_options and add the special case of max_iter equal to -1.

04-08
  1. Changed ipopt_fixed_adapt_derivative_chk to handle case where the function at both central difference points is zero, and the derivatives is also zero.
  2. Test (and fix) sample_fixed for a case where one of the fixed effects was at its upper or lower limit.


04-07
  1. The new routine sample_fixed samples from the posterior distribution for the estimate of the fixed effects.
  2. Changed ipopt_fixed_adapt_derivative_chk to down to step size 1e-9 (used to just go to 1e-7. In addition, in error report changed step= to best_step=.


04-06
The user defined virtual routines fatal_error and warning have new examples in derived_ctor.cpp . All the other user defined virtual routines examples have been simplified. To be specific, each has its own specific example. In addition, the user_examples have been split in the user defined routines, cppad_mixed defined routines, and other examples.

04-05
The new routine information_mat computes the observed information matrix.

04-03
There was an error (introduced on 04-02 ) in the new syntax for optimize_fixed. This has been fixed.

04-02
Add a brief description for each of the user defined functions .

04-01
API Change:
The optimize_fixed routine now returns the optimal Lagrange multipliers (as well as the optimal fixed effects). If fixed_out was the return value for the previous version of optimize_fixed, and solution is the current return value,
     
fixed_out = solution.fixed_opt
. This shows how to convert old optimize_fixed calls to the new form.

03-29
Add the option for a user defined ran_likelihood_hes function (since removed).

03-28
  1. Add the ran_likelihood.cpp example.
  2. Add the option for a user defined ran_likelihood_jac function (since removed).


03-09
The summary of memory usage has been changed; see size_map .

02-26
Fix a bug in the use of ldlt_cholmod_solve_H. to be specific, accessing past the end of the row vector in ldlt_cholmod_solve_H, in addition it must be in increasing order (and was not specified as such).

02-06
  1. Change the random constraint matrix A_rcv to be an argument to the derived class constructor instead of an argument to the initialize routine. This was undone on 2016-10-15 and redone on 2017-03-08 .
  2. Simplify the random constraint matrix source code.
  3. Make more efficient use of the cholmod Cholesky factorization package.


01-26
Remove the old ldlt_cholmod wish list its (completed) and add partial Newton step second order method wish list item (this item has been completed).

01-25
  1. Make suitesparse a required package.
  2. Change the run_cmake.sh argument set_sparsity to bool_sparsity (so that the default value is YES).
  3. Add the option to use cholmod for sparse Cholesky factorization; see ldlt_cholmod .


01-22
It is no longer necessary to link a separate cppad_mixed_eigen library. In addition, the new example check_install.sh demonstrates compiling, linking and running a program using cppad_mixed.

01-21
Change default directory where bin/install_eigen.sh places the Eigen package (because warnings are suppressed for this directory).

01-19
Fix a bug (found by valgrind) in the setting of the upper bound ( g_u in ipopt_fixed_get_bounds_info) for the random constraints .

01-16
  1. Include a random_constraint in implementation and documentation of the capture_xam.cpp example. In addition, check that the result satisfies the constraint that the sum of the random effects is zero.
  2. Start a wish_list .


01-15
Add a Lasso example.

01-14
  1. First version that actually works with random constraints . For example, see ran_constraint.cpp .
  2. Fix a bug when combining absolute value terms with fix_constraint . In change the default warning so that it does not abort (assert(false)). Furthermore, change the tolerance in one of the solution tests to avoid a warning (when convergence has been achieved).


01-13
Add test of absolute value terms in the negative log-density vector abs_density.cpp , and fix a bug demonstrated by the test.

01-10
Go back to using column vectors when solving linear equations (in case matrix results would be dense and require a lot of memory).

01-09
  1. The ldlt_eigen Cholesky factorization of the Hessian with respect to the random effects has been changed from a static variable to the private member variable ldlt_ran_hes_. This has many advantages; e.g., it allows for multiple derived_ctor objects.
  2. Remove the need for the -Wno-shadow and -Wno-deprecated-declarations options when compiling Eigen files by using the CMake system option for the Eigen include directories. This should work on more systems.


01-05
Improve the efficiency of the evaluation of the optimize_fixed objective function. To be specific, the Cholesky factor update for @(@ f_{u,u} [ \theta , \hat{u} ( \theta ) ] @)@ when there is a change in the fixed effects vector @(@ \theta @)@. In addition, use matrices, instead of just column vectors, when back solving (to simplify code and allow sparse solver to obtain more efficiency).

01-04
Regroup information in theory section of documentation so that approximating optimal random effects is a separate section.

01-01
  1. Advance to newer version of CppAD; (must rerun bin/install_cppad.sh).
  2. Change package name in copyright message from dismod_at to cppad_mixed. This should have been done when cppad_mixed was extracted from dismod_at.

Input File: omh/whats_new/16.omh