uniport.data_loader.load_data
- uniport.data_loader.load_data(adatas, mode='h', use_rep=['X', 'X'], num_cell=None, max_gene=None, adata_cm=None, use_specific=False, domain_name='domain_id', batch_size=256, drop_last=True, shuffle=True, num_workers=4)[source]
Load data for training.
- Parameters:
adatas – A list of AnnData matrice.
mode – training mode. Choose between [‘h’, ‘d’, ‘v’].
use_rep – use ‘.X’ or ‘.obsm’.
num_cell – numbers of cells of each adata in adatas.
max_gene – maximum number of genes of each adata in adatas.
adata_cm – adata with common genes of adatas.
use_specific – use dataset-specific genes.
domain_name – domain name of each adata in adatas.
batch_size – size of each mini batch for training.
drop_last – drop the last samples that not up to one batch.
shuffle – shuffle the data
num_workers – number parallel load processes according to cpu cores.
- Returns:
trainloader – data loader for training
testloader – data loader for testing