-
Notifications
You must be signed in to change notification settings - Fork 58
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
LLR for non orthonormal basis #430
Conversation
tests/test_kernel_regression.py
Outdated
class TestNonOthonormalBasisLLR(unittest.TestCase): | ||
"""Test LocalLinearRegression method with non orthonormal basis.""" | ||
|
||
def test_llr_non_orthonormal(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.
🚫 [mypy] reported by reviewdog 🐶
Function is missing a return type annotation
tests/test_kernel_regression.py
Outdated
class TestNonOthonormalBasisLLR(unittest.TestCase): | ||
"""Test LocalLinearRegression method with non orthonormal basis.""" | ||
|
||
def test_llr_non_orthonormal(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.
📝 [mypy] reported by reviewdog 🐶
Use "-> None" if function does not return a value
Codecov Report
@@ Coverage Diff @@
## develop #430 +/- ##
========================================
Coverage 80.18% 80.19%
========================================
Files 93 93
Lines 7264 7266 +2
========================================
+ Hits 5825 5827 +2
Misses 1439 1439
Continue to review full report at Codecov.
|
skfda/misc/hat_matrix.py
Outdated
|
||
# Adding a column of ones in the first position of all matrices | ||
dims = (C.shape[0], C.shape[1], 1) | ||
C = np.c_[np.ones(dims), C] |
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.
Why not hstack
?
skfda/misc/hat_matrix.py
Outdated
|
||
# Calculate new coefficients taking into account cross-products | ||
# if the basis is orthonormal, C would not change | ||
C = np.einsum( |
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.
Isn't this the same as C @= inner_product_matrix
?
Close #421