Skip to content

Fix inefficient spatial covariance calculation in emulator and add tests#3969

Open
man080107 wants to merge 1 commit into
PecanProject:developfrom
man080107:fix/emulator-spatial-cov
Open

Fix inefficient spatial covariance calculation in emulator and add tests#3969
man080107 wants to merge 1 commit into
PecanProject:developfrom
man080107:fix/emulator-spatial-cov

Conversation

@man080107
Copy link
Copy Markdown
Contributor

Description

Motivation and Context

Review Time Estimate

  • Immediately
  • Within one week
  • When possible

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • My name is in the list of CITATION.cff
  • I agree that PEcAn Project may distribute my contribution under any or all of
    • the same license as the existing code,
    • and/or the BSD 3-clause license.
  • I have updated the CHANGELOG.md.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

expect_true(is.matrix(res))
expect_equal(dim(res), c(2, 2))

expected <- tau * exp(-psi * d)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Having the expected value come from the exact same calculation isn't a strong test that the calculation is correct. Would be better to store what the expected cov matrix should be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants