spateo.tdr.morphometrics.morphofield.gaussian_process ===================================================== .. py:module:: spateo.tdr.morphometrics.morphofield.gaussian_process Functions --------- .. autoapisummary:: spateo.tdr.morphometrics.morphofield.gaussian_process._con_K spateo.tdr.morphometrics.morphofield.gaussian_process._con_K_geodist spateo.tdr.morphometrics.morphofield.gaussian_process._gp_velocity spateo.tdr.morphometrics.morphofield.gaussian_process.morphofield_gp Module Contents --------------- .. py:function:: _con_K(x: numpy.ndarray, y: numpy.ndarray, beta: float = 0.1, method: str = 'cdist', return_d: bool = False) -> Union[Tuple[numpy.ndarray, numpy.ndarray], numpy.ndarray] .. py:function:: _con_K_geodist(x: numpy.ndarray, kernel_dict: dict, beta: float = 0.1, return_d: bool = False) -> Union[Tuple[numpy.ndarray, numpy.ndarray], numpy.ndarray] .. py:function:: _gp_velocity(X: numpy.ndarray, vf_dict: dict, nonrigid_only: bool = False) -> numpy.ndarray .. py:function:: morphofield_gp(adata: anndata.AnnData, spatial_key: str = 'align_spatial', vf_key: str = 'VecFld_morpho', NX: Optional[numpy.ndarray] = None, grid_num: Optional[List[int]] = None, nonrigid_only: bool = False, inplace: bool = True) -> Optional[anndata.AnnData] Calculating and predicting the vector field during development by the Gaussian Process method. :param adata: AnnData object that contains the cell coordinates of the two states after alignment. :param spatial_key: The key from the ``.obsm`` that corresponds to the spatial coordinates of each cell. :param vf_key: The key in ``.uns`` that corresponds to the reconstructed vector field. :param key_added: The key that will be used for the vector field key in ``.uns``. :param NX: The spatial coordinates of new data point. If NX is None, generate new points based on grid_num. :param grid_num: The number of grids in each dimension for generating the grid velocity. Default is ``[50, 50, 50]``. :param nonrigid_only: If True, only the nonrigid part of the vector field will be calculated. :param inplace: Whether to copy adata or modify it inplace. :returns: An ``AnnData`` object is updated/copied with the ``key_added`` dictionary in the ``.uns`` attribute. The ``key_added`` dictionary which contains: X: Cell coordinates of the current state. V: Developmental direction of the X. grid: Grid coordinates of current state. grid_V: Prediction of developmental direction of the grid. method: The method of learning vector field. Here method == 'gaussian_process'.