chemotools 0.0.27__py3-none-any.whl → 0.0.28__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/baseline/constant_baseline_correction.py +0 -2
- chemotools/datasets/__init__.py +1 -0
- chemotools/datasets/_base.py +17 -0
- chemotools/datasets/data/coffee_labels.csv +61 -0
- chemotools/datasets/data/coffee_spectra.csv +61 -0
- chemotools/scale/point_scaler.py +0 -2
- chemotools/variable_selection/range_cut.py +0 -2
- {chemotools-0.0.27.dist-info → chemotools-0.0.28.dist-info}/METADATA +1 -1
- {chemotools-0.0.27.dist-info → chemotools-0.0.28.dist-info}/RECORD +14 -12
- tests/test_datasets.py +14 -1
- tests/test_functionality.py +25 -0
- {chemotools-0.0.27.dist-info → chemotools-0.0.28.dist-info}/LICENSE +0 -0
- {chemotools-0.0.27.dist-info → chemotools-0.0.28.dist-info}/WHEEL +0 -0
- {chemotools-0.0.27.dist-info → chemotools-0.0.28.dist-info}/top_level.txt +0 -0
@@ -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))
|
chemotools/datasets/__init__.py
CHANGED
chemotools/datasets/_base.py
CHANGED
@@ -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
|