chemotools 0.1.3__tar.gz → 0.1.4__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 (64) hide show
  1. {chemotools-0.1.3 → chemotools-0.1.4}/PKG-INFO +1 -1
  2. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/augmentation/uniform_noise.py +6 -6
  3. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/feature_selection/_range_cut.py +1 -0
  4. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools.egg-info/PKG-INFO +1 -1
  5. {chemotools-0.1.3 → chemotools-0.1.4}/tests/test_functionality.py +2 -1
  6. {chemotools-0.1.3 → chemotools-0.1.4}/LICENSE +0 -0
  7. {chemotools-0.1.3 → chemotools-0.1.4}/README.md +0 -0
  8. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/__init__.py +0 -0
  9. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/augmentation/__init__.py +0 -0
  10. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/augmentation/baseline_shift.py +0 -0
  11. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/augmentation/exponential_noise.py +0 -0
  12. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/augmentation/index_shift.py +0 -0
  13. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/augmentation/normal_noise.py +0 -0
  14. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/augmentation/spectrum_scale.py +0 -0
  15. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/baseline/__init__.py +0 -0
  16. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/baseline/_air_pls.py +0 -0
  17. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/baseline/_ar_pls.py +0 -0
  18. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/baseline/_constant_baseline_correction.py +0 -0
  19. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/baseline/_cubic_spline_correction.py +0 -0
  20. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/baseline/_linear_correction.py +0 -0
  21. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/baseline/_non_negative.py +0 -0
  22. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/baseline/_polynomial_correction.py +0 -0
  23. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/baseline/_subtract_reference.py +0 -0
  24. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/datasets/__init__.py +0 -0
  25. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/datasets/_base.py +0 -0
  26. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/datasets/data/__init__.py +0 -0
  27. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/datasets/data/coffee_labels.csv +0 -0
  28. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/datasets/data/coffee_spectra.csv +0 -0
  29. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/datasets/data/fermentation_hplc.csv +0 -0
  30. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/datasets/data/fermentation_spectra.csv +0 -0
  31. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/datasets/data/train_hplc.csv +0 -0
  32. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/datasets/data/train_spectra.csv +0 -0
  33. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/derivative/__init__.py +0 -0
  34. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/derivative/_norris_william.py +0 -0
  35. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/derivative/_savitzky_golay.py +0 -0
  36. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/feature_selection/__init__.py +0 -0
  37. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/feature_selection/_index_selector.py +0 -0
  38. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/scale/__init__.py +0 -0
  39. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/scale/_min_max_scaler.py +0 -0
  40. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/scale/_norm_scaler.py +0 -0
  41. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/scale/_point_scaler.py +0 -0
  42. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/scatter/__init__.py +0 -0
  43. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/scatter/_extended_multiplicative_scatter_correction.py +0 -0
  44. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/scatter/_multiplicative_scatter_correction.py +0 -0
  45. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/scatter/_robust_normal_variate.py +0 -0
  46. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/scatter/_standard_normal_variate.py +0 -0
  47. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/smooth/__init__.py +0 -0
  48. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/smooth/_mean_filter.py +0 -0
  49. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/smooth/_median_filter.py +0 -0
  50. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/smooth/_savitzky_golay_filter.py +0 -0
  51. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/smooth/_whittaker_smooth.py +0 -0
  52. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/utils/__init__.py +0 -0
  53. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools/utils/check_inputs.py +0 -0
  54. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools.egg-info/SOURCES.txt +0 -0
  55. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools.egg-info/dependency_links.txt +0 -0
  56. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools.egg-info/requires.txt +0 -0
  57. {chemotools-0.1.3 → chemotools-0.1.4}/chemotools.egg-info/top_level.txt +0 -0
  58. {chemotools-0.1.3 → chemotools-0.1.4}/pyproject.toml +0 -0
  59. {chemotools-0.1.3 → chemotools-0.1.4}/setup.cfg +0 -0
  60. {chemotools-0.1.3 → chemotools-0.1.4}/setup.py +0 -0
  61. {chemotools-0.1.3 → chemotools-0.1.4}/tests/__init__.py +0 -0
  62. {chemotools-0.1.3 → chemotools-0.1.4}/tests/fixtures.py +0 -0
  63. {chemotools-0.1.3 → chemotools-0.1.4}/tests/test_datasets.py +0 -0
  64. {chemotools-0.1.3 → chemotools-0.1.4}/tests/test_sklearn_compliance.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: chemotools
3
- Version: 0.1.3
3
+ Version: 0.1.4
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
@@ -11,10 +11,10 @@ class UniformNoise(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
11
11
 
12
12
  Parameters
13
13
  ----------
14
- low : float, default=0.0
14
+ min : float, default=0.0
15
15
  The lower bound of the uniform distribution.
16
16
 
17
- high : float, default=0.0
17
+ max : float, default=0.0
18
18
  The upper bound of the uniform distribution.
19
19
 
20
20
  random_state : int, default=None
@@ -38,9 +38,9 @@ class UniformNoise(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
38
38
  """
39
39
 
40
40
 
41
- def __init__(self, low: float = 0.0, high: float = 0.0, random_state: int = None):
42
- self.low = low
43
- self.high = high
41
+ def __init__(self, min: float = 0.0, max: float = 0.0, random_state: int = None):
42
+ self.min = min
43
+ self.max = max
44
44
  self.random_state = random_state
45
45
 
46
46
  def fit(self, X: np.ndarray, y=None) -> "UniformNoise":
@@ -109,4 +109,4 @@ class UniformNoise(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
109
109
  return X_.reshape(-1, 1) if X_.ndim == 1 else X_
110
110
 
111
111
  def _add_random_noise(self, x) -> np.ndarray:
112
- return x + self._rng.uniform(self.low, self.high, size=x.shape)
112
+ return x + self._rng.uniform(self.min, self.max, size=x.shape)
@@ -78,6 +78,7 @@ class RangeCut(BaseEstimator, SelectorMixin):
78
78
  else:
79
79
  self.start_index_ = self._find_index(self.start)
80
80
  self.end_index_ = self._find_index(self.end)
81
+ self.wavenumbers_ = self.wavenumbers[self.start_index_ : self.end_index_]
81
82
 
82
83
  return self
83
84
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: chemotools
3
- Version: 0.1.3
3
+ Version: 0.1.4
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
@@ -622,6 +622,7 @@ def test_range_cut_by_wavenumber_with_list():
622
622
 
623
623
  # Assert
624
624
  assert np.allclose(spectrum_corrected[0], spectrum[0][1:7], atol=1e-8)
625
+ assert range_cut.wavenumbers_ == [2, 3, 4, 5, 6, 7]
625
626
 
626
627
 
627
628
  def test_range_cut_by_wavenumber_with_dataframe():
@@ -740,7 +741,7 @@ def test_subtract_reference_without_reference(spectrum):
740
741
  def test_uniform_noise():
741
742
  # Arrange
742
743
  spectrum = np.ones(10000).reshape(1, -1)
743
- uniform_noise = UniformNoise(low=-1, high=1, random_state=42)
744
+ uniform_noise = UniformNoise(min=-1, max=1, random_state=42)
744
745
 
745
746
  # Act
746
747
  spectrum_corrected = uniform_noise.fit_transform(spectrum)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes