lol.classify.nearestCentroid: Nearest Centroid Classifier Training

Description Usage Arguments Value Details Author(s) Examples

View source: R/centroid.R

Description

A function that trains a classifier based on the nearest centroid.

Usage

1

Arguments

X

[n, d] the data with n samples in d dimensions.

Y

[n] the labels of the n samples.

...

optional args.

Value

A list of class nearestCentroid, with the following attributes:

centroids

[K, d] the centroids of each class with K classes in d dimensions.

ylabs

[K] the ylabels for each of the K unique classes, ordered.

priors

[K] the priors for each of the K classes.

Details

For more details see the help vignette: vignette("centroid", package = "lolR")

Author(s)

Eric Bridgeford

Examples

1
2
3
4
library(lolR)
data <- lol.sims.rtrunk(n=200, d=30)  # 200 examples of 30 dimensions
X <- data$X; Y <- data$Y
model <- lol.classify.nearestCentroid(X, Y)

neurodata/lol documentation built on March 3, 2021, 1:46 a.m.