View source: R/run.knn.classifier.R
run.knn.classifier | R Documentation |
run.knn.classifier - Run KNN classifier
run.knn.classifier(train.dat, unlabelled.dat, use.cols, label.col, num.neighbours)
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. |
The predicted label for the unlabelled data.
Givanna Putri, ghar1821@uni.sydney.edu.au
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.