SPACEL.Splane.model.init_model
- SPACEL.Splane.model.init_model(expr_ad_list, n_clusters, k=2, use_weight=True, train_prop=0.5, n_neighbors=6, min_prop=0.01, lr=0.003, l1=0.01, l2=0.01, latent_dim=16, hidden_dims=64, gnn_dropout=0.8, simi_neighbor=1, use_gpu=None, seed=42)
Initialize Splane model.
Build the model then set the data and paratemters.
- Parameters:
expr_ad_list (
list
) – A list of AnnData object of spatial transcriptomic data as the model input.n_clusters (
int
) – The number of cluster of the model ouput.k (
int
) – The order of neighbors of a spot for graph construction.use_weight – If True, the cell type proportion of Moran was used as the weight of the loss.
train_prop (
float
) – The proportion of training set.n_neighbors – The number of neighbors for graph construction.
lr (
float
) – Learning rate of training.latent_dim (
int
) – The dimension of latent features. It equal to the number of nodes of bottleneck layer.hidden_dims (
int
) – The number of nodes of hidden layers.gnn_dropout (
float
) – The dropout rate of GNN model.simi_neighbor – The order of neighbors used for similarity loss. If is None, It equal to the order used for constructed graph.
seed – Random number seed.
- Return type:
SplaneModel
- Returns:
A
DataFrame
contained deconvoluted results. Each row representing a spot, and each column representing a cell type.