Description Usage Arguments Value
View source: R/twonormLinearData.R
Generate a binary classification problem with two Gaussian distributions with different means and equal covariance matrices.
1 2 3 4 5 6 7 8 9 10 11 | twonormLinearData(n, prior = rep(0.5, 2), mu1 = c(1, 0),
mu2 = c(0, -1), sigma = diag(2))
twonormLinearLabels(data, prior = rep(0.5, 2),
mu1 = c(1, 0), mu2 = c(0, -1), sigma = diag(2))
twonormLinearPosterior(data, prior = rep(0.5, 2),
mu1 = c(1, 0), mu2 = c(0, -1), sigma = diag(2))
twonormLinearBayesClass(data, prior = rep(0.5, 2),
mu1 = c(1, 0), mu2 = c(0, -1), sigma = diag(2))
|
n |
Number of observations. |
prior |
Vector of class prior probabilities. |
mu1 |
Class center of first class, a vector. |
mu2 |
Class center of second class, a vector. |
sigma |
Covariance matrix for classes 1 and 2. |
data |
A |
twonormLinearData
returns an object of class
"locClass"
, a list with components:
x |
(A matrix.) The explanatory variables. |
y |
(A factor.) The class labels. |
twonormLinearLabels
returns a factor of class
labels.
twonormLinearPosterior
returns a matrix of
posterior probabilities.
twonormLinearBayesClass
returns a factor of Bayes
predictions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.