Description Usage Arguments Value Author(s) References See Also Examples

View source: R/VCR_visualization.R

Draw the class map to visualize classification results, based on the output of one of the
`vcr.*.*`

functions in this package. The vertical axis of the class map shows each case's `PAC`

, the conditional probability that it belongs to an alternative class. The `farness`

on the horizontal axis is the probability of a member of the given class being at most as far from the class as the case itself.

1 2 3 4 5 |

`vcrout` |
output of |

`whichclass` |
the number or level of the class to be displayed. Required. |

`classLabels` |
the labels (levels) of the classes. If |

`classCols` |
a list of colors for the class labels. There should be at least as many as there are levels. If |

`main` |
title for the plot. |

`cutoff` |
cases with overall farness |

`plotcutoff` |
If true, plots the cutoff on the farness values as a vertical line. |

`identify` |
if |

`cex` |
passed on to |

`cex.main` |
same, for title. |

`cex.lab` |
same, for labels on horizontal and vertical axes. |

`cex.axis` |
same, for axes. |

`opacity` |
determines opacity of plotted dots. Value between 0 and 1, where 0 is transparent and 1 is opaque. |

`squareplot` |
If |

`maxprob` |
draws the farness axis at least upto probability maxprob. If |

`maxfactor` |
if not |

Executing the function plots the class map and returns

`coordinates` |
a matrix with 2 columns containing the coordinates of the plotted points. The first coordinate is the quantile of the farness probability. This makes it easier to add text next to interesting points. If |

Raymaekers J., Rousseeuw P.J.

Raymaekers J., Rousseeuw P.J., Hubert M. (2021). Class maps for visualizing classification results. *Technometrics*, appeared online. doi: 10.1080/00401706.2021.1927849(link to open access pdf)

Raymaekers J., Rousseeuw P.J.(2021). Silhouettes and quasi residual plots for neural nets and tree-based classifiers. (link to open access pdf)

`vcr.da.train`

, `vcr.da.newdata`

,

`vcr.knn.train`

, `vcr.knn.newdata`

,

`vcr.svm.train`

, `vcr.svm.newdata`

,

`vcr.rpart.train`

, `vcr.rpart.newdata`

,

`vcr.forest.train`

, `vcr.forest.newdata`

,

`vcr.neural.train`

, `vcr.neural.newdata`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
vcrout <- vcr.da.train(iris[, 1:4], iris[, 5])
classmap(vcrout, "setosa", classCols = 2:4) # tight class
classmap(vcrout, "versicolor", classCols = 2:4) # less tight
# The cases misclassified as virginica are shown in blue.
classmap(vcrout, "virginica", classCols = 2:4)
# The case misclassified as versicolor is shown in green.
# For more examples, we refer to the vignettes:
## Not run:
vignette("Discriminant_analysis_examples")
vignette("K_nearest_neighbors_examples")
vignette("Support_vector_machine_examples")
vignette("Rpart_examples")
vignette("Random_forest_examples")
vignette("Neural_net_examples")
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.