chemotools 0.0.22__py3-none-any.whl → 0.1.6__py3-none-any.whl

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 (60) hide show
  1. chemotools/augmentation/__init__.py +16 -0
  2. chemotools/augmentation/baseline_shift.py +119 -0
  3. chemotools/augmentation/exponential_noise.py +117 -0
  4. chemotools/augmentation/index_shift.py +120 -0
  5. chemotools/augmentation/normal_noise.py +118 -0
  6. chemotools/augmentation/spectrum_scale.py +120 -0
  7. chemotools/augmentation/uniform_noise.py +124 -0
  8. chemotools/baseline/__init__.py +20 -8
  9. chemotools/baseline/{air_pls.py → _air_pls.py} +20 -32
  10. chemotools/baseline/{ar_pls.py → _ar_pls.py} +18 -31
  11. chemotools/baseline/{constant_baseline_correction.py → _constant_baseline_correction.py} +37 -31
  12. chemotools/baseline/{cubic_spline_correction.py → _cubic_spline_correction.py} +26 -19
  13. chemotools/baseline/{linear_correction.py → _linear_correction.py} +19 -28
  14. chemotools/baseline/{non_negative.py → _non_negative.py} +15 -23
  15. chemotools/baseline/{polynomial_correction.py → _polynomial_correction.py} +29 -31
  16. chemotools/baseline/{subtract_reference.py → _subtract_reference.py} +23 -27
  17. chemotools/datasets/__init__.py +5 -0
  18. chemotools/datasets/_base.py +122 -0
  19. chemotools/datasets/data/coffee_labels.csv +61 -0
  20. chemotools/datasets/data/coffee_spectra.csv +61 -0
  21. chemotools/datasets/data/fermentation_hplc.csv +35 -0
  22. chemotools/datasets/data/fermentation_spectra.csv +1630 -0
  23. chemotools/datasets/data/train_hplc.csv +22 -0
  24. chemotools/datasets/data/train_spectra.csv +22 -0
  25. chemotools/derivative/__init__.py +4 -2
  26. chemotools/derivative/{norris_william.py → _norris_william.py} +20 -25
  27. chemotools/derivative/{savitzky_golay.py → _savitzky_golay.py} +26 -36
  28. chemotools/feature_selection/__init__.py +4 -0
  29. chemotools/feature_selection/_index_selector.py +113 -0
  30. chemotools/feature_selection/_range_cut.py +111 -0
  31. chemotools/scale/__init__.py +5 -3
  32. chemotools/scale/{min_max_scaler.py → _min_max_scaler.py} +36 -39
  33. chemotools/scale/{norm_scaler.py → _norm_scaler.py} +18 -25
  34. chemotools/scale/_point_scaler.py +115 -0
  35. chemotools/scatter/__init__.py +13 -2
  36. chemotools/scatter/_extended_multiplicative_scatter_correction.py +183 -0
  37. chemotools/scatter/_multiplicative_scatter_correction.py +169 -0
  38. chemotools/scatter/_robust_normal_variate.py +101 -0
  39. chemotools/scatter/{standard_normal_variate.py → _standard_normal_variate.py} +21 -26
  40. chemotools/smooth/__init__.py +6 -4
  41. chemotools/smooth/{mean_filter.py → _mean_filter.py} +18 -25
  42. chemotools/smooth/{median_filter.py → _median_filter.py} +32 -24
  43. chemotools/smooth/{savitzky_golay_filter.py → _savitzky_golay_filter.py} +22 -24
  44. chemotools/smooth/{whittaker_smooth.py → _whittaker_smooth.py} +24 -29
  45. {chemotools-0.0.22.dist-info → chemotools-0.1.6.dist-info}/METADATA +19 -15
  46. chemotools-0.1.6.dist-info/RECORD +51 -0
  47. {chemotools-0.0.22.dist-info → chemotools-0.1.6.dist-info}/WHEEL +1 -2
  48. chemotools/scale/index_scaler.py +0 -97
  49. chemotools/scatter/extended_multiplicative_scatter_correction.py +0 -33
  50. chemotools/scatter/multiplicative_scatter_correction.py +0 -123
  51. chemotools/utils/check_inputs.py +0 -14
  52. chemotools/variable_selection/__init__.py +0 -1
  53. chemotools/variable_selection/range_cut.py +0 -121
  54. chemotools-0.0.22.dist-info/RECORD +0 -39
  55. chemotools-0.0.22.dist-info/top_level.txt +0 -2
  56. tests/fixtures.py +0 -89
  57. tests/test_functionality.py +0 -397
  58. tests/test_sklearn_compliance.py +0 -192
  59. {tests → chemotools/datasets/data}/__init__.py +0 -0
  60. {chemotools-0.0.22.dist-info → chemotools-0.1.6.dist-info}/LICENSE +0 -0
