Skip to content

New Forbidden Clauses and Relations#409

Merged
mfeurer merged 21 commits intomainfrom
new-forbidden-clauses
Sep 5, 2025
Merged

New Forbidden Clauses and Relations#409
mfeurer merged 21 commits intomainfrom
new-forbidden-clauses

Conversation

@thijssnelleman
Copy link
Collaborator

@thijssnelleman thijssnelleman commented Jul 22, 2025

Closes #402

  • Added several new forbidden relationships such as Greater Than (equal), Less Than (equal)
  • Added them as clauses as well
  • Added forbidden or clause
  • Added tests for each in test_forbidden.py

@thijssnelleman thijssnelleman requested a review from mfeurer July 22, 2025 08:59
Copy link
Contributor

@mfeurer mfeurer left a comment

Choose a reason for hiding this comment

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

This looks good so far, I have a few comments and suggestions. I added them only for one of the classes, but please apply them to all of the classes.

assert forb1.is_forbidden_vector(np.array([1.0, np.nan]))


def test_forbidden_greater_than_clause():
Copy link
Contributor

Choose a reason for hiding this comment

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

This test is too long. Could you please split it up in shorter tests, one for each type that the clause is tested on?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is already separated, one for greater_than and one for greater_than_equals. Is there another split I can do to make the tests smaller?

Copy link
Contributor

Choose a reason for hiding this comment

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

Separate the tests into the cross-product of clause type and hyperparameter type?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Parametrised the test now with hyper parameter and values to make it a lot shorter

Copy link
Contributor

Choose a reason for hiding this comment

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

That looks good. If you now could also parametrize the other clauses and relations, we can go ahead and merge this one.

@mfeurer mfeurer merged commit 7051d25 into main Sep 5, 2025
20 checks passed
@mfeurer mfeurer deleted the new-forbidden-clauses branch September 5, 2025 15:10
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.

Adding more Conjuctions

2 participants