Skip to content

Instantly share code, notes, and snippets.

@WardBrian
Last active June 1, 2024 20:17
Show Gist options
  • Save WardBrian/0791d82cfde4044a4b9c78aaf91f7c84 to your computer and use it in GitHub Desktop.
Save WardBrian/0791d82cfde4044a4b9c78aaf91f7c84 to your computer and use it in GitHub Desktop.
Stan 2.35 release notes (draft)
  • Exposes new arguments for laplace: calculate_lp is a boolean subarg of laplace which controls whether or not log_prob is called for each approximate draw. Default is true (existing behavior). The diagnostic_file argument of output now exposes information from the mode, namely the gradient and Hessian. (#1246)

  • CmdStan will now halt if a filesystem error prevents writing to one of the output files. (#1249)

  • The generate_quantities method now supports the num_chains arguments to perform downstream analysis in parallel. (#1256)

  • log_prob now prevents the same CSV from being read and written to at the same time. (#1259)

  • Boolean arguments to cmdstan accept true and false in addition to 1 and 0. (#1260)

  • mingw32-make is no longer necessary on Windows, the standard make program is sufficient. (#1262)

  • Improved the logic around the USER_HEADER variable to give an informative error when it is misspecified. (#1264)

  • make clean deletes more files, hopefully making it so make clean-all needs to be run far less often. (#1267)

  • Fixed an issue preventing the precompiled header from being used with GCC. (#1268)

  • Allow num_warmup=0 to be paired with adapt engaged=0 when the algorithm is the fixed_param sampler. (#1277)

  • Stan now detects if your compiler supports C++17 and will issue a warning if it is not available. Support for pre-C++17 compilers may be removed as early as next version. (#3063)

  • Added a new distribution: wiener_full_lpdf. (#2822)

  • Replaced static const objects with static constexpr when available. (#2830)

  • Gradients for the hypergeometric_pFq function rewritten for increased speed and stability. (#2961)

  • Added the Hypergeometric 1F0 function and gradients. (#2962)

  • Removed macro usage in the definitions of the require_ templates. (#2965)

  • Added a sparse matrix implimentation for arena_matrix. (#2971)

  • Added hand-calculated derivatives for the multivariate normal lpdf. (#2980)

  • Added derivatives for the multi_student_t_cholesky_lpdf. (#2990)

  • Added constrain function for creating matrices holding row or column simplexes. (#2992)

  • Updated TBB Windows build rules for compatibility with RTools make. (#2999)

  • Improved efficiency of von_mises_lpdf gradient calculation, credit to @venpopov. (#3010)

  • Fixed a few additional issues in checking the inputs to distributions defined over cholesky matrices. (#3012)

  • Functions which are wrappers around CVODES and IDAS routines from Sundials now throw domain_error, rather than a mix of domain_error and runtime_error. (#3013)

  • Fixed the stack_allocator being able to return non-8-byte aligned pointers. (#3014)

  • Upgrade bundled Boost headers to 1.84. (#3001, #3018, #3019)

  • Fixed a bug where linspaced_array was returning its results truncated to integers. (#3023)

  • Fixed the return type of max(int, int) being a double. (#3024)

  • Added 'override' to built-in make variables. (#3028)

  • Maded sqrt(x) have a finite gradient at x=0. Allows distance(x,y) to work for x=y too. (#3033)

  • Improved stability of the von_mises_lpdf function to avoid numeric overflow. Now it's no longer necessary to use the normal_lpdf for kappa>100, allowing vectorizing of the likelihood. (#3036)

  • Updated the weibull_cdf and weibull_lcdf functions for numerical stability as well as correct handling of y == 0.0. (#3037)

  • Improved speed of inv_Phi and std_normal_qf functions. (#3046)

  • Fixed spurious linker issue with csr_matrix_times_vector. (#3048, #3053)

  • Improved error messages when variables dimensions do not match in operations that require it. (#3049)

  • Added support for Windows ARM64 with RTools ARM64 toolchain. (#3051)

  • Fixed clean-all error when using external SUNDIALS libraries. (#3054)

  • Fixed several small floating-point accuracy issues with ARM64 platforms. (#3059)

  • The RNGs for the multinomial and multinomial_logit distributions now accept a zero total count, resulting in a zero integer vector. (#3061)

  • Fixed a data race in profiling in multiple threads. (#3066)

  • Backported SUNDIALS bugfix for hashmap integer overflow. (#3072)

  • The algorithms no longer catch std::exception unconditionally. The Math library uses std::domain_error for recoverable errors, and these are the ones which are caught. (#3259)

  • Allow laplace sampling without evaluating log_prob for each draw. (#3261)

  • Allow laplace sampling to save the Hessian as a diagnostic output. (#3261)

  • Stan's RNG usages now uses a type definition stan::rng_t rather than hard coding a specific Boost RNG. (#3263)

  • Switched the pRNG used by default in the services and tests to be boost::mixmax. Note that this means seeds from previous versions will lead to different numerical results in this version. (#3264)

  • Add a new ranked R-hat diagnostic from Vehtari. (#3266)

  • Fixed an issue where Pathfinder would sometimes return more draws than requested. (#3279)

  • Rename sampling statement (~) to distribution statement (~) to be consistent with the docs changes. (#1426)

  • The generated C++ no longer assumes that the RNG used in Stan is specifically the boost::ecuyer1988 generator, but uses a type alias defined in the Stan library. (#1395)

  • Fixed an issue where multiple reject statements could cause the C++ compiler to fail. (#1396)

  • Giving a variable the name jacobian is now deprecated. This name is being reserved for future language extensions. (#1397)

  • When encountering an unknown identifier that matches a known suffixed function without its suffix, add the known function name to the error message. (#1401)

  • Added fatal_error(), which is similar to reject() but rather than signaling an error which is recoverable, signals an error which should terminate execution immediately. fatal_error is now a reserved word. (#1402)

  • Exposed the new overloads of wiener_lpdf added to Stan Math by @Franzi2114. (#1411)

  • Added a better error message when a program attempts to use the removed array syntax. (#1413)

  • Use tabs to position error message cursor when appropriate. (#1414)

  • Replaced the link show when the deprecated lkj_cov distribution is used with the new link (see stan-dev/docs#694). (#1415)

  • The compiler should display a cleaner error if it encounters an internal error. (#1416)

  • Clarified the error messages generated by a syntax error on the right side of an assignment statement. (#1417)

  • Removed code following the last round of syntax deprecations that is currently scheduled. The final one (use of real values in conditionals) is now a type error and can no longer be automatically canonicalized. (#1420)

  • Fixed an issue where operator/ was not generating the correct C++ for complex linear algebra types. (#1421)

  • Rollback js_of_ocaml to 5.4.0 for compatibility with QuickJS. (#1427)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment