HoloNet.predicting.adj_normalize#
- HoloNet.predicting.adj_normalize(adj, cell_type_tensor, only_between_cell_type=True)#
Process the relationship among cells (such as multi-view CE network or spatial proximity matrix) to form the normalized adjancency matrix as the input of GNN.
- Parameters
- cell_type_tensor
Tensor cell_num * cell_type_num, derived from ‘get_continuous_cell_type_tensor’ or ‘get_one_hot_cell_type_tensor’ function.
- adj
Tensor view_num * cell_num * cell_num, can be multi-view CE network or spatial proximity matrix
- only_between_cell_type
bool(default:True) if True, will remove the edges between two cells with the same cell-type, to control the confounding factors.
- cell_type_tensor
- Return type
Tensor- Returns
: Normalized adjancency matrix as the input of GNN.