i have trained SVM classification models based on probability prediction for recognision numbers 0-9. I have visualization of probality for every model, looks like this for number 0 -data of probability are in variable prediction0
Then i have trained final classificator and i have 1423 correct observations (from 1499) - i have vector c= containing numbers correctly predicted
What i need to do, is when was 0 correctly predicted in vector c, mark that point on red on this graf. If it helps i have "ck" containing probalities for all number prediction for every test sample, where i get maximum probality, which was my final prediction.
CodePudding user response:
You can do this by using the col
argument. I'll use the mtcars dataset as an example
plot(
mpg~disp,
data=mtcars,
col=ifelse(mtcars$am==0,"red","blue")
)