svgbit.core.density.hotspot_AI#
- svgbit.core.density.hotspot_AI(hotspot_df: pandas.core.frame.DataFrame, weight_df: pandas.core.frame.DataFrame, knn: Union[pandas.core.frame.DataFrame, libpysal.weights.weights.W], cores: int = 2) Tuple[pandas.core.series.Series, pandas.core.frame.DataFrame][source]#
Calculate Spatial Transcriptomics AI value for all genes.
- Parameters
- hotspot_dfpd.DataFrame
A hotspot DataFrame generated by svgbit.
- weight_dfpd.DataFrame
Weight used by AI. In default, svgbit uses local Moran’s I p value as weight.
- knnpd.DataFrame or libpysal.weights.W
KNN network used for neighbor idenfication.
- coresint
Number of threads to run svgbit. Use all available cpus by default.
- Returns
- ai_seriespd.Series
A Series for AI value.
- di_dfpd.DataFrame
A DataFrame for local Di value.