Skip to content

Commit f45b086

Browse files
committed
made motif private
1 parent 21cff2f commit f45b086

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tsfresh/feature_extraction/motifs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import six
1717

1818

19-
def distance(x, y, type="euclid"):
19+
def _distance(x, y, type="euclid"):
2020
"""
2121
This calculates the distance metric between two 1-D sequences. Default below is the num of squares, override this
2222
function to use another metric
@@ -39,7 +39,7 @@ def distance(x, y, type="euclid"):
3939
if type.lower() == "euclid":
4040
return np.linalg.norm(x-y, ord=2)
4141
else:
42-
raise ValueError("Have not implemented distance of type {}".format(type))
42+
raise ValueError("There is no implementation of a _distance of type {}".format(type))
4343

4444

4545
def _sliding_window(data, pattern_length):
@@ -84,7 +84,7 @@ def _match_scores(data, pattern):
8484
:return:
8585
"""
8686

87-
return np.array([distance(x, pattern) for x in _sliding_window(data, len(pattern))])
87+
return np.array([_distance(x, pattern) for x in _sliding_window(data, len(pattern))])
8888

8989

9090
def _best_n_matches(data, sample, count=1):

0 commit comments

Comments
 (0)