Skip to content

Commit

Permalink
Improved documentation (#680)
Browse files Browse the repository at this point in the history
* Improved documentation

* Formatting fix

Co-authored-by: Nils Braun <nilslennartbraun@gmail.com>
  • Loading branch information
nils-braun and nils-braun authored May 1, 2020
1 parent 872004b commit 5bdbbcf
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tsfresh/feature_extraction/feature_calculators.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,17 @@ def sum_of_reoccurring_values(x):
Returns the sum of all values, that are present in the time series
more than once.
For example
sum_of_reoccurring_values([2, 2, 2, 2, 1]) = 2
as 2 is a reoccurring value, so it is summed up with all
other reoccuring values (there is none), so the result is 2.
This is in contrast to ``sum_of_reoccurring_data_points``,
where each reoccuring value is only counted as often as
it is present in the data.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
Expand All @@ -918,6 +929,15 @@ def sum_of_reoccurring_data_points(x):
Returns the sum of all data points, that are present in the time series
more than once.
For example
sum_of_reoccurring_data_points([2, 2, 2, 2, 1]) = 8
as 2 is a reoccurring value, so all 2's are summed up.
This is in contrast to ``sum_of_reoccurring_values``,
where each reoccuring value is only counted once.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
Expand Down

0 comments on commit 5bdbbcf

Please sign in to comment.