Skip to content
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

Covariance kernels #601

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open

Covariance kernels #601

wants to merge 16 commits into from

Conversation

E105D104U125
Copy link
Contributor

Changed covariances.py from misc module in order to generalize the Linear, Polynomial, Exponential, Gaussian and Matern kernels for FData.

Included tests for theses changes and adapted the already existing tests for multivariate data to pytest format.

E105D104U125 and others added 4 commits February 15, 2024 15:49
Converted tests from old test_covariances file to pytest format and added tests for functional data objects.
Adapted Linear, Polynomial, Exponential, Gaussian and Matern covariances and added control messages for covariance kernels that do not support functional data objects.
Changed function to test multivariate data for all covariance functions. Now uses ParameterGrid.
Copy link

@github-actions github-actions bot left a 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/misc/covariances.py|822 col 1| D102 Missing docstring in public method
skfda/misc/covariances.py|865 col 1| D102 Missing docstring in public method
skfda/misc/covariances.py|872 col 1| W293 blank line contains whitespace
skfda/misc/covariances.py|873 col 9| WPS428 Found statement that has no effect
skfda/misc/covariances.py|873 col 9| WPS462 Wrong multiline string usage

skfda/misc/covariances.py Outdated Show resolved Hide resolved
skfda/misc/covariances.py Outdated Show resolved Hide resolved
skfda/misc/covariances.py Outdated Show resolved Hide resolved
skfda/misc/covariances.py Outdated Show resolved Hide resolved
skfda/misc/covariances.py Outdated Show resolved Hide resolved
skfda/misc/covariances.py Outdated Show resolved Hide resolved
skfda/misc/covariances.py Outdated Show resolved Hide resolved
skfda/misc/covariances.py Outdated Show resolved Hide resolved
skfda/misc/covariances.py Outdated Show resolved Hide resolved
skfda/misc/covariances.py Outdated Show resolved Hide resolved
Copy link
Member

@vnmabus vnmabus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have changed spacing in all files. Please, make sure that your IDE is using Unix end lines (LF) instead of Windows ones (CRLF), so that only the lines with ACTUAL changes show in the diff.

skfda/misc/covariances.py Outdated Show resolved Hide resolved
skfda/misc/covariances.py Outdated Show resolved Hide resolved
skfda/misc/covariances.py Show resolved Hide resolved
skfda/misc/covariances.py Show resolved Hide resolved
skfda/misc/covariances.py Show resolved Hide resolved
skfda/misc/covariances.py Show resolved Hide resolved
skfda/misc/covariances.py Show resolved Hide resolved
skfda/misc/covariances.py Show resolved Hide resolved
skfda/misc/covariances.py Show resolved Hide resolved
skfda/misc/covariances.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

Attention: Patch coverage is 96.66667% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 86.65%. Comparing base (1ddad0e) to head (2f99345).

Files Patch % Lines
skfda/misc/covariances.py 91.48% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #601      +/-   ##
===========================================
- Coverage    86.65%   86.65%   -0.01%     
===========================================
  Files          156      156              
  Lines        13314    13356      +42     
===========================================
+ Hits         11537    11573      +36     
- Misses        1777     1783       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@vnmabus vnmabus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes. Take a look also to the style.

skfda/misc/covariances.py Outdated Show resolved Hide resolved
skfda/misc/covariances.py Outdated Show resolved Hide resolved
skfda/misc/covariances.py Outdated Show resolved Hide resolved
skfda/misc/covariances.py Outdated Show resolved Hide resolved
skfda/misc/covariances.py Outdated Show resolved Hide resolved
skfda/misc/covariances.py Show resolved Hide resolved
skfda/tests/test_covariances.py Outdated Show resolved Hide resolved
fd = fetch_functional_data
cov_kernel = covariances_raise_fixture

np.testing.assert_raises(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was meant to be used as a context manager (in a with statement).

skfda/tests/test_covariances.py Outdated Show resolved Hide resolved
skfda/tests/test_covariances.py Outdated Show resolved Hide resolved
@vnmabus
Copy link
Member

vnmabus commented Jun 30, 2024

What is the status of this (and subsequent) PRs? Do you have time to take a look at my comments now, @E105D104U125, so that we can move forward and merge this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants