ringData: Generation of a Binary Classification Problem with Two...

Description Usage Arguments Value

View source: R/ringData.R

Description

Generation of a binary classification problem with two Gaussian distributions with euqal means and different covariance matrices.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  ringData(n, prior = rep(0.5, 2), sigma1 = diag(2),
    sigma2 = 2 * diag(2))

  ringLabels(data, prior = rep(0.5, 2), sigma1 = diag(2),
    sigma2 = 2 * diag(2))

  ringPosterior(data, prior = rep(0.5, 2),
    sigma1 = diag(2), sigma2 = 2 * diag(2))

  ringBayesClass(data, prior = rep(0.5, 2),
    sigma1 = diag(2), sigma2 = 2 * diag(2))

Arguments

n

Number of observations.

prior

Vector of class prior probabilities.

sigma1

Covariance matrix for class 1.

sigma2

Covariance matrix for class 2.

data

A data.frame.

Value

ringData returns an object of class "locClass", a list with components:

x

(A matrix.) The explanatory variables.

y

(A factor.) The class labels.

ringLabels returns a factor of class labels.

ringPosterior returns a matrix of posterior probabilities.

ringBayesClass returns a factor of Bayes predictions.


locClassData documentation built on May 2, 2019, 5:26 p.m.