chemotools 0.0.22__tar.gz → 0.0.24__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 (56) hide show
  1. {chemotools-0.0.22 → chemotools-0.0.24}/PKG-INFO +5 -1
  2. chemotools-0.0.24/chemotools/datasets/__init__.py +2 -0
  3. chemotools-0.0.24/chemotools/datasets/_base.py +52 -0
  4. chemotools-0.0.24/chemotools/datasets/data/fermentation_hplc.csv +35 -0
  5. chemotools-0.0.24/chemotools/datasets/data/fermentation_spectra.csv +1630 -0
  6. chemotools-0.0.24/chemotools/datasets/data/train_hplc.csv +22 -0
  7. chemotools-0.0.24/chemotools/datasets/data/train_spectra.csv +22 -0
  8. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/derivative/norris_william.py +3 -1
  9. chemotools-0.0.24/chemotools/scatter/__init__.py +4 -0
  10. chemotools-0.0.24/chemotools/scatter/extended_multiplicative_scatter_correction.py +192 -0
  11. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/scatter/multiplicative_scatter_correction.py +60 -16
  12. chemotools-0.0.24/chemotools/scatter/robust_normal_variate.py +109 -0
  13. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools.egg-info/PKG-INFO +5 -1
  14. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools.egg-info/SOURCES.txt +10 -0
  15. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools.egg-info/requires.txt +1 -0
  16. {chemotools-0.0.22 → chemotools-0.0.24}/setup.py +3 -1
  17. chemotools-0.0.24/tests/__init__.py +0 -0
  18. chemotools-0.0.24/tests/test_datasets.py +30 -0
  19. {chemotools-0.0.22 → chemotools-0.0.24}/tests/test_functionality.py +174 -5
  20. {chemotools-0.0.22 → chemotools-0.0.24}/tests/test_sklearn_compliance.py +20 -1
  21. chemotools-0.0.22/chemotools/scatter/__init__.py +0 -2
  22. chemotools-0.0.22/chemotools/scatter/extended_multiplicative_scatter_correction.py +0 -33
  23. {chemotools-0.0.22 → chemotools-0.0.24}/LICENSE +0 -0
  24. {chemotools-0.0.22 → chemotools-0.0.24}/README.md +0 -0
  25. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/__init__.py +0 -0
  26. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/baseline/__init__.py +0 -0
  27. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/baseline/air_pls.py +0 -0
  28. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/baseline/ar_pls.py +0 -0
  29. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/baseline/constant_baseline_correction.py +0 -0
  30. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/baseline/cubic_spline_correction.py +0 -0
  31. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/baseline/linear_correction.py +0 -0
  32. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/baseline/non_negative.py +0 -0
  33. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/baseline/polynomial_correction.py +0 -0
  34. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/baseline/subtract_reference.py +0 -0
  35. {chemotools-0.0.22/chemotools/utils → chemotools-0.0.24/chemotools/datasets/data}/__init__.py +0 -0
  36. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/derivative/__init__.py +0 -0
  37. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/derivative/savitzky_golay.py +0 -0
  38. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/scale/__init__.py +0 -0
  39. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/scale/index_scaler.py +0 -0
  40. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/scale/min_max_scaler.py +0 -0
  41. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/scale/norm_scaler.py +0 -0
  42. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/scatter/standard_normal_variate.py +0 -0
  43. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/smooth/__init__.py +0 -0
  44. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/smooth/mean_filter.py +0 -0
  45. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/smooth/median_filter.py +0 -0
  46. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/smooth/savitzky_golay_filter.py +0 -0
  47. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/smooth/whittaker_smooth.py +0 -0
  48. {chemotools-0.0.22/tests → chemotools-0.0.24/chemotools/utils}/__init__.py +0 -0
  49. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/utils/check_inputs.py +0 -0
  50. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/variable_selection/__init__.py +0 -0
  51. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools/variable_selection/range_cut.py +0 -0
  52. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools.egg-info/dependency_links.txt +0 -0
  53. {chemotools-0.0.22 → chemotools-0.0.24}/chemotools.egg-info/top_level.txt +0 -0
  54. {chemotools-0.0.22 → chemotools-0.0.24}/pyproject.toml +0 -0
  55. {chemotools-0.0.22 → chemotools-0.0.24}/setup.cfg +0 -0
  56. {chemotools-0.0.22 → chemotools-0.0.24}/tests/fixtures.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: chemotools
3
- Version: 0.0.22
3
+ Version: 0.0.24
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
@@ -12,6 +12,10 @@ Classifier: Operating System :: OS Independent
12
12
  Requires-Python: >=3.9
13
13
  Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
+ Requires-Dist: numpy
16
+ Requires-Dist: pandas
17
+ Requires-Dist: scipy
18
+ Requires-Dist: scikit-learn
15
19
 
16
20
  ![chemotools](assets/images/logo_5.png)
17
21
 
