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

Feature/pc2 #229

Merged
merged 9 commits into from
Nov 20, 2023
Merged

Feature/pc2 #229

merged 9 commits into from
Nov 20, 2023

Conversation

NovakLBUT
Copy link
Contributor

[Physics-informed Polynomial Chaos Expansion]

Added new feature entitled Physics-informed Polynomial Chaos Expansion constrained to adhere to the known physics of the model, combines the conventional experimental design with additional constraints from the physics of the model. The constraints are represented by set of differential equations and specified boundary conditions.

Description

Polynomial Chaos Expansion module now contains additional branch Physics-informed Polynomial Chaos Expansion containing 4 new classes: PdeData, PdePCE, ConstrainedPCE and ReducedPCE . Its application is presented in two new examples for pce.

How Has This Been Tested?

New unit test was added, code coverage is 92%.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

Go over all the following points, and put an x in all the boxes that apply.
If you're unsure about any of these, don't hesitate to ask. We're here to help!

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • 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.

@NovakLBUT NovakLBUT requested a review from dimtsap November 16, 2023 20:52
@connor-krill connor-krill self-requested a review November 17, 2023 17:48
err_complete = (err_data + err_pde + err_bc)
return err_complete

def lar(self, n_PI=50, virtual_niters=False, max_niter=None, no_iter=False, minsize_basis=1, nvirtual=None,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this one of the already implemented regression methods.? Is there is a need to duplicate it here.?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, this is a specific method only for physics-informed PCE. Although it use theory of Least Angle Regression, it adds additional equations describing physics in form of Karush-Kuhn-Tucker normal equations. I do not see any simple way how to use existing LAR instead of this new method.

self.lar_error = best_err
self.lar_error_path = lar_error

def ols(self, pce=None, nvirtual=None, calc_coeff=True, return_coeff=True, n_PI=100):
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this least squares regression as already implemented in Least Squares Regression? Is there a need to recreate this function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, this is a specific method only for physics-informed PCE. I do not see any simple way how to use the existing OLS instead of this new method.

@NovakLBUT NovakLBUT requested a review from dimtsap November 19, 2023 19:53
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 16 Code Smells

93.9% 93.9% Coverage
0.0% 0.0% Duplication

@dimtsap dimtsap merged commit a7f6dca into Development Nov 20, 2023
4 checks passed
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.

3 participants