coveralls: 
[![Coverage Status](https://coveralls.io/builds/8863140/badge)](https://coveralls.io/builds/8863140)

Coverage increased (+0.2%) to 93.674% when pulling **bd41d0dab7dffa94cdc7614bb8d311b16c1cc4bf on nils-braun:count-percentage-of-some-value** into **50b3ee7ee663aacf8d6ae28bcb2bfcc00bd3d9a1 on blue-yonder:master**.

coveralls: 
[![Coverage Status](https://coveralls.io/builds/8863140/badge)](https://coveralls.io/builds/8863140)

Coverage increased (+0.2%) to 93.674% when pulling **bd41d0dab7dffa94cdc7614bb8d311b16c1cc4bf on nils-braun:count-percentage-of-some-value** into **50b3ee7ee663aacf8d6ae28bcb2bfcc00bd3d9a1 on blue-yonder:master**.

MaxBenChrist: Awesome @nils-braun !

diff --git a/tsfresh/feature_extraction/feature_calculators.py b/tsfresh/feature_extraction/feature_calculators.py
index 5882882..d216254 100644
--- a/tsfresh/feature_extraction/feature_calculators.py
+++ b/tsfresh/feature_extraction/feature_calculators.py
@@ -587,6 +587,92 @@ def first_location_of_minimum(x):
     return np.argmin(x) / len(x) if len(x) > 0 else np.NaN
 
 
+@set_property("fctype", "aggregate")
+@not_apply_to_raw_numbers
+def percentage_of_reoccurring_datapoints_to_all_datapoints(x):
+    """
+    Returns the percentage of unique values, that are present in the time series
+    more than once.
+
+        len(different values occurring more than once) / len(different values)
+
+    This means the percentage is normalized to the number of unique values,
+    in contrast to the percentage_of_reoccurring_values_to_all_values.
+
+    :param x: the time series to calculate the feature of
+    :type x: pandas.Series
+    :return: the value of this feature
+    :return type: float
+    """
+    x = pd.Series(x)
+    return (x.value_counts() > 1).mean()
+
+
+@set_property("fctype", "aggregate")
+@not_apply_to_raw_numbers
+def percentage_of_reoccurring_values_to_all_values(x):
+    """
+    Returns the ratio of unique values, that are present in the time series
+    more than once.
+
+        # of data points occurring more than once / # of all data points
+
+    This means the ratio is normalized to the number of data points in the time series,
+    in contrast to the percentage_of_reoccurring_datapoints_to_all_datapoints.
+
+    :param x: the time series to calculate the feature of
+    :type x: pandas.Series
+    :return: the value of this feature
+    :return type: float
+    """
+    x = pd.Series(x)
+
+    if len(x) == 0:
+        return np.nan
+
+    value_counts = x.value_counts()
+    return 1.0 * value_counts[value_counts > 1].sum() / len(x)
+
+
+@set_property("fctype", "aggregate")
+@not_apply_to_raw_numbers
+def sum_of_reoccurring_values(x):
+    """
+    Returns the sum of all values, that are present in the time series
+    more than once.
+
+    :param x: the time series to calculate the feature of
+    :type x: pandas.Series
+    :return: the value of this feature
+    :return type: float
+    """
+    x = pd.Series(x)
+    value_counts = x.value_counts()
+    doubled_values = value_counts[value_counts > 1]
+    return sum(doubled_values.index * doubled_values)
+
+
+@set_property("fctype", "aggregate")
+@not_apply_to_raw_numbers
+def ratio_value_number_to_time_series_length(x):
+    """
+    Returns a factor which is 1 if all values in the time series occur only once, and below one if this is not the
+    case. In principle, it just returns
+
+        # unique values / # values
+
+    :param x: the time series to calculate the feature of
+    :type x: pandas.Series
+    :return: the value of this feature
+    :return type: float
+    """
+
+    if len(x) == 0:
+        return np.nan
+
+    return 1.0 * len(set(x))/len(x)
+
+
 @set_property("fctype", "apply")
 @not_apply_to_raw_numbers
 def fft_coefficient(x, c, param):
@@ -723,12 +809,12 @@ def cwt_coefficients(x, c, param):
 
     for widths in df_cfg["widths"].unique():
 
-        coeff = df_cfg[df_cfg["widths"] == widths]["coeff"].unique()
         # the calculated_cwt will shape (len(widths), len(x)).
         calculated_cwt = cwt(x, ricker, widths)
 
         for w in df_cfg[df_cfg["widths"] == widths]["w"].unique():
 
+            coeff = df_cfg[(df_cfg["widths"] == widths) & (df_cfg["w"] == w)]["coeff"].unique()
             i = widths.index(w)
 
             if calculated_cwt.shape[1] < len(coeff):  # There are less data points than requested model coefficients

Add feature class: Count/Percentage same value
I had an idea for a class of features. 

1.  percentage of data points that occur at least second time 
2. sum of data points that occur at least second time 
3. percentage of observed values that occur at lest second time 
...
diff --git a/tests/feature_extraction/test_feature_calculations.py b/tests/feature_extraction/test_feature_calculations.py
index e33c376..32cb43f 100644
--- a/tests/feature_extraction/test_feature_calculations.py
+++ b/tests/feature_extraction/test_feature_calculations.py
@@ -258,6 +258,34 @@ class FeatureCalculationTestCase(TestCase):
         self.assertAlmostEqualOnAllArrayTypes(first_location_of_minimum, [1], 0.0)
         self.assertIsNanOnAllArrayTypes(first_location_of_minimum, [])
 
+    def test_percentage_of_doubled_datapoints(self):
+        self.assertAlmostEqualOnAllArrayTypes(percentage_of_reoccurring_datapoints_to_all_datapoints, [1, 1, 2, 3, 4], 0.25)
+        self.assertAlmostEqualOnAllArrayTypes(percentage_of_reoccurring_datapoints_to_all_datapoints, [1, 1.5, 2, 3], 0)
+        self.assertAlmostEqualOnAllArrayTypes(percentage_of_reoccurring_datapoints_to_all_datapoints, [1], 0)
+        self.assertAlmostEqualOnAllArrayTypes(percentage_of_reoccurring_datapoints_to_all_datapoints, [1.111, -2.45, 1.111, 2.45], 1.0 / 3.0)
+        self.assertIsNanOnAllArrayTypes(percentage_of_reoccurring_datapoints_to_all_datapoints, [])
+
+    def test_ratio_of_doubled_values(self):
+        self.assertAlmostEqualOnAllArrayTypes(percentage_of_reoccurring_values_to_all_values, [1, 1, 2, 3, 4], 0.4)
+        self.assertAlmostEqualOnAllArrayTypes(percentage_of_reoccurring_values_to_all_values, [1, 1.5, 2, 3], 0)
+        self.assertAlmostEqualOnAllArrayTypes(percentage_of_reoccurring_values_to_all_values, [1], 0)
+        self.assertAlmostEqualOnAllArrayTypes(percentage_of_reoccurring_values_to_all_values, [1.111, -2.45, 1.111, 2.45], 0.5)
+        self.assertIsNanOnAllArrayTypes(percentage_of_reoccurring_values_to_all_values, [])
+
+    def test_sum_of_doubled_values(self):
+        self.assertAlmostEqualOnAllArrayTypes(sum_of_reoccurring_values, [1, 1, 2, 3, 4], 2)
+        self.assertAlmostEqualOnAllArrayTypes(sum_of_reoccurring_values, [1, 1.5, 2, 3], 0)
+        self.assertAlmostEqualOnAllArrayTypes(sum_of_reoccurring_values, [1], 0)
+        self.assertAlmostEqualOnAllArrayTypes(sum_of_reoccurring_values, [1.111, -2.45, 1.111, 2.45], 2.222)
+        self.assertAlmostEqualOnAllArrayTypes(sum_of_reoccurring_values, [], 0)
+
+    def test_uniqueness_factor(self):
+        self.assertAlmostEqualOnAllArrayTypes(ratio_value_number_to_time_series_length, [1, 1, 2, 3, 4], 0.8)
+        self.assertAlmostEqualOnAllArrayTypes(ratio_value_number_to_time_series_length, [1, 1.5, 2, 3], 1)
+        self.assertAlmostEqualOnAllArrayTypes(ratio_value_number_to_time_series_length, [1], 1)
+        self.assertAlmostEqualOnAllArrayTypes(ratio_value_number_to_time_series_length, [1.111, -2.45, 1.111, 2.45], 0.75)
+        self.assertIsNanOnAllArrayTypes(ratio_value_number_to_time_series_length, [])
+
     def test_fft_coefficient(self):
         pass
         # todo: add unit test

pip install -e .
parse_log_pytest
requirements.txt
pytest>=3.0.2 pytest-cov>=2.3.1 pytest-xdist>=1.15.0
apt-get update apt-get install -y gcc pip install --upgrade pip pip install numpy pip install scipy
3.5.2
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
charset-normalizer==2.0.12
coverage==6.2
execnet==1.9.0
future==1.0.0
idna==3.10
importlib-metadata==4.8.3
iniconfig==1.1.1
joblib==1.1.1
numpy==1.19.5
packaging==21.3
pandas==1.1.5
patsy==1.0.1
pluggy==1.0.0
py==1.11.0
pyparsing==3.1.4
pytest==7.0.1
pytest-cov==4.0.0
pytest-xdist==3.0.2
python-dateutil==2.9.0.post0
pytz==2025.2
requests==2.27.1
scikit-learn==0.24.2
scipy==1.5.4
six==1.17.0
statsmodels==0.12.2
threadpoolctl==3.1.0
tomli==1.2.3
-e git+https://github.com/blue-yonder/tsfresh.git@50b3ee7ee663aacf8d6ae28bcb2bfcc00bd3d9a1#egg=tsfresh
typing_extensions==4.1.1
urllib3==1.26.20
zipp==3.6.0

name: tsfresh
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - charset-normalizer==2.0.12
      - coverage==6.2
      - execnet==1.9.0
      - future==1.0.0
      - idna==3.10
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - joblib==1.1.1
      - numpy==1.19.5
      - packaging==21.3
      - pandas==1.1.5
      - patsy==1.0.1
      - pip==21.3.1
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - pytest-xdist==3.0.2
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - requests==2.27.1
      - scikit-learn==0.24.2
      - scipy==1.5.4
      - six==1.17.0
      - statsmodels==0.12.2
      - threadpoolctl==3.1.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - zipp==3.6.0
prefix: /opt/conda/envs/tsfresh

tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_ratio_of_doubled_values tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_percentage_of_doubled_datapoints tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_sum_of_doubled_values tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_uniqueness_factor
tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_count_above_mean tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_autocorrelation tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_count_below_mean tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_binned_entropy tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test___get_length_sequences_where tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_abs_energy tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_approximate_entropy tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_cwt_coefficients tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_fft_coefficient tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_absolute_sum_of_changes tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_has_duplicate tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_catch_Numbers tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_kurtosis tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_has_duplicate_max tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_has_duplicate_min tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_first_location_of_maximum tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_ar_coefficient tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_last_location_maximum tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_first_location_of_minimum tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_last_location_of_minimum tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_length tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_longest_strike_above_mean tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_augmented_dickey_fuller tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_mean tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_mean_abs_change tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_longest_strike_below_mean tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_mean_change tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_large_number_of_peaks tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_large_standard_deviation tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_mass_quantile tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_mean_second_derivate_central tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_number_cwt_peaks tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_mean_abs_change_quantiles tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_median tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_quantile tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_mean_autocorrelation tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_number_peaks tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_standard_deviation tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_skewness tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_range_count tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_sum tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_symmetry_looking tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_time_reversal_asymmetry_statistic tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_spkt_welch_density tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_value_count tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_variance tests/feature_extraction/test_feature_calculations.py::FeatureCalculationTestCase::test_variance_larger_than_standard_deviation
tsfresh/feature_extraction/feature_calculators.py
tsfresh/feature_extraction/feature_calculators.py