chemotools 0.0.18__tar.gz → 0.0.19__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 (44) hide show
  1. {chemotools-0.0.18 → chemotools-0.0.19}/PKG-INFO +2 -2
  2. {chemotools-0.0.18 → chemotools-0.0.19}/README.md +1 -1
  3. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/baseline/air_pls.py +2 -2
  4. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/baseline/constant_baseline_correction.py +2 -2
  5. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/baseline/cubic_spline_correction.py +2 -2
  6. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/baseline/linear_correction.py +2 -2
  7. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/baseline/non_negative.py +2 -2
  8. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/baseline/polynomial_correction.py +2 -2
  9. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/baseline/subtract_reference.py +2 -2
  10. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/derivative/norris_william.py +2 -2
  11. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/derivative/savitzky_golay.py +2 -2
  12. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/scale/index_scaler.py +2 -2
  13. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/scale/min_max_scaler.py +2 -2
  14. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/scale/norm_scaler.py +2 -2
  15. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/scatter/multiplicative_scatter_correction.py +2 -2
  16. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/scatter/standard_normal_variate.py +2 -2
  17. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/smooth/mean_filter.py +2 -2
  18. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/smooth/median_filter.py +2 -2
  19. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/smooth/savitzky_golay_filter.py +2 -2
  20. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/smooth/whittaker_smooth.py +2 -2
  21. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/variable_selection/range_cut.py +2 -2
  22. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools.egg-info/PKG-INFO +2 -2
  23. {chemotools-0.0.18 → chemotools-0.0.19}/LICENSE +0 -0
  24. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/__init__.py +0 -0
  25. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/baseline/__init__.py +0 -0
  26. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/derivative/__init__.py +0 -0
  27. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/scale/__init__.py +0 -0
  28. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/scatter/__init__.py +0 -0
  29. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/scatter/extended_multiplicative_scatter_correction.py +0 -0
  30. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/smooth/__init__.py +0 -0
  31. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/utils/__init__.py +0 -0
  32. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/utils/check_inputs.py +0 -0
  33. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools/variable_selection/__init__.py +0 -0
  34. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools.egg-info/SOURCES.txt +0 -0
  35. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools.egg-info/dependency_links.txt +0 -0
  36. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools.egg-info/requires.txt +0 -0
  37. {chemotools-0.0.18 → chemotools-0.0.19}/chemotools.egg-info/top_level.txt +0 -0
  38. {chemotools-0.0.18 → chemotools-0.0.19}/pyproject.toml +0 -0
  39. {chemotools-0.0.18 → chemotools-0.0.19}/setup.cfg +0 -0
  40. {chemotools-0.0.18 → chemotools-0.0.19}/setup.py +0 -0
  41. {chemotools-0.0.18 → chemotools-0.0.19}/tests/__init__.py +0 -0
  42. {chemotools-0.0.18 → chemotools-0.0.19}/tests/fixtures.py +0 -0
  43. {chemotools-0.0.18 → chemotools-0.0.19}/tests/test_functionality.py +0 -0
  44. {chemotools-0.0.18 → chemotools-0.0.19}/tests/test_sklearn_compliance.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: chemotools
3
- Version: 0.0.18
3
+ Version: 0.0.19
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
@@ -13,7 +13,7 @@ Requires-Python: >=3.9
13
13
  Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
15
 
16
- ![chemotools](assets/images/logo_2.png)
16
+ ![chemotools](assets/images/logo_5.png)
17
17
 
18
18
 
