Hi I was hoping If anyone could help me with the following.
I have data "hotel reviews", There are 7 different hotels in total with coloms such as good review, bad review, avg score, date etc. First I had to calculate the MCC score for each hotel. I did it with the following:
statsConfusionMatrix <- function(sentlabels, preds) {
mytab<- table(sentlabels, preds)
TP = as.numeric(mytab[2,2])
TN = as.numeric(mytab[1,1])
FN = as.numeric(mytab[2,1])
FP = as.numeric(mytab[1,2])
MCC = (TP * TN - FP * FN) / (sqrt((TP + FP) * (TP + FN) * (TN + FP) * (TN + FN)))
return(list(MCC))
}
myresults=list()
Now I have to research for each hotel with a high enough score (MCC> 0.2), whether there are negative comments made all over the beds.
I don't know how to proceed any further.