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.
- chemotools/augmentation/__init__.py +16 -0
- chemotools/augmentation/baseline_shift.py +119 -0
- chemotools/augmentation/exponential_noise.py +117 -0
- chemotools/augmentation/index_shift.py +120 -0
- chemotools/augmentation/normal_noise.py +118 -0
- chemotools/augmentation/spectrum_scale.py +120 -0
- chemotools/augmentation/uniform_noise.py +124 -0
- chemotools/baseline/__init__.py +20 -8
- chemotools/baseline/{air_pls.py → _air_pls.py} +20 -32
- chemotools/baseline/{ar_pls.py → _ar_pls.py} +18 -31
- chemotools/baseline/{constant_baseline_correction.py → _constant_baseline_correction.py} +37 -31
- chemotools/baseline/{cubic_spline_correction.py → _cubic_spline_correction.py} +26 -19
- chemotools/baseline/{linear_correction.py → _linear_correction.py} +19 -28
- chemotools/baseline/{non_negative.py → _non_negative.py} +15 -23
- chemotools/baseline/{polynomial_correction.py → _polynomial_correction.py} +29 -31
- chemotools/baseline/{subtract_reference.py → _subtract_reference.py} +23 -27
- chemotools/datasets/__init__.py +5 -0
- chemotools/datasets/_base.py +122 -0
- chemotools/datasets/data/coffee_labels.csv +61 -0
- chemotools/datasets/data/coffee_spectra.csv +61 -0
- chemotools/datasets/data/fermentation_hplc.csv +35 -0
- chemotools/datasets/data/fermentation_spectra.csv +1630 -0
- chemotools/datasets/data/train_hplc.csv +22 -0
- chemotools/datasets/data/train_spectra.csv +22 -0
- chemotools/derivative/__init__.py +4 -2
- chemotools/derivative/{norris_william.py → _norris_william.py} +20 -25
- chemotools/derivative/{savitzky_golay.py → _savitzky_golay.py} +26 -36
- chemotools/feature_selection/__init__.py +4 -0
- chemotools/feature_selection/_index_selector.py +113 -0
- chemotools/feature_selection/_range_cut.py +111 -0
- chemotools/scale/__init__.py +5 -3
- chemotools/scale/{min_max_scaler.py → _min_max_scaler.py} +36 -39
- chemotools/scale/{norm_scaler.py → _norm_scaler.py} +18 -25
- chemotools/scale/_point_scaler.py +115 -0
- chemotools/scatter/__init__.py +13 -2
- chemotools/scatter/_extended_multiplicative_scatter_correction.py +183 -0
- chemotools/scatter/_multiplicative_scatter_correction.py +169 -0
- chemotools/scatter/_robust_normal_variate.py +101 -0
- chemotools/scatter/{standard_normal_variate.py → _standard_normal_variate.py} +21 -26
- chemotools/smooth/__init__.py +6 -4
- chemotools/smooth/{mean_filter.py → _mean_filter.py} +18 -25
- chemotools/smooth/{median_filter.py → _median_filter.py} +32 -24
- chemotools/smooth/{savitzky_golay_filter.py → _savitzky_golay_filter.py} +22 -24
- chemotools/smooth/{whittaker_smooth.py → _whittaker_smooth.py} +24 -29
- {chemotools-0.0.22.dist-info → chemotools-0.1.6.dist-info}/METADATA +19 -15
- chemotools-0.1.6.dist-info/RECORD +51 -0
- {chemotools-0.0.22.dist-info → chemotools-0.1.6.dist-info}/WHEEL +1 -2
- chemotools/scale/index_scaler.py +0 -97
- chemotools/scatter/extended_multiplicative_scatter_correction.py +0 -33
- chemotools/scatter/multiplicative_scatter_correction.py +0 -123
- chemotools/utils/check_inputs.py +0 -14
- chemotools/variable_selection/__init__.py +0 -1
- chemotools/variable_selection/range_cut.py +0 -121
- chemotools-0.0.22.dist-info/RECORD +0 -39
- chemotools-0.0.22.dist-info/top_level.txt +0 -2
- tests/fixtures.py +0 -89
- tests/test_functionality.py +0 -397
- tests/test_sklearn_compliance.py +0 -192
- {tests → chemotools/datasets/data}/__init__.py +0 -0
- {chemotools-0.0.22.dist-info → chemotools-0.1.6.dist-info}/LICENSE +0 -0
tests/test_sklearn_compliance.py
DELETED
@@ -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
|
File without changes
|