Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mlbench.spirals

Two Spirals Benchmark Problem


Description

The inputs of the spirals problem are points on two entangled spirals. If sd>0, then Gaussian noise is added to each data point. mlbench.1spiral creates a single spiral.

Usage

mlbench.spirals(n, cycles=1, sd=0)
mlbench.1spiral(n, cycles=1, sd=0)

Arguments

n

number of patterns to create

cycles

the number of cycles each spiral makes

sd

standard deviation of data points around the spirals

Value

Returns an object of class "mlbench.spirals" with components

x

input values

classes

factor vector of length n with target classes

Examples

# 1 cycle each, no noise
p<-mlbench.spirals(300)
plot(p)
#
# 1.5 cycles each, with noise
p<-mlbench.spirals(300,1.5,0.05)
plot(p)

mlbench

Machine Learning Benchmark Problems

v2.1-3
GPL-2
Authors
Friedrich Leisch and Evgenia Dimitriadou.
Initial release
2021-01-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.