run.knn.classifier - Run KNN classifier
Arguments
- train.dat
NO DEFAULT. data.frame. A dataframe containing cells (rows) vs features/markers (columns) to be used to train classifier.
- unlabelled.dat
NO DEFAULT. data.frame. A dataframe containing cells (rows) vs features/markers (columns) that is the data classified.
- use.cols
NO DEFAULT. Vector of column names to use for training k-nearest neighbour (KNN) classifier.
- label.col
NO DEFAULT. Character. Name of the column representing the population name of the cells in dat.
- num.neighbours
DEFAULTS to 1. Numeric. When using a k-nearest neighbour classifier, then this parameter specifies the number of nearest neighbours.
Train a k-NN classifier on a training data, and use it to classify an unlabelled data. Note that for the classifier to work as intended, the unlabelled.data has to be normalised to the range of the train.data. Note make sure that train.data and unlabelled.data has exactly the same features/markers.
Author
Givanna Putri, ghar1821@uni.sydney.edu.au