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

For term tuple 2 2 1 more rules than necessary are generated for some feature operator pairs #19

Open
AniekMarkus opened this issue Jul 2, 2024 · 2 comments

Comments

@AniekMarkus
Copy link
Contributor

AniekMarkus commented Jul 2, 2024

For the following example, rules with X can be skipped as they can be shortened (and are then already covered by term tuple 2 1) or are a permutation of another rule in the list:

2 = AND 3 = OR 2 = AND 3 = OR 4 =
Candidate model: '198124209' = 0 AND '316139209' = 0 OR '198124209' = 0 AND '316139209' = 0 OR '316139210' = 0 X
Candidate model: '198124209' = 0 AND '316139209' = 0 OR '198124209' = 0 AND '316139209' = 0 OR '316139210' = 1 X
Candidate model: '198124209' = 0 AND '316139209' = 0 OR '198124209' = 0 AND '316139209' = 1 OR '316139210' = 0
Candidate model: '198124209' = 0 AND '316139209' = 0 OR '198124209' = 0 AND '316139209' = 1 OR '316139210' = 1
Candidate model: '198124209' = 0 AND '316139209' = 0 OR '198124209' = 1 AND '316139209' = 0 OR '316139210' = 0
Candidate model: '198124209' = 0 AND '316139209' = 0 OR '198124209' = 1 AND '316139209' = 0 OR '316139210' = 1
Candidate model: '198124209' = 0 AND '316139209' = 0 OR '198124209' = 1 AND '316139209' = 1 OR '316139210' = 0
Candidate model: '198124209' = 0 AND '316139209' = 0 OR '198124209' = 1 AND '316139209' = 1 OR '316139210' = 1
Candidate model: '198124209' = 0 AND '316139209' = 1 OR '198124209' = 0 AND '316139209' = 0 OR '316139210' = 0 X
Candidate model: '198124209' = 0 AND '316139209' = 1 OR '198124209' = 0 AND '316139209' = 0 OR '316139210' = 1 X
Candidate model: '198124209' = 0 AND '316139209' = 1 OR '198124209' = 0 AND '316139209' = 1 OR '316139210' = 0 X
Candidate model: '198124209' = 0 AND '316139209' = 1 OR '198124209' = 0 AND '316139209' = 1 OR '316139210' = 1 X
Candidate model: '198124209' = 0 AND '316139209' = 1 OR '198124209' = 1 AND '316139209' = 0 OR '316139210' = 0
Candidate model: '198124209' = 0 AND '316139209' = 1 OR '198124209' = 1 AND '316139209' = 0 OR '316139210' = 1
Candidate model: '198124209' = 0 AND '316139209' = 1 OR '198124209' = 1 AND '316139209' = 1 OR '316139210' = 0
Candidate model: '198124209' = 0 AND '316139209' = 1 OR '198124209' = 1 AND '316139209' = 1 OR '316139210' = 1
Candidate model: '198124209' = 1 AND '316139209' = 0 OR '198124209' = 0 AND '316139209' = 0 OR '316139210' = 0 X
Candidate model: '198124209' = 1 AND '316139209' = 0 OR '198124209' = 0 AND '316139209' = 0 OR '316139210' = 1 X
Candidate model: '198124209' = 1 AND '316139209' = 0 OR '198124209' = 0 AND '316139209' = 1 OR '316139210' = 0 X Candidate model: '198124209' = 1 AND '316139209' = 0 OR '198124209' = 0 AND '316139209' = 1 OR '316139210' = 1 X
Candidate model: '198124209' = 1 AND '316139209' = 0 OR '198124209' = 1 AND '316139209' = 0 OR '316139210' = 0 X
Candidate model: '198124209' = 1 AND '316139209' = 0 OR '198124209' = 1 AND '316139209' = 0 OR '316139210' = 1 X
Candidate model: '198124209' = 1 AND '316139209' = 0 OR '198124209' = 1 AND '316139209' = 1 OR '316139210' = 0
Candidate model: '198124209' = 1 AND '316139209' = 0 OR '198124209' = 1 AND '316139209' = 1 OR '316139210' = 1
Candidate model: '198124209' = 1 AND '316139209' = 1 OR '198124209' = 0 AND '316139209' = 0 OR '316139210' = 0 X
Candidate model: '198124209' = 1 AND '316139209' = 1 OR '198124209' = 0 AND '316139209' = 0 OR '316139210' = 1 X
Candidate model: '198124209' = 1 AND '316139209' = 1 OR '198124209' = 0 AND '316139209' = 1 OR '316139210' = 0 X
Candidate model: '198124209' = 1 AND '316139209' = 1 OR '198124209' = 0 AND '316139209' = 1 OR '316139210' = 1 X
Candidate model: '198124209' = 1 AND '316139209' = 1 OR '198124209' = 1 AND '316139209' = 0 OR '316139210' = 0 X
Candidate model: '198124209' = 1 AND '316139209' = 1 OR '198124209' = 1 AND '316139209' = 0 OR '316139210' = 1 X
Candidate model: '198124209' = 1 AND '316139209' = 1 OR '198124209' = 1 AND '316139209' = 1 OR '316139210' = 0 X
Candidate model: '198124209' = 1 AND '316139209' = 1 OR '198124209' = 1 AND '316139209' = 1 OR '316139210' = 1 X

