chemotools 0.0.27__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 (53) 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} +22 -30
  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 +3 -0
  18. chemotools/datasets/_base.py +85 -15
  19. chemotools/datasets/data/coffee_labels.csv +61 -0
  20. chemotools/datasets/data/coffee_spectra.csv +61 -0
  21. chemotools/derivative/__init__.py +4 -2
  22. chemotools/derivative/{norris_william.py → _norris_william.py} +17 -24
  23. chemotools/derivative/{savitzky_golay.py → _savitzky_golay.py} +26 -36
  24. chemotools/feature_selection/__init__.py +4 -0
  25. chemotools/{variable_selection/select_features.py → feature_selection/_index_selector.py} +32 -56
  26. chemotools/{variable_selection/range_cut.py → feature_selection/_range_cut.py} +25 -50
  27. chemotools/scale/__init__.py +5 -3
  28. chemotools/scale/{min_max_scaler.py → _min_max_scaler.py} +20 -27
  29. chemotools/scale/{norm_scaler.py → _norm_scaler.py} +18 -25
  30. chemotools/scale/{point_scaler.py → _point_scaler.py} +27 -32
  31. chemotools/scatter/__init__.py +13 -4
  32. chemotools/scatter/{extended_multiplicative_scatter_correction.py → _extended_multiplicative_scatter_correction.py} +19 -28
  33. chemotools/scatter/{multiplicative_scatter_correction.py → _multiplicative_scatter_correction.py} +19 -17
  34. chemotools/scatter/{robust_normal_variate.py → _robust_normal_variate.py} +15 -23
  35. chemotools/scatter/{standard_normal_variate.py → _standard_normal_variate.py} +21 -26
  36. chemotools/smooth/__init__.py +6 -4
  37. chemotools/smooth/{mean_filter.py → _mean_filter.py} +18 -25
  38. chemotools/smooth/{median_filter.py → _median_filter.py} +32 -24
  39. chemotools/smooth/{savitzky_golay_filter.py → _savitzky_golay_filter.py} +22 -24
  40. chemotools/smooth/{whittaker_smooth.py → _whittaker_smooth.py} +24 -29
  41. {chemotools-0.0.27.dist-info → chemotools-0.1.6.dist-info}/METADATA +19 -16
  42. chemotools-0.1.6.dist-info/RECORD +51 -0
  43. {chemotools-0.0.27.dist-info → chemotools-0.1.6.dist-info}/WHEEL +1 -2
  44. chemotools/utils/check_inputs.py +0 -14
  45. chemotools/variable_selection/__init__.py +0 -2
  46. chemotools-0.0.27.dist-info/RECORD +0 -49
  47. chemotools-0.0.27.dist-info/top_level.txt +0 -2
  48. tests/__init__.py +0 -0
  49. tests/fixtures.py +0 -89
  50. tests/test_datasets.py +0 -30
  51. tests/test_functionality.py +0 -616
  52. tests/test_sklearn_compliance.py +0 -220
  53. {chemotools-0.0.27.dist-info → chemotools-0.1.6.dist-info}/LICENSE +0 -0
