View source: R/mlbench-class.R

mlbench.circle | R Documentation |

The inputs of the circle problem are uniformly distributed on
the `d`

-dimensional cube with corners `\{\pm 1\}`

.
This is a 2-class problem: The first class is a `d`

-dimensional
ball in the middle of the cube, the remainder forms the second
class. The size of the ball is chosen such that both classes have equal
prior probability 0.5.

```
mlbench.circle(n, d=2)
```

`n` |
number of patterns to create |

`d` |
dimension of the circle problem |

Returns an object of class `"mlbench.circle"`

with components

`x` |
input values |

`classes` |
factor vector of length |

```
# 2d example
p<-mlbench.circle(300,2)
plot(p)
#
# 3d example
p<-mlbench.circle(300,3)
plot(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.