Description Usage Arguments Examples

View source: R/mlbench-class.R

Returns the decision of the (optimal) Bayes classifier for a given data set. This is a generic function, i.e., there are different methods for the various mlbench problems.

If the classes of the problem do not overlap, then the Bayes
decision is identical to the true classification, which is
implemented as the dummy function `bayesclass.noerr`

(which
simply returns `z$classes`

and is used for all problems with
disjunct classes).

1 | ```
bayesclass(z)
``` |

`z` |
An object of class |

1 2 3 4 5 | ```
# 6 overlapping classes
p <- mlbench.2dnormals(500,6)
plot(p)
plot(p$x, col=as.numeric(bayesclass(p)))
``` |

```
```

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.