1 #ifndef STAN_MATH_PRIM_SCAL_FUN_BINARY_LOG_LOSS_HPP 2 #define STAN_MATH_PRIM_SCAL_FUN_BINARY_LOG_LOSS_HPP 4 #include <boost/math/tools/promotion.hpp> 25 inline typename boost::math::tools::promote_args<T>::type
28 return -
log(y ? y_hat : (1.0 - y_hat));
fvar< T > log(const fvar< T > &x)
fvar< T > binary_log_loss(int y, const fvar< T > &y_hat)