This also occurs for shorter term tuples, e.g. term tuple 2 2.

@AniekMarkus AniekMarkus changed the title For term tuple 2 2 1 more rules than expected are generated for some feature operator pairs For term tuple 2 2 1 more rules than necessary are generated for some feature operator pairs Jul 2, 2024
@AniekMarkus
Copy link
Contributor Author

AniekMarkus commented Jul 2, 2024

When last feature is repeated this leads to a reduction from 32 -> 8 rules (but all redundant / removed during binary optimisation?):

2 = AND 3 = OR 2 = AND 3 = OR 2 = X
Candidate model: '198124209' = 1 AND '316139209' = 0 OR  '198124209' = 1 AND '316139209' = 0 OR  '198124209' = 0
Candidate model: '198124209' = 1 AND '316139209' = 0 OR  '198124209' = 0 AND '316139209' = 0 OR  '198124209' = 1 X
Candidate model: '198124209' = 1 AND '316139209' = 0 OR  '198124209' = 1 AND '316139209' = 1 OR  '198124209' = 0
Candidate model: '198124209' = 1 AND '316139209' = 0 OR  '198124209' = 0 AND '316139209' = 1 OR  '198124209' = 1 X
Candidate model: '198124209' = 1 AND '316139209' = 1 OR  '198124209' = 1 AND '316139209' = 0 OR  '198124209' = 0
Candidate model: '198124209' = 1 AND '316139209' = 1 OR  '198124209' = 0 AND '316139209' = 0 OR  '198124209' = 1 X
Candidate model: '198124209' = 1 AND '316139209' = 1 OR  '198124209' = 1 AND '316139209' = 1 OR  '198124209' = 0
Candidate model: '198124209' = 1 AND '316139209' = 1 OR  '198124209' = 0 AND '316139209' = 1 OR  '198124209' = 1 X
 
2 = AND 3 = OR 2 = AND 3 = OR 3 = X
Candidate model: '198124209' = 0 AND '316139209' = 1 OR  '198124209' = 0 AND '316139209' = 1 OR  '316139209' = 0
Candidate model: '198124209' = 0 AND '316139209' = 1 OR  '198124209' = 0 AND '316139209' = 0 OR  '316139209' = 1 X
Candidate model: '198124209' = 0 AND '316139209' = 1 OR  '198124209' = 1 AND '316139209' = 1 OR  '316139209' = 0
Candidate model: '198124209' = 0 AND '316139209' = 1 OR  '198124209' = 1 AND '316139209' = 0 OR  '316139209' = 1 X
Candidate model: '198124209' = 1 AND '316139209' = 1 OR  '198124209' = 0 AND '316139209' = 1 OR  '316139209' = 0
Candidate model: '198124209' = 1 AND '316139209' = 1 OR  '198124209' = 0 AND '316139209' = 0 OR  '316139209' = 1 X
Candidate model: '198124209' = 1 AND '316139209' = 1 OR  '198124209' = 1 AND '316139209' = 1 OR  '316139209' = 0
Candidate model: '198124209' = 1 AND '316139209' = 1 OR  '198124209' = 1 AND '316139209' = 0 OR  '316139209' = 1 X