@@ -1,220 +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 MinMaxScaler, NormScaler, PointScaler
15
- from chemotools.scatter import (
16
- ExtendedMultiplicativeScatterCorrection,
17
- MultiplicativeScatterCorrection,
18
- RobustNormalVariate,
19
- StandardNormalVariate,
20
- )
21
- from chemotools.smooth import (
22
- MeanFilter,
23
- MedianFilter,
24
- SavitzkyGolayFilter,
25
- WhittakerSmooth,
26
- )
27
- from chemotools.variable_selection import RangeCut, SelectFeatures
28
-
29
- from tests.fixtures import spectrum
30
-
31
-
32
- # AirPls
33
- def test_compliance_air_pls():
34
- # Arrange
35
- transformer = AirPls()
36
- # Act & Assert
37
- check_estimator(transformer)
38
-
39
-
40
- # ArPls
41
- def test_compliance_ar_pls():
42
- # Arrange
43
- transformer = ArPls()
44
- # Act & Assert
45
- check_estimator(transformer)
46
-
47
-
48
- # ConstantBaselineCorrection
49
- def test_compliance_constant_baseline_correction():
50
- # Arrange
51
- transformer = ConstantBaselineCorrection()
52
- # Act & Assert
53
- check_estimator(transformer)
54
-
55
-
56
- # CubicSplineCorrection
57
- def test_compliance_cubic_spline_correction():
58
- # Arrange
59
- transformer = CubicSplineCorrection()
60
- # Act & Assert
61
- check_estimator(transformer)
62
-
63
-
64
- # ExtendedMultiplicativeScatterCorrection
65
- def test_compliance_extended_multiplicative_scatter_correction():
66
- # Arrange
67
- transformer = ExtendedMultiplicativeScatterCorrection()
68
- # Act & Assert
69
- check_estimator(transformer)
70
-
71
-
72
- # LinearCorrection
73
- def test_compliance_linear_correction():
74
- # Arrange
75
- transformer = LinearCorrection()
76
- # Act & Assert
77
- check_estimator(transformer)
78
-
79
-
80
- # LNormalize
81
- def test_compliance_l_norm():
82
- # Arrange
83
- transformer = NormScaler()
84
- # Act & Assert
85
- check_estimator(transformer)
86
-
87
-
88
- # MeanFilter
89
- def test_compliance_mean_filter():
90
- # Arrange
91
- transformer = MeanFilter()
92
- # Act & Assert
93
- check_estimator(transformer)
94
-
95
-
96
- # MedianFilter
97
- def test_compliance_median_filter():
98
- # Arrange
99
- transformer = MedianFilter()
100
- # Act & Assert
101
- check_estimator(transformer)
102
-
103
-
104
- # MinMaxNormalize
105
- def test_compliance_min_max_norm():
106
- # Arrange
107
- transformer = MinMaxScaler()
108
- # Act & Assert
109
- check_estimator(transformer)
110
-
111
-
112
- # MultiplicativeScatterCorrection
113
- def test_compliance_multiplicative_scatter_correction():
114
- # Arrange
115
- transformer = MultiplicativeScatterCorrection()
116
- # Act & Assert
117
- check_estimator(transformer)
118
-
119
-
120
- # NonNegative
121
- def test_compliance_non_negative():
122
- # Arrange
123
- transformer = NonNegative()
124
- # Act & Assert
125
- check_estimator(transformer)
126
-
127
-
128
- # NorrisWilliams
129
- def test_compliance_norris_williams():
130
- # Arrange
131
- transformer = NorrisWilliams()
132
- # Act & Assert
133
- check_estimator(transformer)
134
-
135
-
136
- # NorrisWilliams
137
- def test_compliance_norris_williams_2():
138
- # Arrange
139
- transformer = NorrisWilliams(derivative_order=2)
140
- # Act & Assert
141
- check_estimator(transformer)
142
-
143
-
144
- # PointScaler
145
- def test_compliance_point_scaler():
146
- # Arrange
147
- transformer = PointScaler()
148
- # Act & Assert
149
- check_estimator(transformer)
150
-
151
-
152
- # PolynomialCorrection
153
- def test_compliance_polynomial_correction():
154
- # Arrange
155
- transformer = PolynomialCorrection()
156
- # Act & Assert
157
- check_estimator(transformer)
158
-
159
-
160
- # SavitzkyGolay
161
- def test_compliance_savitzky_golay():
162
- # Arrange
163
- transformer = SavitzkyGolay()
164
- # Act & Assert
165
- check_estimator(transformer)
166
-
167
-
168
- # SavitzkyGolayFilter
169
- def test_compliance_savitzky_golay_filter():
170
- # Arrange
171
- transformer = SavitzkyGolayFilter()
172
- # Act & Assert
173
- check_estimator(transformer)
174
-
175
-
176
- # SelectFeatures
177
- def test_compliance_select_features():
178
- # Arrange
179
- transformer = SelectFeatures()
180
- # Act & Assert
181
- check_estimator(transformer)
182
-
183
-
184
- # StandardNormalVariate
185
- def test_compliance_standard_normal_variate():
186
- # Arrange
187
- transformer = StandardNormalVariate()
188
- # Act & Assert
189
- check_estimator(transformer)
190
-
191
-
192
- # RangeCut
193
- def test_compliance_range_cut():
194
- # Arrange
195
- transformer = RangeCut()
196
- # Act & Assert
197
- check_estimator(transformer)
198
-
199
-
200
- # RobustNormalVariate
201
- def test_compliance_robust_normal_variate():
202
- # Arrange
203
- transformer = RobustNormalVariate()
204
- # Act & Assert
205
- check_estimator(transformer)
206
-
207
- # SubtractReference
208
- def test_compliance_subtract_reference():
209
- # Arrange
210
- transformer = SubtractReference()
211
- # Act & Assert
212
- check_estimator(transformer)
213
-
214
-
215
- # WhittakerSmooth
216
- def test_compliance_whittaker_smooth():
217
- # Arrange
218
- transformer = WhittakerSmooth()
219
- # Act & Assert
220
- check_estimator(transformer)