Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble with plotting roc curve(yardstick) in some models #93

Open
lucaszago opened this issue Jul 27, 2020 · 1 comment
Open

Trouble with plotting roc curve(yardstick) in some models #93

lucaszago opened this issue Jul 27, 2020 · 1 comment

Comments

@lucaszago
Copy link

Thanks for giving us feedback on the book. Please follow these guidelines:

Comments or questions on the content

Please tell us where exactly the issue is (e.g. chapter, section, figure number, etc.) and, whenever possible, copy/paste the text in question using > in the issue. Also, please state the version of the book by referencing the date on the book's first page (under the title and authors).

See this issue as an example:

In the version dated "2018-05-12", capitalization in article/book names are inconsistent. Also, sometimes initials are used for names, sometimes not: 

> Agresti, Alan. 2012. Categorical Data Analysis. Wiley-Interscience.
> Altman, D. 1991. “Categorising Continuous Variables.” British Journal of Cancer, no. 5:975.

@lucaszago
Copy link
Author

I`m new in r, and I was not really sure which place I could post my doubt:

I was trying to do a roc curve for 2 models:

knn_res %>%
unnest(.predictions) %>%
mutate(model ="kknn") %>% #adicionando uma coluna
bind_rows(tree_res %>%
unnest(.predictions) %>%
mutate(model ="rpart")) %>%
group_by(model) %>%
roc_curve(new_renda, .pred_abaixo) %>%
autoplot()

And I received this error: Error in roc.default(response = integer(0), predictor = numeric(0), levels = c("acima", :
No control observation.

Could you help me how to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant