chemotools 0.0.26__tar.gz → 0.0.28__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. {chemotools-0.0.26 → chemotools-0.0.28}/PKG-INFO +1 -1
  2. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/baseline/constant_baseline_correction.py +0 -2
  3. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/datasets/__init__.py +1 -0
  4. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/datasets/_base.py +17 -0
  5. chemotools-0.0.28/chemotools/datasets/data/coffee_labels.csv +61 -0
  6. chemotools-0.0.28/chemotools/datasets/data/coffee_spectra.csv +61 -0
  7. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/scale/__init__.py +1 -1
  8. chemotools-0.0.26/chemotools/scale/index_scaler.py → chemotools-0.0.28/chemotools/scale/point_scaler.py +34 -13
  9. chemotools-0.0.28/chemotools/variable_selection/__init__.py +2 -0
  10. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/variable_selection/range_cut.py +0 -2
  11. chemotools-0.0.28/chemotools/variable_selection/select_features.py +137 -0
  12. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools.egg-info/PKG-INFO +1 -1
  13. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools.egg-info/SOURCES.txt +4 -1
  14. {chemotools-0.0.26 → chemotools-0.0.28}/tests/test_datasets.py +14 -1
  15. {chemotools-0.0.26 → chemotools-0.0.28}/tests/test_functionality.py +81 -13
  16. {chemotools-0.0.26 → chemotools-0.0.28}/tests/test_sklearn_compliance.py +18 -9
  17. chemotools-0.0.26/chemotools/variable_selection/__init__.py +0 -1
  18. {chemotools-0.0.26 → chemotools-0.0.28}/LICENSE +0 -0
  19. {chemotools-0.0.26 → chemotools-0.0.28}/README.md +0 -0
  20. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/__init__.py +0 -0
  21. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/baseline/__init__.py +0 -0
  22. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/baseline/air_pls.py +0 -0
  23. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/baseline/ar_pls.py +0 -0
  24. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/baseline/cubic_spline_correction.py +0 -0
  25. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/baseline/linear_correction.py +0 -0
  26. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/baseline/non_negative.py +0 -0
  27. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/baseline/polynomial_correction.py +0 -0
  28. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/baseline/subtract_reference.py +0 -0
  29. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/datasets/data/__init__.py +0 -0
  30. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/datasets/data/fermentation_hplc.csv +0 -0
  31. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/datasets/data/fermentation_spectra.csv +0 -0
  32. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/datasets/data/train_hplc.csv +0 -0
  33. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/datasets/data/train_spectra.csv +0 -0
  34. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/derivative/__init__.py +0 -0
  35. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/derivative/norris_william.py +0 -0
  36. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/derivative/savitzky_golay.py +0 -0
  37. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/scale/min_max_scaler.py +0 -0
  38. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/scale/norm_scaler.py +0 -0
  39. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/scatter/__init__.py +0 -0
  40. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/scatter/extended_multiplicative_scatter_correction.py +0 -0
  41. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/scatter/multiplicative_scatter_correction.py +0 -0
  42. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/scatter/robust_normal_variate.py +0 -0
  43. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/scatter/standard_normal_variate.py +0 -0
  44. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/smooth/__init__.py +0 -0
  45. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/smooth/mean_filter.py +0 -0
  46. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/smooth/median_filter.py +0 -0
  47. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/smooth/savitzky_golay_filter.py +0 -0
  48. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/smooth/whittaker_smooth.py +0 -0
  49. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/utils/__init__.py +0 -0
  50. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools/utils/check_inputs.py +0 -0
  51. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools.egg-info/dependency_links.txt +0 -0
  52. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools.egg-info/requires.txt +0 -0
  53. {chemotools-0.0.26 → chemotools-0.0.28}/chemotools.egg-info/top_level.txt +0 -0
  54. {chemotools-0.0.26 → chemotools-0.0.28}/pyproject.toml +0 -0
  55. {chemotools-0.0.26 → chemotools-0.0.28}/setup.cfg +0 -0
  56. {chemotools-0.0.26 → chemotools-0.0.28}/setup.py +0 -0
  57. {chemotools-0.0.26 → chemotools-0.0.28}/tests/__init__.py +0 -0
  58. {chemotools-0.0.26 → chemotools-0.0.28}/tests/fixtures.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: chemotools
3
- Version: 0.0.26
3
+ Version: 0.0.28
4
4
  Summary: Package to integrate chemometrics in scikit-learn pipelines
5
5
  Home-page: https://github.com/paucablop/chemotools
6
6
  Author: Pau Cabaneros Lopez
@@ -128,7 +128,5 @@ class ConstantBaselineCorrection(OneToOneFeatureMixin, BaseEstimator, Transforme
128
128
  return X_.reshape(-1, 1) if X_.ndim == 1 else X_
129
129
 
130
130
  def _find_index(self, target: float) -> int:
131
- if self.wavenumbers is None:
132
- return target
133
131
  wavenumbers = np.array(self.wavenumbers)
134
132
  return np.argmin(np.abs(wavenumbers - target))
@@ -1,2 +1,3 @@
1
+ from ._base import load_coffee
1
2
  from ._base import load_fermentation_train
2
3
  from ._base import load_fermentation_test
@@ -50,3 +50,20 @@ def load_fermentation_test():
50
50
  fermentation_hplc = pd.read_csv(PACKAGE_DIRECTORY + "/data/fermentation_hplc.csv")
51
51
 
52
52
  return fermentation_spectra, fermentation_hplc
53
+
54
+
55
+ def load_coffee():
56
+ """
57
+ Loads the coffee dataset. This data corresponds to a coffee spectra from three different origins
58
+ measured off-line using attenuated total reflectance Fourier transform infrared spectroscopy (ATR-FTIR).
59
+
60
+ Returns
61
+ -------
62
+ coffee_spectra: pd.DataFrame A pandas DataFrame containing the coffee spectra.
63
+ coffee_labels: pd.DataFrame A pandas DataFrame containing the corresponding labels.
64
+ """
65
+
66
+ coffee_spectra = pd.read_csv(PACKAGE_DIRECTORY + "/data/coffee_spectra.csv")
67
+ coffee_labels = pd.read_csv(PACKAGE_DIRECTORY + "/data/coffee_labels.csv")
68
+
69
+ return coffee_spectra, coffee_labels
@@ -0,0 +1,61 @@
1
+ labels
2
+ Ethiopia
3
+ Ethiopia
4
+ Ethiopia
5
+ Ethiopia
6
+ Ethiopia
7
+ Ethiopia
8
+ Ethiopia
9
+ Ethiopia
10
+ Ethiopia
11
+ Ethiopia
12
+ Ethiopia
13
+ Ethiopia
14
+ Ethiopia
15
+ Ethiopia
16
+ Ethiopia
17
+ Ethiopia
18
+ Ethiopia
19
+ Ethiopia
20
+ Ethiopia
21
+ Ethiopia
22
+ Brasil
23
+ Brasil
24
+ Brasil
25
+ Brasil
26
+ Brasil
27
+ Brasil
28
+ Brasil
29
+ Brasil
30
+ Brasil
31
+ Brasil
32
+ Brasil
33
+ Brasil
34
+ Brasil
35
+ Brasil
36
+ Brasil
37
+ Brasil
38
+ Brasil
39
+ Brasil
40
+ Brasil
41
+ Brasil
42
+ Vietnam
43
+ Vietnam
44
+ Vietnam
45
+ Vietnam
46
+ Vietnam
47
+ Vietnam
48
+ Vietnam
49
+ Vietnam
50
+ Vietnam
51
+ Vietnam
52
+ Vietnam
53
+ Vietnam
54
+ Vietnam
55
+ Vietnam
56
+ Vietnam
57
+ Vietnam
58
+ Vietnam
59
+ Vietnam
60
+ Vietnam
61
+ Vietnam