New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow BasisSmoother to accept irregularly sampled data #499
Conversation
_smoother.fit(d_grid, y) | ||
fitted_smoothers.append(_smoother) | ||
|
||
self.fitted_smoothers = fitted_smoothers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [mypy] reported by reviewdog 🐶
Incompatible types in assignment (expression has type "List[BasisSmoother]", variable has type "None") [assignment]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
pep8
skfda/preprocessing/smoothing/_basis.py|421 col 1| D102 Missing docstring in public method
skfda/preprocessing/smoothing/_basis.py|426 col 1| W293 blank line contains whitespace
skfda/preprocessing/smoothing/_basis.py|428 col 1| N400: Found backslash that is used for line breaking
skfda/preprocessing/smoothing/_basis.py|429 col 62| WPS318 Found extra indentation
skfda/preprocessing/smoothing/_basis.py|430 col 1| W293 blank line contains whitespace
skfda/preprocessing/smoothing/_basis.py|433 col 80| E501 line too long (80 > 79 characters)
skfda/preprocessing/smoothing/_basis.py|434 col 1| W293 blank line contains whitespace
@@ -334,3 +334,102 @@ def transform( | |||
) | |||
|
|||
return super().transform(X, y) | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
W293 blank line contains whitespace
|
||
|
||
class SparseBasisSmoother(BasisSmoother): | ||
r""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
D205 1 blank line required between summary line and description
|
||
|
||
class SparseBasisSmoother(BasisSmoother): | ||
r""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
D400 First line should end with a period
|
||
|
||
class SparseBasisSmoother(BasisSmoother): | ||
r""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
WPS360 Found an unnecessary use of a raw string: """
|
||
class SparseBasisSmoother(BasisSmoother): | ||
r""" | ||
Transform raw_data in the form of a list of single-function FDataGrid objects |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
E501 line too long (81 > 79 characters)
for d_grid in X: | ||
_smoother = BasisSmoother( | ||
self.basis, | ||
return_basis=self.return_basis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
C812 missing trailing comma
self.basis, | ||
return_basis=self.return_basis | ||
) | ||
_smoother.fit(d_grid, y) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
WPS121 Found usage of a variable marked as unused: _smoother
return_basis=self.return_basis | ||
) | ||
_smoother.fit(d_grid, y) | ||
fitted_smoothers.append(_smoother) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
WPS121 Found usage of a variable marked as unused: _smoother
) | ||
_smoother.fit(d_grid, y) | ||
fitted_smoothers.append(_smoother) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
W293 blank line contains whitespace
self.fitted_smoothers = fitted_smoothers | ||
|
||
return self | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
W293 blank line contains whitespace
Codecov ReportBase: 85.41% // Head: 85.27% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #499 +/- ##
===========================================
- Coverage 85.41% 85.27% -0.15%
===========================================
Files 139 139
Lines 11103 11128 +25
===========================================
+ Hits 9484 9489 +5
- Misses 1619 1639 +20
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Alternatively, I have implemented a separate SparseBasisSmoother class which encapsulates the functionality of BasisSmoother in order to apply it to irregularly sampled data, in the format given in Issue #325