diff --git a/cml/domain/data_source.py b/cml/domain/data_source.py index 08656408f714f599f66f9263d4e2680785995a26..c877ae19febc2205ada345fc7c5ee3d98a298b60 100644 --- a/cml/domain/data_source.py +++ b/cml/domain/data_source.py @@ -108,6 +108,16 @@ class DataSource: def __len__(self): return self.__source.length + def get_block(self, indices=None): + return self.__source.get_block_via_index(indices) + + def time_sigma_relatives(self, block): + return next(iter(self.__learnblock_identifier._identify_relatives( + block, "T", "Sigma"))) + + def estimate_density(self, data): + return self.__learnblock_identifier.density_estimator(data).density() + class Preprocessor: TIME_COLUMN = "T"