@@ -1,192 +0,0 @@
1
- from sklearn.utils.estimator_checks import check_estimator
2
-
3
- from chemotools.baseline import (
4
- AirPls,
5
- ArPls,
6
- ConstantBaselineCorrection,
7
- CubicSplineCorrection,
8
- LinearCorrection,
9
- NonNegative,
10
- PolynomialCorrection,
11
- SubtractReference,
12
- )
13
- from chemotools.derivative import NorrisWilliams, SavitzkyGolay
14
- from chemotools.scale import IndexScaler, MinMaxScaler, NormScaler
15
- from chemotools.scatter import MultiplicativeScatterCorrection, StandardNormalVariate
16
- from chemotools.smooth import (
17
- MeanFilter,
18
- MedianFilter,
19
- SavitzkyGolayFilter,
20
- WhittakerSmooth,
21
- )
22
- from chemotools.variable_selection import RangeCut
23
-
24
- from tests.fixtures import spectrum
25
-
26
-
27
- # AirPls
28
- def test_compliance_air_pls():
29
- # Arrange
30
- transformer = AirPls()
31
- # Act & Assert
32
- check_estimator(transformer)
33
-
34
-
35
- # ArPls
36
- def test_compliance_ar_pls():
37
- # Arrange
38
- transformer = ArPls()
39
- # Act & Assert
40
- check_estimator(transformer)
41
-
42
-
43
- # ConstantBaselineCorrection
44
- def test_compliance_constant_baseline_correction():
45
- # Arrange
46
- transformer = ConstantBaselineCorrection()
47
- # Act & Assert
48
- check_estimator(transformer)
49
-
50
-
51
- # CubicSplineCorrection
52
- def test_compliance_cubic_spline_correction():
53
- # Arrange
54
- transformer = CubicSplineCorrection()
55
- # Act & Assert
56
- check_estimator(transformer)
57
-
58
-
59
- # IndexScaler
60
- def test_compliance_index_scaler():
61
- # Arrange
62
- transformer = IndexScaler()
63
- # Act & Assert
64
- check_estimator(transformer)
65
-
66
-
67
- # LinearCorrection
68
- def test_compliance_linear_correction():
69
- # Arrange
70
- transformer = LinearCorrection()
71
- # Act & Assert
72
- check_estimator(transformer)
73
-
74
-
75
- # LNormalize
76
- def test_compliance_l_norm():
77
- # Arrange
78
- transformer = NormScaler()
79
- # Act & Assert
80
- check_estimator(transformer)
81
-
82
-
83
- # MeanFilter
84
- def test_compliance_mean_filter():
85
- # Arrange
86
- transformer = MeanFilter()
87
- # Act & Assert
88
- check_estimator(transformer)
89
-
90
-
91
- # MedianFilter
92
- def test_compliance_median_filter():
93
- # Arrange
94
- transformer = MedianFilter()
95
- # Act & Assert
96
- check_estimator(transformer)
97
-
98
-
99
- # MinMaxNormalize
100
- def test_compliance_min_max_norm():
101
- # Arrange
102
- transformer = MinMaxScaler()
103
- # Act & Assert
104
- check_estimator(transformer)
105
-
106
-
107
- # MultiplicativeScatterCorrection
108
- def test_compliance_multiplicative_scatter_correction():
109
- # Arrange
110
- transformer = MultiplicativeScatterCorrection()
111
- # Act & Assert
112
- check_estimator(transformer)
113
-
114
-
115
- # NonNegative
116
- def test_compliance_non_negative():
117
- # Arrange
118
- transformer = NonNegative()
119
- # Act & Assert
120
- check_estimator(transformer)
121
-
122
-
123
- # NorrisWilliams
124
- def test_compliance_norris_williams():
125
- # Arrange
126
- transformer = NorrisWilliams()
127
- # Act & Assert
128
- check_estimator(transformer)
129
-
130
-
131
- # NorrisWilliams
132
- def test_compliance_norris_williams_2():
133
- # Arrange
134
- transformer = NorrisWilliams(derivative_order=2)
135
- # Act & Assert
136
- check_estimator(transformer)
137
-
138
-
139
- # PolynomialCorrection
140
- def test_compliance_polynomial_correction():
141
- # Arrange
142
- transformer = PolynomialCorrection()
143
- # Act & Assert
144
- check_estimator(transformer)
145
-
146
-
147
- # SavitzkyGolay
148
- def test_compliance_savitzky_golay():
149
- # Arrange
150
- transformer = SavitzkyGolay()
151
- # Act & Assert
152
- check_estimator(transformer)
153
-
154
-
155
- # SavitzkyGolayFilter
156
- def test_compliance_savitzky_golay_filter():
157
- # Arrange
158
- transformer = SavitzkyGolayFilter()
159
- # Act & Assert
160
- check_estimator(transformer)
161
-
162
-
163
- # StandardNormalVariate
164
- def test_compliance_standard_normal_variate():
165
- # Arrange
166
- transformer = StandardNormalVariate()
167
- # Act & Assert
168
- check_estimator(transformer)
169
-
170
-
171
- # RangeCut
172
- def test_compliance_range_cut():
173
- # Arrange
174
- transformer = RangeCut()
175
- # Act & Assert
176
- check_estimator(transformer)
177
-
178
-
179
- # SubtractReference
180
- def test_compliance_subtract_reference():
181
- # Arrange
182
- transformer = SubtractReference()
183
- # Act & Assert
184
- check_estimator(transformer)
185
-
186
-
187
- # WhittakerSmooth
188
- def test_compliance_whittaker_smooth():
189
- # Arrange
190
- transformer = WhittakerSmooth()
191
- # Act & Assert
192
- check_estimator(transformer)
File without changes