text classification - R package mldr example code outputs error message and different results -
in vignette of package, following example presented demonstrate evaluation function, mldr_evaluate:
# true labels in emotions predictions <- as.matrix(emotions$dataset[,emotions$labels$index]) # , introduce noise predictions[sample(1:593, 100),sample(1:6, 100, replace = true) <-sample(0:1, 100, replace = true) # evaluate predictive performance res <- mldr_evaluate(emotions, predictions) str(res) ## list of 20 ## $ accuracy : num 0.914 ## $ auc : num 0.916 ## $ averageprecision: num 0.669 ## $ coverage : num 2.73 ## $ fmeasure : num 0.947 ## $ hammingloss : num 0.0863 ## $ macroauc : num 0.915 ## $ macrofmeasure : num 0.865 however, when run r locally exact same code, get:
library(mldr) predictions <- as.matrix(emotions$dataset[, emotions$labels$index]) # , introduce noise (alternatively predictions classifier) predictions[sample(1:593, 100), sample(1:6, 100, replace = true)] <- sample(0:1, 100, replace = true) # evaluate predictive performance res <- mldr_evaluate(emotions, predictions) str(res) list of 20 $ accuracy : num 0.915 $ auc : null $ averageprecision: num 0.672 $ coverage : num 2.72 $ fmeasure : num 0.95 $ hammingloss : num 0.0854 $ macroauc : null $ macrofmeasure : num 0.866 alongside many of these error messages, have not been able interpret (what function reports them, line, etc):
1: in min(x) : no non-missing arguments min; returning inf finally, sessioninfo():
> sessioninfo() r version 3.3.2 (2016-10-31) platform: x86_64-w64-mingw32/x64 (64-bit) running under: windows server >= 2012 x64 (build 9200) (...) other attached packages: [1] mldr_0.3.22 clearly, roc curves , drawing, far have gotten, not deeper it.
Comments
Post a Comment