def __get_pruning_matrix(self, k: int, T: float, recompute=False) -> np.ndarray:
     """
     Compute the Pruning Matrix for the given dataset in self.dataset_path. with k coefficients and T threshold.
     If the pruning matrix has been computed previously it is returned without recomputation, unless
     recompute is set to True
     """
     if self.pruning_matrix is not None and recompute is False:
         return self.pruning_matrix
     pmatrix = PruningMatrix(self.norm_ds_path)
     self.pruning_matrix = pmatrix.compute_pruning_matrix(k, T)
     return self.pruning_matrix
def test_Caching(testfiles):
    logging.basicConfig(level=logging.DEBUG)
    name = testfiles["h5100"]
    # name = "/home/george/msc/workspaces/PyCharmWorkspace/TimeSeriesCorrelation/test_resources/h5100.db"
    pm = PruningMatrix(name)
    pm.compute_pruning_matrix(1, 0.7, disable_store=True)

    c = Caching(pm.pruning_matrix, name, 20)
    c.calculate_batches()

    for b in c.batches:
        print(b)

    assert True
 def __get_pruning_matrix(self,
                          k: int,
                          T: float,
                          recompute=False) -> np.ndarray:
     """
     Compute the Pruning Matrix for the given dataset in self.dataset_path. with k coefficients and T threshold.
     If the pruning matrix has been computed previously it is returned without recomputation, unless
     recompute is set to True
     """
     if self.pruning_matrix is not None and recompute is False:
         return self.pruning_matrix
     pmatrix = PruningMatrix(self.norm_ds_path)
     self.pruning_matrix = pmatrix.compute_pruning_matrix(k, T)
     return self.pruning_matrix