You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
- $\begingroup$ The points on a ROC curve are obtained by varying the threshold over a predicted score or probability, so if you only have the final "hard" predictions you can't do a ROC curve. $\endgroup$Erwan– Erwan2019-12-07 17:38:39 +00:00Commented Dec 7, 2019 at 17:38
- $\begingroup$ @erwan can't i change the parameter manually and plot with some library that knows how to calculate false/true positive? $\endgroup$Gulzar– Gulzar2019-12-07 18:20:05 +00:00Commented Dec 7, 2019 at 18:20
- $\begingroup$ it's not about calculating the TP/FP: from your current output which is a single set of predictions, you will get 1 value for true positive rate and false positive rate, i.e. 1 single point for the curve. you need to have different "series" of predictions, each corresponding to one point, and this is possible if you get the probability instead of just the binary prediction, because you obtain different "series" of predictions by moving the threshold over the probabilities. $\endgroup$Erwan– Erwan2019-12-07 18:48:06 +00:00Commented Dec 7, 2019 at 18:48
- $\begingroup$ @Erwan I do have control over the C parameter of the LinearSVC. Can't I just choose many values, train it for them, and see all the values that come out? $\endgroup$Gulzar– Gulzar2019-12-07 18:54:01 +00:00Commented Dec 7, 2019 at 18:54
- 1$\begingroup$ you could try, but it's unlikely to give you the same kind of variation as varying a threshold so you might end up with just a bunch of points in the same area instead of a ROC progression. If you really want a ROC and can't have probabilities you could train a regression model instead of a classification model: in the training set 0 and 1 would be treated as real numbers, so in the test set you would get predictions mostly between 0 and 1: these predicted values could be used as "probabilities". $\endgroup$Erwan– Erwan2019-12-07 19:28:36 +00:00Commented Dec 7, 2019 at 19:28
Add a comment |
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
- MathJax equations
$\sin^2 \theta$
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. machine-learning), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you