Skip to content

Commit

Permalink
minor fixes in kernel matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
v1docq committed Sep 18, 2023
1 parent 64f0c86 commit a2f88e6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def __init__(self, time_series, min_signal_ratio, max_signal_ratio, rec_metric):

def ts_to_recurrence_matrix(self,
threshold=None):
distance_matrix = pdist(metric=self.rec_metric, X=self.time_series.T)
distance_matrix = pdist(metric=self.rec_metric, X=self.time_series.reshape(-1,1))
distance_matrix = np.ones(shape=distance_matrix.shape[0]) - distance_matrix
distance_matrix = self.binarization(distance_matrix, threshold=threshold)
self.recurrence_matrix = squareform(distance_matrix)
Expand Down

0 comments on commit a2f88e6

Please sign in to comment.