19
19
  [![pypi](https://img.shields.io/pypi/v/chemotools)](https://pypi.org/project/chemotools)
@@ -1,4 +1,4 @@
1
- ![chemotools](assets/images/logo_2.png)
1
+ ![chemotools](assets/images/logo_5.png)
2
2
 
3
3
 
4
4
  [![pypi](https://img.shields.io/pypi/v/chemotools)](https://pypi.org/project/chemotools)
@@ -2,7 +2,7 @@ import logging
2
2
  import numpy as np
3
3
  from scipy.sparse import csc_matrix, eye, diags
4
4
  from scipy.sparse.linalg import spsolve
5
- from sklearn.base import BaseEstimator, TransformerMixin
5
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
6
6
  from sklearn.utils.validation import check_is_fitted
7
7
 
8
8
  from chemotools.utils.check_inputs import check_input
@@ -15,7 +15,7 @@ logger = logging.getLogger(__name__)
15
15
  # Analyst 135 (5), 1138-1146 (2010).P
16
16
 
17
17
 
18
- class AirPls(BaseEstimator, TransformerMixin):
18
+ class AirPls(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
19
19
  def __init__(
20
20
  self,
21
21
  nr_iterations: int = 15,
@@ -1,11 +1,11 @@
1
1
  import numpy as np
2
- from sklearn.base import BaseEstimator, TransformerMixin
2
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
3
3
  from sklearn.utils.validation import check_is_fitted
4
4
 
5
5
  from chemotools.utils.check_inputs import check_input
6
6
 
7
7
 
8
- class ConstantBaselineCorrection(BaseEstimator, TransformerMixin):
8
+ class ConstantBaselineCorrection(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
9
9
  def __init__(
10
10
  self, wavenumbers: np.ndarray = None, start: int = 0, end: int = 1
11
11
  ) -> None:
@@ -1,11 +1,11 @@
1
1
  import numpy as np
2
2
  from scipy.interpolate import CubicSpline
3
- from sklearn.base import BaseEstimator, TransformerMixin
3
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
4
4
  from sklearn.utils.validation import check_is_fitted
5
5
 
6
6
  from chemotools.utils.check_inputs import check_input
7
7
 
8
- class CubicSplineCorrection(BaseEstimator, TransformerMixin):
8
+ class CubicSplineCorrection(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
9
9
  def __init__(self, indices: np.ndarray = None) -> None:
10
10
  self.indices = indices
11
11
 
@@ -1,11 +1,11 @@
1
1
  import numpy as np
2
- from sklearn.base import BaseEstimator, TransformerMixin
2
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
3
3
  from sklearn.utils.validation import check_is_fitted
4
4
 
5
5
  from chemotools.utils.check_inputs import check_input
6
6
 
7
7
 
8
- class LinearCorrection(BaseEstimator, TransformerMixin):
8
+ class LinearCorrection(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
9
9
 
10
10
  def _drift_correct_spectrum(self, x: np.ndarray) -> np.ndarray:
11
11
 
@@ -1,12 +1,12 @@
1
1
  import numpy as np
2
- from sklearn.base import BaseEstimator, TransformerMixin
2
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
3
3
  from sklearn.utils.validation import check_is_fitted
4
4
 
5
5
  from chemotools.utils.check_inputs import check_input
6
6
 
7
7
 
8
8
 
9
- class NonNegative(BaseEstimator, TransformerMixin):
9
+ class NonNegative(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
10
10
  def __init__(self, mode: str = "zero"):
11
11
  self.mode = mode
12
12
 
@@ -1,10 +1,10 @@
1
1
  import numpy as np
2
- from sklearn.base import BaseEstimator, TransformerMixin
2
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
3
3
  from sklearn.utils.validation import check_is_fitted
4
4
 
5
5
  from chemotools.utils.check_inputs import check_input
6
6
 
7
- class PolynomialCorrection(BaseEstimator, TransformerMixin):
7
+ class PolynomialCorrection(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
8
8
  def __init__(self, order: int = 1, indices: list = None) -> None:
9
9
  self.order = order
10
10
  self.indices = indices
@@ -1,11 +1,11 @@
1
1
  import numpy as np
2
- from sklearn.base import BaseEstimator, TransformerMixin
2
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
3
3
  from sklearn.utils.validation import check_is_fitted
4
4
 
5
5
  from chemotools.utils.check_inputs import check_input
6
6
 
7
7
 
8
- class SubtractReference(BaseEstimator, TransformerMixin):
8
+ class SubtractReference(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
9
9
  def __init__(
10
10
  self,
11
11
  reference: np.ndarray = None,
@@ -1,12 +1,12 @@
1
1
  import numpy as np
2
2
  from scipy.ndimage import convolve1d
3
- from sklearn.base import BaseEstimator, TransformerMixin
3
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
4
4
  from sklearn.utils.validation import check_is_fitted
5
5
 
6
6
  from chemotools.utils.check_inputs import check_input
7
7
 
8
8
 
9
- class NorrisWilliams(BaseEstimator, TransformerMixin):
9
+ class NorrisWilliams(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
10
10
  def __init__(
11
11
  self,
12
12
  window_size: int = 5,
@@ -1,12 +1,12 @@
1
1
  import numpy as np
2
2
  from scipy.signal import savgol_filter
3
- from sklearn.base import BaseEstimator, TransformerMixin
3
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
4
4
  from sklearn.utils.validation import check_is_fitted
5
5
 
6
6
  from chemotools.utils.check_inputs import check_input
7
7
 
8
8
 
9
- class SavitzkyGolay(BaseEstimator, TransformerMixin):
9
+ class SavitzkyGolay(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
10
10
  def __init__(
11
11
  self, window_size: int = 3, polynomial_order: int = 1, derivate_order: int = 1, mode: str = "nearest"
12
12
  ) -> None:
@@ -1,11 +1,11 @@
1
1
  import numpy as np
2
- from sklearn.base import BaseEstimator, TransformerMixin
2
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
3
3
  from sklearn.utils.validation import check_is_fitted
4
4
 
5
5
  from chemotools.utils.check_inputs import check_input
6
6
 
7
7
 
8
- class IndexScaler(BaseEstimator, TransformerMixin):
8
+ class IndexScaler(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
9
9
  def __init__(self, index: int = 0):
10
10
  self.index = index
11
11
 
@@ -1,11 +1,11 @@
1
1
  import numpy as np
2
- from sklearn.base import BaseEstimator, TransformerMixin
2
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
3
3
  from sklearn.utils.validation import check_is_fitted
4
4
 
5
5
  from chemotools.utils.check_inputs import check_input
6
6
 
7
7
 
8
- class MinMaxScaler(BaseEstimator, TransformerMixin):
8
+ class MinMaxScaler(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
9
9
  def __init__(self, norm: str = 'max'):
10
10
  self.norm = norm
11
11
 
@@ -1,11 +1,11 @@
1
1
  import numpy as np
2
- from sklearn.base import BaseEstimator, TransformerMixin
2
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
3
3
  from sklearn.utils.validation import check_is_fitted
4
4
 
5
5
  from chemotools.utils.check_inputs import check_input
6
6
 
7
7
 
8
- class NormScaler(BaseEstimator, TransformerMixin):
8
+ class NormScaler(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
9
9
  def __init__(self, l_norm: int = 2):
10
10
  self.l_norm = l_norm
11
11
 
@@ -1,11 +1,11 @@
1
1
  import numpy as np
2
- from sklearn.base import BaseEstimator, TransformerMixin
2
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
3
3
  from sklearn.utils.validation import check_is_fitted
4
4
 
5
5
  from chemotools.utils.check_inputs import check_input
6
6
 
7
7
 
8
- class MultiplicativeScatterCorrection(BaseEstimator, TransformerMixin):
8
+ class MultiplicativeScatterCorrection(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
9
9
  def __init__(
10
10
  self,
11
11
  reference: np.ndarray = None,
@@ -1,11 +1,11 @@
1
1
  import numpy as np
2
- from sklearn.base import BaseEstimator, TransformerMixin
2
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
3
3
  from sklearn.utils.validation import check_is_fitted
4
4
 
5
5
  from chemotools.utils.check_inputs import check_input
6
6
 
7
7
 
8
- class StandardNormalVariate(BaseEstimator, TransformerMixin):
8
+ class StandardNormalVariate(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
9
9
  def fit(self, X: np.ndarray, y=None) -> "StandardNormalVariate":
10
10
  # Check that X is a 2D array and has only finite values
11
11
  X = check_input(X)
@@ -1,12 +1,12 @@
1
1
  import numpy as np
2
2
  from scipy.ndimage import uniform_filter1d
3
- from sklearn.base import BaseEstimator, TransformerMixin
3
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
4
4
  from sklearn.utils.validation import check_is_fitted
5
5
 
6
6
  from chemotools.utils.check_inputs import check_input
7
7
 
8
8
 
9
- class MeanFilter(BaseEstimator, TransformerMixin):
9
+ class MeanFilter(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
10
10
  def __init__(self, window_size: int = 3, mode='nearest') -> None:
11
11
  self.window_size = window_size
12
12
  self.mode = mode
@@ -1,12 +1,12 @@
1
1
  import numpy as np
2
2
  from scipy.ndimage import median_filter
3
- from sklearn.base import BaseEstimator, TransformerMixin
3
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
4
4
  from sklearn.utils.validation import check_is_fitted
5
5
 
6
6
  from chemotools.utils.check_inputs import check_input
7
7
 
8
8
 
9
- class MedianFilter(BaseEstimator, TransformerMixin):
9
+ class MedianFilter(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
10
10
  def __init__(self, window_size: int = 3, mode: str = 'nearest') -> None:
11
11
  self.window_size = window_size
12
12
  self.mode = mode
@@ -1,12 +1,12 @@
1
1
  import numpy as np
2
2
  from scipy.signal import savgol_filter
3
- from sklearn.base import BaseEstimator, TransformerMixin
3
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
4
4
  from sklearn.utils.validation import check_is_fitted
5
5
 
6
6
  from chemotools.utils.check_inputs import check_input
7
7
 
8
8
 
9
- class SavitzkyGolayFilter(BaseEstimator, TransformerMixin):
9
+ class SavitzkyGolayFilter(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
10
10
  def __init__(
11
11
  self, window_size: int = 3, polynomial_order: int = 1, mode: str = "nearest"
12
12
  ) -> None:
@@ -1,7 +1,7 @@
1
1
  import numpy as np
2
2
  from scipy.sparse import csc_matrix, eye, diags
3
3
  from scipy.sparse.linalg import spsolve
4
- from sklearn.base import BaseEstimator, TransformerMixin
4
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
5
5
  from sklearn.utils.validation import check_is_fitted
6
6
 
7
7
  from chemotools.utils.check_inputs import check_input
@@ -12,7 +12,7 @@ from chemotools.utils.check_inputs import check_input
12
12
  # Analyst 135 (5), 1138-1146 (2010).
13
13
 
14
14
 
15
- class WhittakerSmooth(BaseEstimator, TransformerMixin):
15
+ class WhittakerSmooth(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
16
16
  def __init__(
17
17
  self,
18
18
  lam: float = 1e2,
@@ -1,11 +1,11 @@
1
1
  import numpy as np
2
- from sklearn.base import BaseEstimator, TransformerMixin
2
+ from sklearn.base import BaseEstimator, TransformerMixin, OneToOneFeatureMixin
3
3
  from sklearn.utils.validation import check_is_fitted
4
4
 
5
5
  from chemotools.utils.check_inputs import check_input
6
6
 
7
7
 
8
- class RangeCut(BaseEstimator, TransformerMixin):
8
+ class RangeCut(OneToOneFeatureMixin, BaseEstimator, TransformerMixin):
9
9
  def __init__(
10
10
  self,
11
11
  wavenumbers: np.ndarray = None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: chemotools
3
- Version: 0.0.18
3
+ Version: 0.0.19
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
@@ -13,7 +13,7 @@ Requires-Python: >=3.9
13
13
  Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
15
 
16
- ![chemotools](assets/images/logo_2.png)
16
+ ![chemotools](assets/images/logo_5.png)
17
17
 
18
18
 
19
19
  [![pypi](https://img.shields.io/pypi/v/chemotools)](https://pypi.org/project/chemotools)
File without changes
File without changes
File without changes
File without changes