predict: Inference of classes based on received parameters of...

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

The function receives a model containing the parameters of the classifier and a data matrix to be classified Using the parameters and data, the classes/labels of input data is infered and returned as a vector.

Usage

1

Arguments

model

Large-margin classifier parameters computed using GGClassification::model function.

X

Data matrix to be classified.

Value

A vector of labels returned by the classifier.

Examples

1
2
3
4
5
6
7
8
X <- matrix(0.3 * rnorm(100) + 2.5, ncol = 2)
y <- c(rep(0, times = 25), rep(1, times = 25))

mdl <- model(X, y)

x_prd <- matrix(0.3 * rnorm(100) + 4.5, ncol=2)

y_hat <- predict(mdl, x_prd)

GGClassification documentation built on April 14, 2020, 5:36 p.m.