@@ -0,0 +1,2 @@
1
+ from ._base import load_fermentation_train
2
+ from ._base import load_fermentation_test
@@ -0,0 +1,52 @@
1
+ import pandas as pd
2
+ import os
3
+
4
+ PACKAGE_DIRECTORY = os.path.dirname(os.path.abspath(__file__))
5
+
6
+
7
+ def load_fermentation_train():
8
+ """
9
+ Loads the training data of the fermentation dataset. This data corresponds to a synthetic dataset measured
10
+ off-line. This dataset is designed to represent the variability of real fermentation data.
11
+
12
+ Returns
13
+ -------
14
+ train_spectra: pd.DataFrame A pandas DataFrame containing the synthetic spectra measured to train the model.
15
+ train_hplc: pd.DataFrame A pandas DataFrame containing the corresponding reference measurements analyzed with HPLC.
16
+
17
+ References
18
+ -------
19
+ - Cabaneros Lopez Pau, Udugama Isuru A., Thomsen Sune Tjalfe, Roslander Christian, Junicke Helena,
20
+ Mauricio Iglesias Miguel, Gernaey Krist V. Transforming data into information:
21
+ A parallel hybrid model for real-time state estimation in lignocellulose ethanol fermentations.
22
+ """
23
+ train_spectra = pd.read_csv(PACKAGE_DIRECTORY + "/data/train_spectra.csv")
24
+ train_spectra.columns = train_spectra.columns.astype(float)
25
+ train_hplc = pd.read_csv(PACKAGE_DIRECTORY + "/data/train_hplc.csv")
26
+
27
+ return train_spectra, train_hplc
28
+
29
+
30
+ def load_fermentation_test():
31
+ """
32
+ Loads the testing data of the fermentation dataset. This data corresponds to real fermentation data measured
33
+ on-line during a fermentation process.
34
+
35
+ Returns
36
+ -------
37
+ test_spectra: pd.DataFrame A pandas DataFrame containing the on-line spectra measured to train the model.
38
+ test_hplc: pd.DataFrame A pandas DataFrame containing the corresponding HPLC measurements.
39
+
40
+ References
41
+ -------
42
+ - Cabaneros Lopez Pau, Udugama Isuru A., Thomsen Sune Tjalfe, Roslander Christian, Junicke Helena,
43
+ Mauricio Iglesias Miguel, Gernaey Krist V. Transforming data into information:
44
+ A parallel hybrid model for real-time state estimation in lignocellulose ethanol fermentations.
45
+ """
46
+ fermentation_spectra = pd.read_csv(
47
+ PACKAGE_DIRECTORY + "/data/fermentation_spectra.csv"
48
+ )
49
+ fermentation_spectra.columns = fermentation_spectra.columns.astype(float)
50
+ fermentation_hplc = pd.read_csv(PACKAGE_DIRECTORY + "/data/fermentation_hplc.csv")
51
+
52
+ return fermentation_spectra, fermentation_hplc
@@ -0,0 +1,35 @@
1
+ time,glucose,xylose,acetic_acid,ethanol,furfural
2
+ 0,40.41567094,21.25891737,3.375666211,0,0.553330768
3
+ 0.666666667,40.6426422,21.42072789,3.375666211,0,0.553330768
4
+ 1.833333333,40.72109326,21.63050368,3.346897389,0,0.412503821
5
+ 2.733333333,40.42979778,21.63156316,3.349886358,0,0.382085053
6
+ 3.55,40.34579016,21.74685316,3.370435516,0.360890316,0.358981042
7
+ 4.7,40.31254499,21.89826158,3.402566926,0.436324842,0.306313389
8
+ 5.683333333,40.00702848,21.94189263,3.430775316,0.515675368,0.2689518
9
+ 6.7,44.11275969,24.45178579,3.839703558,0.770215368,0.313648263
10
+ 7.466666667,39.35700539,22.10697789,3.513532379,0.794948,0.214576358
11
+ 8.65,37.82584406,21.89922474,3.546784653,1.267959579,0.133798326
12
+ 9.616666667,37.13786685,21.83093684,3.530905758,1.540224632,0.083228053
13
+ 10.58333333,35.57006992,21.78701684,3.552762589,2.175853263,0.046751968
14
+ 11.63333333,35.63175713,23.37218211,3.827560874,3.453912,0.021523484
15
+ 12.7,29.36546668,21.52484526,3.567520621,4.607689263,0.010342389
16
+ 13.7,29.23747749,25.43883,4.229390316,8.117043579,0.009108758
17
+ 14.98333333,22.25231915,25.54458474,4.272356737,11.34403368,0.007732674
18
+ 15.98333333,11.03654831,21.40984421,3.678112453,12.93475411,0.005611895
19
+ 16.98333333,2.137485389,20.18856,3.528290411,15.62813768,0.0049998
20
+ 17.88333333,0.237707663,18.67698,3.697727558,18.753724,0.005131168
21
+ 18.96666667,0.192595947,15.48228158,3.535762832,18.03833263,0
22
+ 19.11666667,0.192407589,14.19184263,3.724815084,20.602076,0
23
+ 20.88333333,0,11.58024,3.422368842,19.18819389,0
24
+ 21.88333333,0,9.929483684,3.384633116,20.09526316,0
25
+ 22.88333333,0,8.671503158,3.436566442,19.95572989,0
26
+ 23.91666667,0,7.349183684,3.425544621,20.58187768,0
27
+ 25.68333333,0,6.200136316,3.411347021,20.85084505,0
28
+ 26.61666667,0,5.242468421,3.383138632,21.04520232,0
29
+ 27.55,0,3.309699474,3.382765011,21.86673789,0
30
+ 28.68333333,0,2.741532632,3.402566926,21.94361516,0
31
+ 29.66666667,0,2.233852105,3.756012442,24.06423221,0
32
+ 30.68333333,0,1.633804737,3.402193305,22.53039684,0
33
+ 31.61666667,0,1.533154737,3.421995221,21.51780168,0
34
+ 32.63333333,0,1.230434211,3.362215853,21.90507347,0
35
+ 33.88333333,0,0.967684737,3.370061895,22.65715158,0