{"action":"created","issue":{"url":"https://api.github.com/repos/topepo/caret/issues/160","repository_url":"https://api.github.com/repos/topepo/caret","labels_url":"https://api.github.com/repos/topepo/caret/issues/160/labels{/name}","comments_url":"https://api.github.com/repos/topepo/caret/issues/160/comments","events_url":"https://api.github.com/repos/topepo/caret/issues/160/events","html_url":"https://github.com/topepo/caret/issues/160","id":82931246,"number":160,"title":"\"Something is wrong; all the Accuracy metric values are missing:\"","user":{"login":"randomjohn","id":95573,"avatar_url":"https://avatars.githubusercontent.com/u/95573?v=3","gravatar_id":"","url":"https://api.github.com/users/randomjohn","html_url":"https://github.com/randomjohn","followers_url":"https://api.github.com/users/randomjohn/followers","following_url":"https://api.github.com/users/randomjohn/following{/other_user}","gists_url":"https://api.github.com/users/randomjohn/gists{/gist_id}","starred_url":"https://api.github.com/users/randomjohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randomjohn/subscriptions","organizations_url":"https://api.github.com/users/randomjohn/orgs","repos_url":"https://api.github.com/users/randomjohn/repos","events_url":"https://api.github.com/users/randomjohn/events{/privacy}","received_events_url":"https://api.github.com/users/randomjohn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2015-05-30T22:27:19Z","updated_at":"2016-11-16T03:47:55Z","closed_at":"2015-05-31T16:19:49Z","body":"I have done, from a clean R 3.2.0 (x64 Windows 8) installation:\n    > library(caret)\n    > data(iris)\n    > iris2 <- iris[iris$Species %in% c(\"virginica\",\"setosa\"),]\n    > mod1 <- train(Species~Sepal.Length+Sepal.Width,data=iris2)\n\n```\nnote: only 1 unique complexity parameters in default grid. Truncating the grid to 1 .\n\nSomething is wrong; all the Accuracy metric values are missing:\n    Accuracy       Kappa    \n Min.   : NA   Min.   : NA  \n 1st Qu.: NA   1st Qu.: NA  \n Median : NA   Median : NA  \n Mean   :NaN   Mean   :NaN  \n 3rd Qu.: NA   3rd Qu.: NA  \n Max.   : NA   Max.   : NA  \n NA's   :1     NA's   :1    \nError in train.default(x, y, weights = w, ...) : Stopping\nIn addition: There were 26 warnings (use warnings() to see them)\n> defaultSummary()\nError in defaultSummary() : argument \"data\" is missing, with no default\n> fix(defaultSummary)\n> mod1 <-     train(Species~Sepal.Length+Sepal.Width,data=iris2,trainControl=trainControl(summaryFunction=defaultSummary))\nnote: only 1 unique complexity parameters in default grid. Truncating the grid to 1 .\n\nSomething is wrong; all the Accuracy metric values are missing:\n    Accuracy       Kappa    \n Min.   : NA   Min.   : NA  \n 1st Qu.: NA   1st Qu.: NA  \n Median : NA   Median : NA  \n Mean   :NaN   Mean   :NaN  \n 3rd Qu.: NA   3rd Qu.: NA  \n Max.   : NA   Max.   : NA  \n NA's   :1     NA's   :1    \nError in train.default(x, y, weights = w, ...) : Stopping\nIn addition: There were 26 warnings (use warnings() to see them)\n```\n\n> warnings()\n\nGives me:\n\n```\nWarning messages:\n1: In eval(expr, envir, enclos) :\n  model fit failed for Resample01: mtry=2 Error in randomForest.default(x, y, mtry = param$mtry,     ...) : \n  Can't have empty classes in y.\n\n2: In eval(expr, envir, enclos) :\n  model fit failed for Resample02: mtry=2 Error in randomForest.default(x, y, mtry = param$mtry,     ...) : \n  Can't have empty classes in y.\n(and so forth)\n```\n\nThis is as about a barebones of an example I can give, but basically now caret is unusable as a classification tool because of the above.\n\n```\n> sessionInfo()\nR version 3.2.0 (2015-04-16)\nPlatform: x86_64-w64-mingw32/x64 (64-bit)\nRunning under: Windows 8 x64 (build 9200)\n\nlocale:\n[1] LC_COLLATE=English_United States.1252 \n[2] LC_CTYPE=English_United States.1252   \n[3] LC_MONETARY=English_United States.1252\n[4] LC_NUMERIC=C                          \n[5] LC_TIME=English_United States.1252    \n\nattached base packages:\n[1] stats     graphics  grDevices utils     datasets  methods   base     \n\nother attached packages:\n[1] randomForest_4.6-10 caret_6.0-47        ggplot2_1.0.1      \n[4] lattice_0.20-31    \n\nloaded via a namespace (and not attached):\n [1] Rcpp_0.11.6         compiler_3.2.0      nloptr_1.0.4       \n [4] plyr_1.8.2          iterators_1.0.7     class_7.3-12       \n [7] tools_3.2.0         digest_0.6.8        lme4_1.1-7         \n[10] nlme_3.1-120        gtable_0.1.2        mgcv_1.8-6         \n[13] Matrix_1.2-0        foreach_1.4.2       parallel_3.2.0     \n[16] brglm_0.5-9         SparseM_1.6         proto_0.3-10       \n[19] e1071_1.6-4         BradleyTerry2_1.0-6 stringr_1.0.0      \n[22] gtools_3.5.0        grid_3.2.0          nnet_7.3-9         \n[25] minqa_1.2.4         reshape2_1.4.1      car_2.0-25         \n[28] magrittr_1.5        scales_0.2.4        codetools_0.2-11   \n[31] MASS_7.3-40         splines_3.2.0       pbkrtest_0.4-2     \n[34] colorspace_1.2-6    quantreg_5.11       stringi_0.4-1      \n[37] munsell_0.4.2      \n> \n```\n"},"comment":{"url":"https://api.github.com/repos/topepo/caret/issues/comments/260846407","html_url":"https://github.com/topepo/caret/issues/160#issuecomment-260846407","issue_url":"https://api.github.com/repos/topepo/caret/issues/160","id":260846407,"user":{"login":"ptagne","id":20027768,"avatar_url":"https://avatars.githubusercontent.com/u/20027768?v=3","gravatar_id":"","url":"https://api.github.com/users/ptagne","html_url":"https://github.com/ptagne","followers_url":"https://api.github.com/users/ptagne/followers","following_url":"https://api.github.com/users/ptagne/following{/other_user}","gists_url":"https://api.github.com/users/ptagne/gists{/gist_id}","starred_url":"https://api.github.com/users/ptagne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptagne/subscriptions","organizations_url":"https://api.github.com/users/ptagne/orgs","repos_url":"https://api.github.com/users/ptagne/repos","events_url":"https://api.github.com/users/ptagne/events{/privacy}","received_events_url":"https://api.github.com/users/ptagne/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T03:47:55Z","updated_at":"2016-11-16T03:47:55Z","body":"I got the error message when running the below command:\r\n  \r\n```{r}\r\nset.seed(300)\r\nm <- train(as.factor(default) ~ ., data = credit_resample, method = \"C5.0\", metric = \"kappa\", trControl = ctrl, tuneGrid = grid)\r\n```\r\nThanks"}}
{"actor":{"display_login":"ptagne"}}