spateo.tdr.interpolations.interpolation_sparseVFC ================================================= .. py:module:: spateo.tdr.interpolations.interpolation_sparseVFC Functions --------- .. autoapisummary:: spateo.tdr.interpolations.interpolation_sparseVFC.kernel_interpolation Module Contents --------------- .. py:function:: kernel_interpolation(source_adata: anndata.AnnData, target_points: Optional[numpy.ndarray] = None, keys: Union[str, list] = None, spatial_key: str = 'spatial', layer: str = 'X', lambda_: float = 0.02, lstsq_method: str = 'scipy', **kwargs) -> anndata.AnnData Learn a continuous mapping from space to gene expression pattern with Kernel method (sparseVFC). :param source_adata: AnnData object that contains spatial (numpy.ndarray) in the `obsm` attribute. :param target_points: The spatial coordinates of new data point. If target_coords is None, generate new points based on grid_num. :param keys: Gene list or info list in the `obs` attribute whose interpolate expression across space needs to learned. :param spatial_key: The key in ``.obsm`` that corresponds to the spatial coordinate of each bucket. :param layer: If ``'X'``, uses ``.X``, otherwise uses the representation given by ``.layers[layer]``. :param lambda_: Represents the trade-off between the goodness of data fit and regularization. Larger Lambda_ put more weights on regularization. :param lstsq_method: The name of the linear least square solver, can be either 'scipy` or `douin`. :param \*\*kwargs: Additional parameters that will be passed to SparseVFC function. :returns: an anndata object that has interpolated expression. :rtype: interp_adata