SuperSCC.label_transfer.predict_label
- SuperSCC.label_transfer.predict_label(query_data, models, wk_dir='/home/docs/checkouts/readthedocs.org/user_builds/superscc/checkouts/latest/docs/source', normalization_method='Min-Max', magic_based_imputation=False, pred_confidence_cutoff=None, filname=None, save=True, logger=None)[source]
A function to predict label and score the prediction by using pre-trained model.
- Parameters:
query_data – A log normalized expression matrix. Rows are cells; Columns are features.
models – A regular expression to match the name of pre-trained models. Otherwise, a dict returned by load_pick_file function.
wk_dir – A string to specify the directory where pre-trained model files should be searched.
normalization_method – A string to decide how to normalize query data. Default is “Min-Max”. Other available words including “Standardization”. This parameter should be same as the one when running the model training, thereby guaranteeing same normalization on query and reference.
magic_based_imputation – A Bool value to decide whether MAGIC-based imputation should be employed. When False, the reference features lost in the query would be padded with 0. Default is False.
pred_confidence_cutoff – A float to decide the prediction accuracy cutoff. If the prediction score is lower than the cut off, the predicted cell label will return ‘uncertain’. Default is None. This argument
filename – A string decide the name of output. Default is None.
save – A Bool value to decide whether the result will be written into disk. Default is True.
logger – A log_file object to write log information into disk. Default is None.