-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added author name; minor adaption in variable names
- Loading branch information
Showing
2 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,18 +16,28 @@ | |
""" | ||
|
||
# Authors: | ||
# Pau Cabaneros | ||
# Niklas Zell <[email protected]> | ||
|
||
|
||
### Imports ### | ||
|
||
|
||
import logging | ||
from typing import Union | ||
|
||
import numpy as np | ||
from sklearn.base import BaseEstimator, OneToOneFeatureMixin, TransformerMixin | ||
from sklearn.utils.validation import check_is_fitted | ||
|
||
from chemotools.utils.check_inputs import check_input | ||
from chemotools.utils._whittaker_base import WhittakerLikeSolver | ||
from chemotools.utils.check_inputs import check_input | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
### Main Class ### | ||
|
||
|
||
# TODO: is polynomial_order actually differences and if so, is the description correct? | ||
class AirPls( | ||
|
@@ -187,7 +197,7 @@ def _calculate_air_pls(self, x): | |
# FIXME: work on full Arrays and use internal loop of ``whittaker_solve`` | ||
for i in range(0, self.nr_iterations - 1): | ||
# the baseline is fitted using the Whittaker smoother framework | ||
z, _ = self._solve_single_b_fixed_lam(b=x, w=w) | ||
z, _ = self._solve_single_b_fixed_lam(rhs_b=x, weights=w) | ||
d = x - z | ||
dssn = np.abs(d[d < 0].sum()) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,13 @@ | |
""" | ||
|
||
# Authors: | ||
# Pau Cabaneros | ||
# Niklas Zell <[email protected]> | ||
|
||
|
||
### Imports ### | ||
|
||
import logging | ||
from numbers import Integral | ||
from typing import Union | ||
|
@@ -26,11 +33,13 @@ | |
from sklearn.base import BaseEstimator, OneToOneFeatureMixin, TransformerMixin | ||
from sklearn.utils.validation import check_is_fitted, check_scalar | ||
|
||
from chemotools.utils.check_inputs import check_input | ||
from chemotools.utils._whittaker_base import WhittakerLikeSolver | ||
from chemotools.utils.check_inputs import check_input | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
### Main Class ### | ||
|
||
|
||
class ArPls( | ||
OneToOneFeatureMixin, | ||
|
@@ -194,7 +203,7 @@ def _calculate_ar_pls(self, x): | |
# FIXME: work on full Arrays and use internal loop of ``whittaker_solve`` | ||
for _ in range(self.nr_iterations): | ||
# the baseline is fitted using the Whittaker smoother framework | ||
z, _ = self._solve_single_b_fixed_lam(b=x, w=w) | ||
z, _ = self._solve_single_b_fixed_lam(rhs_b=x, weights=w) | ||
d = x - z | ||
|
||
# if there is no data point below the baseline, the baseline is considered | ||
|