fitModelKNN_CV: Generate KNN classifier with LOOCV

Description Usage Arguments Value Author(s) Examples

Description

Fits trajectory data into a K-nearest neighbors classifier using leave one out cross validation.

Usage

1
fitModelKNN_CV(trajDataFrame, labelVector, kVal)

Arguments

trajDataFrame

A data frame with measures for each trajectory. This can be produced by function trajMeasures

labelVector

A vector of labels for each trajectory. Its length must be equal to the number of rows in trajDataFrame

kVal

The number of neighbors used for classification

Value

A vector of classified labels for each trajectory

Author(s)

Ayan Bandyopadhyay, Bellarmine College Prep 11/26/2015

Examples

1
2
3
data <- as.data.frame(matrix(1:4,nrow = 2,ncol = 2))
labels <- c("live","dead")
classifierKNN_CV<- fitModelKNN_CV(data,labels,3)

Ayan1/Cell-Trajectory-Analysis documentation built on May 5, 2019, 9:23 a.m.