2 = AND 3 = OR 2 = AND 4 = OR 2 =
Candidate model: '198124209' = 1 AND '316139209' = 0 OR '198124209' = 1 AND '316139210' = 0 OR '198124209' = 0
Candidate model: '198124209' = 1 AND '316139209' = 0 OR '198124209' = 0 AND '316139210' = 0 OR '198124209' = 1 X
Candidate model: '198124209' = 1 AND '316139209' = 0 OR '198124209' = 1 AND '316139210' = 1 OR '198124209' = 0
Candidate model: '198124209' = 1 AND '316139209' = 0 OR '198124209' = 0 AND '316139210' = 1 OR '198124209' = 1 X
Candidate model: '198124209' = 1 AND '316139209' = 1 OR '198124209' = 1 AND '316139210' = 0 OR '198124209' = 0
Candidate model: '198124209' = 1 AND '316139209' = 1 OR '198124209' = 0 AND '316139210' = 0 OR '198124209' = 1 X
Candidate model: '198124209' = 1 AND '316139209' = 1 OR '198124209' = 1 AND '316139210' = 1 OR '198124209' = 0
Candidate model: '198124209' = 1 AND '316139209' = 1 OR '198124209' = 0 AND '316139210' = 1 OR '198124209' = 1 X

When feature in term of size 1 = TRUE -> feature in term of size > 1 = FALSE
When feature in term of size 1 = FALSE -> feature in term of size > 1 = TRUE

This is correct in conjunction-1, but not in conjunction-2 (see bold cases).

This also occurs for other term tuples, e.g. term tuple 2 1 1: 2 = AND 3 = OR 2 = OR 3 =
Candidate model: '198124209' = 1 AND '316139209' = 1 OR '198124209' = 0 OR '316139209' = 0
Candidate model: '198124209' = 1 AND '316139209' = 1 OR '198124209' = 0 OR '316139209' = 1
Candidate model: '198124209' = 0 AND '316139209' = 1 OR '198124209' = 1 OR '316139209' = 0
Candidate model: '198124209' = 0 AND '316139209' = 1 OR '198124209' = 1 OR '316139209' = 1

@AniekMarkus
Copy link
Contributor Author

AniekMarkus commented Jul 2, 2024

2 = AND 3 = OR 2 = AND 3 = OR 2 =
Candidate model: '198124209' = 1 AND '316139209' = 0 OR '198124209' = 1 AND '316139209' = 0 OR '198124209' = 0 X
Candidate model: '198124209' = 0 AND '316139209' = 0 OR '198124209' = 0 AND '316139209' = 0 OR '198124209' = 1 X
Candidate model: '198124209' = 1 AND '316139209' = 0 OR '198124209' = 1 AND '316139209' = 1 OR '198124209' = 0
Candidate model: '198124209' = 0 AND '316139209' = 0 OR '198124209' = 0 AND '316139209' = 1 OR '198124209' = 1
Candidate model: '198124209' = 1 AND '316139209' = 1 OR '198124209' = 1 AND '316139209' = 0 OR '198124209' = 0 X
Candidate model: '198124209' = 0 AND '316139209' = 1 OR '198124209' = 0 AND '316139209' = 0 OR '198124209' = 1 X
Candidate model: '198124209' = 1 AND '316139209' = 1 OR '198124209' = 1 AND '316139209' = 1 OR '198124209' = 0 X
Candidate model: '198124209' = 0 AND '316139209' = 1 OR '198124209' = 0 AND '316139209' = 1 OR '198124209' = 1 X

Now same redundancy as for example 2 = AND 3 = OR 2 = AND 3 = OR 4 = on the top.

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

No branches or pull requests

1 participant