Learn R Programming

tabularMLC (version 0.0.4)

MLC: Maximum Likelihood Classifier

Description

Function to create the classifier class from the training set

Usage

MLC(x, ...)

# S3 method for formula MLC(formula, data = NULL, ...)

# S3 method for default MLC(x, y = NULL, ...)

Value

An object of class MLC.model parameters used for the model

Arguments

x

feature vector for the training set

...

for other signatures

formula

formula. The formula for defining the model.

data

the dataset

y

factor vector with the training set labels

Examples

Run this code
data(iris)

x = iris[, -5]
y = iris$Species

# Default x y interface
mlcModel1 = MLC(x, y)

# Formula interface
mlcModel2 = MLC(Species ~ Petal.Length + Petal.Width, iris)

# Formula except one column
mlcModel3 = MLC(Species ~ . - Sepal.Length, iris)

Run the code above in your browser using DataLab