popv.algorithms.XGboost#
- class popv.algorithms.XGboost(batch_key='_batch_annotation', labels_key='_labels_annotation', layer_key=None, result_key='popv_xgboost_prediction', classifier_dict={})[source]#
Class to compute XGboost classifier.
- Parameters:
batch_key (
str|None(default:'_batch_annotation')) – Key in obs field of adata for batch information.labels_key (
str|None(default:'_labels_annotation')) – Key in obs field of adata for cell-type information.layer_key (
str|None(default:None)) – Key in layers field of adata used for classification. By default uses ‘X’ (log1p10K).result_key (
str|None(default:'popv_xgboost_prediction')) – Key in obs in which celltype annotation results are stored.classifier_dict (
str|None(default:{})) – Dictionary to supply non-default values for XGboost classifier. Options atxgboost.train(). Default is {‘tree_method’: ‘hist’, ‘device’: ‘cuda’ if settings.cuml else ‘cpu’, ‘objective’: ‘multi:softprob’}.
Methods table#
|
Compute integration of adata inplace. |
|
Compute UMAP embedding of adata inplace. |
|
Predict celltypes using XGboost. |