-
Notifications
You must be signed in to change notification settings - Fork 2k
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
h2o.interaction doesn't output the desired outcomes #7434
Comments
Arun Aryasomayajula commented: [~accountid:5db1981f654fb20d96acbd52] will take a look. |
Arun Aryasomayajula commented: Hi [~accountid:5db1981f654fb20d96acbd52] any updates on this? |
Zuzana Olajcová commented: Hi [~accountid:5fa438f822f3990076aa232d], I am able to reproduce the issue but I don’t have a fix yet and need to carefully analyse. Currently I am at vacation until 20th of July, after that I will continue with this JIRA. |
Zuzana Olajcová commented: Resolved in 76b73de |
JIRA Issue Details Jira Issue: PUBDEV-8218 |
Linked PRs from JIRA |
We have had some issues with running h2o.interaction() in R recently that it either produces incorrect results or runs into errors. I have spent quite some time looking into it but cannot figure out why. I have attached some reproducible examples below. Could you help me take a look what is happening here?
interaction term created has incorrect values -------------------------
df = data.frame(
v1 = c('Y', 'Y', 'Y', 'N', 'N'),
v2 = c('S', 'S', 'S', 'A', 'A'),
v3 = c('E1', 'E1', 'E1', 'B1', 'B1')
)
df.hex = as.h2o(df, 'dfhex')
interaction = h2o.interaction(
data = df.hex,
destination_frame = 'interaction',
factors = c('v2','v3', 'v1'),
pairwise = F,
max_factors = 1000,
min_occurrence = 1
)
combined = h2o.cbind(df.hex, interaction)
combined
As can be seen, the values of all three columns used in the interaction have changed.
v1 v2 v3 v2_v3_v1
1 Y S E1 S_E1_N
2 Y S E1 S_E1_N
3 Y S E1 S_E1_N
4 N A B1 S_E1_Y
5 N A B1 S_E1_Y
Error when creating interaction for data with more than 5 rows ---------
df = data.frame(
v1 = c('Y', 'Y', 'Y', 'N', 'N', 'Y'),
v2 = c('S', 'S', 'S', 'A', 'A', 'N'),
v3 = c('E1', 'E1', 'E1', 'B1', 'B1', 'B1')
)
df.hex = as.h2o(df, 'dfhex')
Error in creating interaction for data with more than 5 rows
h2o.interaction(
data = df.hex,
destination_frame = 'interaction',
factors = c('v2','v3', 'v1'),
pairwise = F,
max_factors = 1000,
min_occurrence = 1
)
ERROR MESSAGE BELOW:
java.lang.ArrayIndexOutOfBoundsException: 2
java.lang.ArrayIndexOutOfBoundsException: 2
at water.fvec.CreateInteractions.makeDomain(CreateInteractions.java:85)
at water.fvec.CreateInteractions.compute2(CreateInteractions.java:171)
at water.H2O$H2OCountedCompleter.compute(H2O.java:1557)
at jsr166y.CountedCompleter.exec(CountedCompleter.java:468)
at jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:263)
at jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:974)
at jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1477)
at jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
Error: java.lang.ArrayIndexOutOfBoundsException: 2
But no errors if the order of the interaction is in this way
h2o.interaction(
data = df.hex,
destination_frame = 'interaction',
factors = c('v1','v2', 'v3'),
pairwise = F,
max_factors = 1000,
min_occurrence = 1
)
The text was updated successfully, but these errors were encountered: