-
Notifications
You must be signed in to change notification settings - Fork 59
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
Feature/rename basis #490
Feature/rename basis #490
Conversation
Codecov ReportBase: 85.35% // Head: 85.40% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #490 +/- ##
===========================================
+ Coverage 85.35% 85.40% +0.04%
===========================================
Files 139 139
Lines 11064 11100 +36
===========================================
+ Hits 9444 9480 +36
Misses 1620 1620
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. |
ordered_evaluated_points = evaluated_points[-2::-1] | ||
|
||
# Build the matrix | ||
return scipy.linalg.hankel( # type: ignore[no-any-return] |
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 🐶
Unused "type: ignore" comment
@@ -278,7 +278,7 @@ | |||
############################################################################## | |||
# Here we show the first five elements of a Fourier basis. | |||
|
|||
basis = skfda.representation.basis.Fourier(n_basis=5) | |||
basis = skfda.representation.basis.FourierBasis(n_basis=5) |
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 "FourierBasis", variable has type "MonomialBasis")
@@ -314,7 +314,7 @@ | |||
############################################################################## | |||
# Here we show the first five elements of a B-spline basis. | |||
|
|||
basis = skfda.representation.basis.BSpline(n_basis=5) | |||
basis = skfda.representation.basis.BSplineBasis(n_basis=5) |
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 "BSplineBasis", variable has type "MonomialBasis")
@@ -365,12 +365,12 @@ | |||
|
|||
fd = skfda.FDataGrid(X) | |||
|
|||
basis = skfda.representation.basis.Tensor([ | |||
skfda.representation.basis.Fourier( # X axis | |||
basis = skfda.representation.basis.TensorBasis([ |
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 "TensorBasis", variable has type "MonomialBasis")
@@ -435,7 +435,7 @@ | |||
############################################################################## | |||
# We now represent the digits dataset in this basis. | |||
|
|||
basis = skfda.representation.basis.FiniteElement( | |||
basis = skfda.representation.basis.FiniteElementBasis( |
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 "FiniteElementBasis", variable has type "MonomialBasis")
@@ -475,12 +475,12 @@ | |||
# are now expressed in a Fourier basis, while we express precipitations as | |||
# B-splines. | |||
|
|||
basis = skfda.representation.basis.VectorValued([ | |||
skfda.representation.basis.Fourier( # First coordinate function | |||
basis = skfda.representation.basis.VectorValuedBasis([ |
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 "VectorValuedBasis", variable has type "MonomialBasis")
@@ -14,7 +14,7 @@ | |||
import skfda | |||
from skfda.inference.anova import oneway_anova | |||
from skfda.representation import FDataGrid, FDataBasis | |||
from skfda.representation.basis import Fourier | |||
from skfda.representation.basis import FourierBasis |
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 🐶
I005 isort found an unexpected missing import
@@ -1,19 +1,13 @@ | |||
from __future__ import annotations |
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.
I think that it is better that the renamed classes live in the same module as the older ones.
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.
Yes, I tried that at first, but I had some issues with Sphinx when trying to generate the documentation. When I moved the old classes into their own files, it worked, but it seems that those issues were caused by a mistake I fixed without noticing. It does seem to generate the documentation correctly with the old classes in the same files now.
@@ -278,7 +278,7 @@ | |||
############################################################################## | |||
# Here we show the first five elements of a Fourier basis. | |||
|
|||
basis = skfda.representation.basis.Fourier(n_basis=5) | |||
basis = skfda.representation.basis.FourierBasis(n_basis=5) |
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 "FourierBasis", variable has type "MonomialBasis") [assignment]
@@ -314,7 +314,7 @@ | |||
############################################################################## | |||
# Here we show the first five elements of a B-spline basis. | |||
|
|||
basis = skfda.representation.basis.BSpline(n_basis=5) | |||
basis = skfda.representation.basis.BSplineBasis(n_basis=5) |
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 "BSplineBasis", variable has type "MonomialBasis") [assignment]
@@ -365,12 +365,12 @@ | |||
|
|||
fd = skfda.FDataGrid(X) | |||
|
|||
basis = skfda.representation.basis.Tensor([ | |||
skfda.representation.basis.Fourier( # X axis | |||
basis = skfda.representation.basis.TensorBasis([ |
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 "TensorBasis", variable has type "MonomialBasis") [assignment]
@@ -435,7 +435,7 @@ | |||
############################################################################## | |||
# We now represent the digits dataset in this basis. | |||
|
|||
basis = skfda.representation.basis.FiniteElement( | |||
basis = skfda.representation.basis.FiniteElementBasis( |
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 "FiniteElementBasis", variable has type "MonomialBasis") [assignment]
@@ -475,12 +475,12 @@ | |||
# are now expressed in a Fourier basis, while we express precipitations as | |||
# B-splines. | |||
|
|||
basis = skfda.representation.basis.VectorValued([ | |||
skfda.representation.basis.Fourier( # First coordinate function | |||
basis = skfda.representation.basis.VectorValuedBasis([ |
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 "VectorValuedBasis", variable has type "MonomialBasis") [assignment]
# **References:** | ||
# | ||
# [1] Antonio Cuevas, Manuel Febrero-Bande, and Ricardo Fraiman. "An anova test | ||
# for functional data". *Computational Statistics Data Analysis*, | ||
# [1] Antonio Cuevas, Manuel Febrero-Bande, and Ricardo Fraiman. "An anova |
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 🐶
W291 trailing whitespace
|
||
|
||
class FiniteElement(FiniteElementBasis): | ||
"""Finite element 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 🐶
D208 Docstring is over-indented
Closes #488 by renaming the current basis to add "Basis" as a suffix.
Additionally, the current basis classes are marked as deprecated and implemented as subclasses of the renamed one.