mosaicmpi.dataset.Dataset.validate_feature_stats

mosaicmpi.dataset.Dataset.validate_feature_stats#

Dataset.validate_feature_stats(tolerance: float = 0.0001) DataFrame#

Validate the dataset and cNMF solutions for each rank by comparing the calculated feature statistics (mean, SD, variance) stored in the object [self.adata.var] to those calculated from the dataset’s data matrices [based on self.adata.X]. This can be a quick and sensitive way to assess that the dataset’s underlying data has not been altered.

Parameters:

tolerance (float, optional) – maximum relative error for any k when computing the prediction error, defaults to 0.0001

Raises:

ValueError – if the maximum relative error exceeds the tolerance

Returns:

DataFrame with relative error for each feature

Return type:

pd.DataFrame