R语言里怎么求二元分类的log-loss?
谢谢!
2个回答
自己写一个咯
LogLoss <- function(actual, predicted){
result=-1/length(actual)*(sum((actual*log(predicted)+(1-actual)*log(1-predicted))))
return(result)
}
R语言里怎么求二元分类的log-loss?
谢谢!
自己写一个咯
LogLoss <- function(actual, predicted){
result=-1/length(actual)*(sum((actual*log(predicted)+(1-actual)*log(1-predicted))))
return(result)
}