2021年1月5日星期二

How to calculate Accuracy F1-Score Precision Sensitivity etc

I'm trying to learn R. So I found some practices on internet this is one of them. I want to calculate Accuracy, F1-Score, Precision, Sensitivity etc from this code. But I can't even calculate confusionmatrix. What should i do? any one help

net = neuralnet(formul,data=train_data,hidden=5,linear.output=FALSE)  plot(net)  predict_net_test <- compute(net,test_data[,1:9])  predict_result<-round(predict_net_test$net.result, digits = 0)  net.prediction = c("benign", "malignant")[apply(predict_result, 1, which.max)]  predict.table = table(cleanedData$Class[-index], net.prediction)  predict.table    CrossTable(x = cleanedData$Class[-index], y = net.prediction,         prop.chisq=FALSE)  
https://stackoverflow.com/questions/65588769/how-to-calculate-accuracy-f1-score-precision-sensitivity-etc January 06, 2021 at 09:01AM

没有评论:

发表评论