Learn R Programming

lolR (version 2.1)

lol.classify.randomChance: Randomly Chance Classifier Training

Description

A function that predicts the maximally present class in the dataset. Functionality consistent with the standard R prediction interface so that one can compute the "chance" accuracy with minimal modification of other classification scripts.

Usage

lol.classify.randomChance(X, Y, ...)

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 randomGuess, with the following attributes:

ylabs

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

priors

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

Examples

Run this code
# NOT RUN {
library(lolR)
data <- lol.sims.rtrunk(n=200, d=30)  # 200 examples of 30 dimensions
X <- data$X; Y <- data$Y
model <- lol.classify.randomChance(X, Y)
# }

Run the code above in your browser using DataLab