-
Notifications
You must be signed in to change notification settings - Fork 323
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
Trapping constraints #437
Closed
Closed
Trapping constraints #437
Commits on Dec 10, 2023
-
ENH: Add function to calculate number of polynomial features
This is much faster than fitting the features, and can be used by trapping to replace some constraint index calculations. Also: Add docstring/type annotations Rename a variable so it doesn't shadow newly-imported name
Configuration menu - View commit details
-
Copy full SHA for 7d4dd98 - Browse repository at this point
Copy the full SHA 7d4dd98View commit details -
ENH: add _make_constraints to TrappingSR3
There are several major differences from the version in example 8: * Coupled with PolynomialLibrary logic using PolynomialLibrary.powers_. Previously, this coupling was implicit and actually tied to the specific order in Example 8, not the order users would expect. * Instead of handling pre-flattened 2D array, constraints are built with target and feature axes separately, letting the caller handle formatting the constraints as "target" or "feature". This gives us flexibility to later clean up the constraint logic outside this function without needing to return here and removes the need for striding calculations like: n_tgts * (n_tgts + k - 1) + i + n_tgts * int(j * (2 * n_tgts - j - 3) / 2.0) Since constraints are built directly from the terms and exponents in the library, its much easier to read and debug the code. * Renamed "r" as "n_tgts", etc. Single-letter index variables are removed. When they occur in homogenous iterators, they are concatenated with what they're iterating (e.g. tgt_i, tgt_j) * Broke out the different kinds of constraints into helper functions to make it easier to test. This allows follow on work to auto-attach constraints to a problem.
Configuration menu - View commit details
-
Copy full SHA for 65304b2 - Browse repository at this point
Copy the full SHA 65304b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 018eb9a - Browse repository at this point
Copy the full SHA 018eb9aView commit details -
ENH: Allow all polynomial library library options in trapping
(other than degree, which has to be 2)
Configuration menu - View commit details
-
Copy full SHA for 0870f57 - Browse repository at this point
Copy the full SHA 0870f57View commit details
Commits on Jan 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e007247 - Browse repository at this point
Copy the full SHA e007247View commit details
Commits on Jan 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f53151a - Browse repository at this point
Copy the full SHA f53151aView commit details
Commits on Jan 16, 2024
-
Configuration menu - View commit details
-
Copy full SHA for dd501a8 - Browse repository at this point
Copy the full SHA dd501a8View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.