1#ifndef STAN_MATH_PRIM_FUN_BINARY_LOG_LOSS_HPP
2#define STAN_MATH_PRIM_FUN_BINARY_LOG_LOSS_HPP
29template <
typename T, require_arithmetic_t<T>* =
nullptr>
32 return y ? -
log(y_hat) : -
log1m(y_hat);
45template <
typename T1,
typename T2, require_any_container_t<T1, T2>* =
nullptr,
46 require_not_var_matrix_t<T2>* =
nullptr>
49 [](
const auto& c,
const auto& d) {
return binary_log_loss(c, d); }, a, b);
fvar< T > log(const fvar< T > &x)
fvar< T > binary_log_loss(int y, const fvar< T > &y_hat)
fvar< T > log1m(const fvar< T > &x)
auto apply_scalar_binary(const F &f, const T1 &x, const T2 &y)
Base template function for vectorization of binary scalar functions defined by applying a functor to ...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...