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

Reducing H_1 #44

Closed
wants to merge 1 commit into from
Closed

Reducing H_1 #44

wants to merge 1 commit into from

Conversation

selting
Copy link

@selting selting commented Jan 28, 2022

The docstring of generate_rules_apriori says:

The algorithm is based on the observation that for {a, b} -> {c, d} to
hold, both {a, b, c} -> {d} and {a, b, d} -> {c} must hold, since in
general conf( {a, b, c} -> {d} ) >= conf( {a, b} -> {c, d} ).
In other words, if either of the two one-consequent rules do not hold, then
there is no need to ever consider the two-consequent rule.

But in H_1, items are never removed if they produced a low confidence rule. This has been fixed.

NOTE: One test fails and I did not have the time to investigate exactly why:
test_generate_rules_apriori_large:
Expected :5387
Actual :5382

This must be cleared before accepting the request

@tommyod
Copy link
Owner

tommyod commented Jan 28, 2022

Since test_generate_rules_apriori_large fails, this PR changes the output of the algorithm under some inputs. Do you have a minimal example of where the current algorithm produces the wrong answer, but the PR produces the correct answer?

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.

None yet

2 participants