Learn R Programming

fdm2id (version 1.0.1)

data.xor: XOR dataset

Description

Generate "XOR" dataset.

Usage

data.xor(
  n = 100,
  ndim = 2,
  sigma = 0.25,
  levels = NULL,
  graph = FALSE,
  seed = NULL
)

Value

A randomly generated dataset.

Arguments

n

Number of observations in each cluster.

ndim

The number of dimensions (2^ndim clusters are formed, grouped into two classes).

sigma

The variance.

levels

Name of each class.

graph

Whether the generated dataset is plotted. FALSE by default, as everywhere else in the package: a generator has to be callable in a loop or a report without piling up graphics devices.

seed

A specified seed for random number generation.

See Also

data.diag, data.gauss, data.parabol, data.target2, data.twomoons

Examples

Run this code
data.xor (graph = TRUE)

Run the code above in your browser using DataLab