Learn R Programming

fdm2id (version 1.0.1)

data.parabol: Parabol dataset

Description

Generate a random dataset shaped like a parabol and a gaussian distribution

Usage

data.parabol(
  n = c(500, 100),
  xlim = c(-3, 3),
  center = c(0, 4),
  coeff = 0.5,
  sigma = c(0.5, 0.5),
  levels = NULL,
  graph = FALSE,
  seed = NULL
)

Value

A randomly generated dataset.

Arguments

n

Number of observations in each class.

xlim

Minimum and maximum on the x axis.

center

Coordinates of the center of the gaussian distribution.

coeff

Coefficient of the parabol.

sigma

Variance in each class.

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.target1, data.target2, data.twomoons, data.xor

Examples

Run this code
data.parabol (graph = TRUE)

Run the code above in your browser using DataLab