This function generates a plot (ggplot2) of the decision surface for a 2d classifier.
1 | plot_decision_surface(model, X, Y, title = NULL, interpolate = FALSE, ...)
|
model |
a model object for which prediction is desired. E.g. object of class
|
X |
Numeric matrix (n * 2) with n observations of 2 variables |
Y |
Numeric matrix with n observations of 1 variable |
title |
Title text for the plot. |
interpolate |
If TRUE interpolate linearly, if FALSE (the default) don't interpolate. |
... |
Further arguments passed to model.predict() |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.