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>
fvar< T > log(const fvar< T > &x)
fvar< T > binary_log_loss(int y, const fvar< T > &y_hat)
auto apply_scalar_binary(const T1 &x, const T2 &y, const F &f)
Base template function for vectorization of binary scalar functions defined by applying a functor to ...
fvar< T > log1m(const fvar< T > &x)
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...