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

Adding ability to define test space through convex hull #18

Merged
merged 18 commits into from
Nov 13, 2024
Merged

Conversation

andersonw1
Copy link
Collaborator

@andersonw1 andersonw1 commented Nov 7, 2024

This PR adds two things:

  1. We introduce the ability to define training points on the exterior some region of interest. To define the testing points, we first form a uniform grid over the training parameters and then remove all testing points which are not in the convex hull of the training parameters.
    This adds the new 'exterior' option for the test_space_type and requires that all of the training points are given as lists. This is useful if we are not interested in sampling from a rectangular grid, and instead have a specific region of interest for the problem. The post-processing files need to be changed.

  2. We now track the training loss and each term of the loss function. These losses are saved with the final output file after training.

@andersonw1 andersonw1 changed the title Adding ability to define testing space through convex hull Adding ability to define test space through convex hull Nov 8, 2024
@andersonw1 andersonw1 marked this pull request as ready for review November 8, 2024 17:14
@andersonw1 andersonw1 added enhancement New feature or request RFR Ready for Review labels Nov 8, 2024
Copy link
Collaborator

@dreamer2368 dreamer2368 left a comment

Choose a reason for hiding this comment

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

@andersonw1 , most of them look good to me, except the use of getParam1DSpace. I think we can simply use the existing getParam1DSpace functions, not creating a new one. I left some comments in details related to that.

src/lasdi/gplasdi.py Show resolved Hide resolved
examples/burgers1d.yml Outdated Show resolved Hide resolved
src/lasdi/param.py Outdated Show resolved Hide resolved
src/lasdi/param.py Outdated Show resolved Hide resolved
src/lasdi/param.py Show resolved Hide resolved
src/lasdi/param.py Outdated Show resolved Hide resolved
src/lasdi/param.py Outdated Show resolved Hide resolved
src/lasdi/param.py Show resolved Hide resolved
src/lasdi/param.py Outdated Show resolved Hide resolved
src/lasdi/param.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@dreamer2368 dreamer2368 left a comment

Choose a reason for hiding this comment

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

Everything looks good to me. I left a minor comment on type specification for gridSizes.


Returns
-------
gridSizes : :obj:`list(Nx)`
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we use list(int) instead of list(Nx)?


Returns
-------
gridSizes : :obj:`list(Nx)`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above, can we use list(int) instead of list(Nx)?

@andersonw1 andersonw1 merged commit 49fe119 into main Nov 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request RFR Ready for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants