KNN-C: KNN-C KEEL Classification Algorithm

Description Usage Arguments Value Examples

Description

KNN-C Classification Algorithm from KEEL.

Usage

1
KNN_C(train, test, k, distance)

Arguments

train

Train dataset as a data.frame object

test

Test dataset as a data.frame object

k

Number of neighbors

distance

Distance function

Value

A data.frame with the actual and predicted classes for both train and test datasets.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data_train <- RKEEL::loadKeelDataset("iris_train")
data_test <- RKEEL::loadKeelDataset("iris_test")

#Create algorithm
algorithm <- RKEEL::KNN_C(data_train, data_test)

#Run algorithm
algorithm$run()

#See results
algorithm$testPredictions

RKEEL documentation built on May 29, 2017, 7:18 p.m.

Search within the RKEEL package
Search all R packages, documentation and source code