\HeaderA{mlbench.spirals}{Two Spirals Benchmark Problem}{mlbench.spirals}
\aliasA{mlbench.1spiral}{mlbench.spirals}{mlbench.1spiral}
\keyword{datagen}{mlbench.spirals}
\begin{Description}\relax
The inputs of the spirals problem are points on two entangled spirals. If
\code{sd>0}, then Gaussian noise is added to each data
point. \code{mlbench.1spiral} creates a single spiral.
\end{Description}
\begin{Usage}
\begin{verbatim}
mlbench.spirals(n, cycles=1, sd=0)
mlbench.1spiral(n, cycles=1, sd=0)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{n}] number of patterns to create
\item[\code{cycles}] the number of cycles each spiral makes
\item[\code{sd}] standard deviation of data points around the spirals
\end{ldescription}
\end{Arguments}
\begin{Value}
Returns an object of class \code{"mlbench.spirals"} with components
\begin{ldescription}
\item[\code{x}] input values
\item[\code{classes}] factor vector of length \code{n} with target classes
\end{ldescription}
\end{Value}
\begin{Examples}
\begin{ExampleCode}
# 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)
\end{ExampleCode}
\end{Examples}

