Predict labels

Created on Wed Oct 23 14:16:59 2019

@author: Lieke

scHPL.predict.predict_labels(testdata, tree: TreeNode, threshold: float = 0.5, gpu=None)[source]

Use the trained tree to predict the labels of a new dataset.

Parameters:
  • testdata (array_like) – Data to classify (cells x genes)

  • tree (TreeNode) – Trained classification tree

  • threshold (Float = 0.5) – If prediction probability lower that this threshold, a cell is rejected. (only used when using kNN classifier)

Returns:

  • Predicted labels

  • Probability of the predicted labels (only works for kNN, since SVM – doesn’t return probabilities)

scHPL.predict.tqdm(x)[source]