predict.RemoraModel {frbf}R Documentation

Predict Classification

Description

The predict.RemoraModel funcion overloads the predict function to support the trained model contained in the RemoraModel class. This function recieves the model, a data matrix to classify, and classifies, i.e. predicts, to which class each of the given data points belong to.

Usage

predict.RemoraModel(object, data_matrix, ...)

Arguments

object the model, obtained from the learning procedure (see frbf)
data_matrix the data to classify
... additional arguments affecting the predictions produced

Details

The data_matrix can be a matrix or data.frame. It can have the class column if it has the same name, or index, as the training matrix used in frbf). In such case it will be automatically ignored, otherwise the class column cannot be present in the data set.

Value

The result is a prediction list containing the class name of each data point. The position of the data point in result is the same as the position in the matrix given for classification.

Author(s)

Fernando Martins and Andre Falcao

References

Andre O. Falcao, Thibault Langlois and Andreas Wichert (2006) Flexible kernels for RBF networks. Jornal of Neurocomputing, volume 69, pp 2356-2359. Elsevier.

See Also

frbf RemoraModel

Examples

# infert data is composed by 248 points and will be splitted 
data(infert) 
# the training matrix will be use the first 100 points 
training_matrix <- infert[c(1:100) ,] 
# the matrix to classify will use all the other points 
classification_matrix <- infert[c(101:248) ,] 

# create the model
model <- frbf(training_matrix, class_name = "education", number_clusters = 10, scale_variance = FALSE)

# predict 
classification <- predict(model, classification_matrix) 

# the classification points for the last 
print(classification) 

[Package frbf version 1.0.1 Index]