Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Release/v4.7.0 into develop #2944

Merged
merged 10 commits into from
Sep 14, 2023
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ If this is a **feature request**, show what you expect to happen if the feature


#### Current Version:
v4.6.2
v4.7.0
19 changes: 19 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
Stan Math Library Release Notes

======================================================================
v4.7.0 (5 September 2023)
======================================================================

- Improved accuracy of `matrix_exp_multiply`. (#2619)
- Added framework for vectorising ternary functions (#2642)
- Added `select()` function for vectorised ternary operations, as well as the `any()` and `all()` boolean reduction functions (#2853)
- Added a minimum number of iterations (5) to the `grad_2f1` function to avoid early convergence (#2858)
- Fixed some spelling errors in documentation (#2908)
- Added new function in `stan::math::internal`, `finite_diff_hessian_vector_product_auto` (#2914)
- Fixed an issue with the return type of `eigenvalues` being incorrect (#2915)
- Delete jquery files from vendored Boost documentation (#2916)
- Fixed fvar/higher-order autodiff compatibility with GLM distributions (#2917)
- Fixed a type issue in the tests for inv_wishart_cholesky. (#2920)
- The constraint tolerance can now be adjusted by defining the `STAN_MATH_CONSTRAINT_TOLERANCE` macro before including Stan headers. The default value remains `1E-8`. (#2921)
- Use -dumpfullversion if available in makefiles (#2922)
- Vectorised binary signature for `log_sum_exp` (#2930)
- Added new functions `qr_thin`, `eigendecompose_sym`, `eigendecompose`, `complex_schur_decompose`, `svd`, and `csr_extract`. Each of these is equivalent to calling several existing functions, but should be more efficient due to sharing work. For example, `svd(m)` is equivalent to `(svd_U(m), singular_values(m), svd_V(m))`. (#2931)

======================================================================
v4.6.2 (15 May 2023)
======================================================================
Expand Down
2 changes: 1 addition & 1 deletion doxygen/doxygen.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PROJECT_NAME = "Stan Math Library"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 4.6.2
PROJECT_NUMBER = 4.7.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
3 changes: 1 addition & 2 deletions stan/math/prim/functor/operands_and_partials.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ class ops_partials_edge;
* for this specialization must be a `Arithmetic`
*/
template <typename ViewElt, typename Op>
class ops_partials_edge<ViewElt, Op, require_st_arithmetic<Op>> {
public:
struct ops_partials_edge<ViewElt, Op, require_st_arithmetic<Op>> {
using inner_op = std::conditional_t<is_eigen<value_type_t<Op>>::value,
value_type_t<Op>, Op>;
using partials_t = empty_broadcast_array<ViewElt, inner_op>;
Expand Down
13 changes: 7 additions & 6 deletions stan/math/prim/prob/categorical_logit_glm_lpmf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ namespace math {
* @tparam T_alpha type of the intercept vector
* @tparam T_beta type of the matrix of weights
* @param y a scalar or vector of classes. If it is a scalar it will be
* broadcast - used for all instances. Values should be between 1 and number of
* classes, including endpoints.
* broadcast - used for all instances. Values should be between 1 and number
* of classes, including endpoints.
* @param x design matrix or row vector. If it is a row vector it will be
* broadcast - used for all instances.
* @param alpha intercept vector (in log odds)
Expand Down Expand Up @@ -148,8 +148,8 @@ return_type_t<T_x, T_alpha, T_beta> categorical_logit_glm_lpmf(
= beta_y
- (exp_lin.matrix() * beta_val.transpose()).array().colwise()
* inv_sum_exp_lin;
// TODO(Tadej) maybe we can replace previous block with the following line
// when we have newer Eigen partials<0>(ops_partials) = beta_val(y
// TODO(Tadej) maybe we can replace previous block with the following
// line when we have newer Eigen partials<0>(ops_partials) = beta_val(y
// - 1, all) - (exp_lin.matrix() * beta.transpose()).colwise() *
// inv_sum_exp_lin;
}
Expand Down Expand Up @@ -183,8 +183,9 @@ return_type_t<T_x, T_alpha, T_beta> categorical_logit_glm_lpmf(
beta_derivative.col(y_seq[i] - 1) += x_val.row(i);
}
}
// TODO(Tadej) maybe we can replace previous loop with the following line
// when we have newer Eigen partials<2>(ops_partials)(Eigen::all, y
// TODO(Tadej) maybe we can replace previous loop with the following
// line when we have newer Eigen partials<2>(ops_partials)(Eigen::all,
// y
// - 1) += x_val.colwise.sum().transpose();

partials<2>(ops_partials) = std::move(beta_derivative);
Expand Down
4 changes: 2 additions & 2 deletions stan/math/prim/prob/neg_binomial_2_log_glm_lpmf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ namespace math {
* this can be a vector (of the same length as y, for heteroskedasticity)
* or a scalar.
*
* @param y failures count scalar or vector parameter. If it is a scalar it will
* be broadcast - used for all instances.
* @param y failures count scalar or vector parameter. If it is a scalar it
* will be broadcast - used for all instances.
* @param x design matrix or row vector. If it is a row vector it will be
* broadcast - used for all instances.
* @param alpha intercept (in log odds)
Expand Down
10 changes: 5 additions & 5 deletions stan/math/prim/prob/ordered_logistic_glm_lpmf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ namespace stan {
namespace math {

/** \ingroup multivar_dists
* Returns the log PMF of the ordinal regression Generalized Linear Model (GLM).
* This is equivalent to and faster than ordered_logistic_lpmf(y, x * beta,
* cuts).
* Returns the log PMF of the ordinal regression Generalized Linear Model
* (GLM). This is equivalent to and faster than ordered_logistic_lpmf(y, x *
* beta, cuts).
*
* @tparam T_y type of integer vector of classes. It can be either
* `std::vector<int>` or `int`.
Expand All @@ -31,8 +31,8 @@ namespace math {
* @tparam T_cuts type of the vector of cutpoints
*
* @param y a scalar or vector of classes. If it is a scalar it will be
* broadcast - used for all instances. Values should be between 1 and number of
* classes, including endpoints.
* broadcast - used for all instances. Values should be between 1 and number
* of classes, including endpoints.
* @param x design matrix or row vector. If it is a row vector it will be
* broadcast - used for all instances.
* @param beta weight vector
Expand Down
4 changes: 2 additions & 2 deletions stan/math/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#endif

#define STAN_MATH_MAJOR 4
#define STAN_MATH_MINOR 6
#define STAN_MATH_PATCH 2
#define STAN_MATH_MINOR 7
#define STAN_MATH_PATCH 0

namespace stan {
namespace math {
Expand Down