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

gfci.discrete null pointer exception error #36

Open
kingfish777 opened this issue Feb 28, 2017 · 11 comments
Open

gfci.discrete null pointer exception error #36

kingfish777 opened this issue Feb 28, 2017 · 11 comments

Comments

@kingfish777
Copy link

When I

a <- c(1,1,1,0,0,0)
b <- c(1,1,0,1,1,0)
df <- data.frame(cbind(a,b))

gfci.discrete(df)

I get the following:

Graph Parameters:
structurePrior =  1 
samplePrior =  1 
maxDegree =  3 
maxPathLength =  -1 
significance =  0.05 
completeRuleSetUsed =  FALSE 
faithfulnessAssumed =  TRUE 
verbose =  FALSE 
Error in .jcall(gfci_instance, "Ledu/cmu/tetrad/graph/Graph;", "search") : 
  java.lang.NullPointerException
@jdramsey
Copy link
Contributor

jdramsey commented Mar 8, 2017

I did see this, but I'm not sure how to answer yet. Is the issue that if you have a and b with those 7 discrete values you get a null pointer? I guess I could try to build that case in Java...

@kingfish777
Copy link
Author

dat.txt
fake data attached, same as r-causal for this issue.
GFCI in tetrad-gui says "Data Set must be either discrete or continuous", even after I discretize.
I tried taking out the penalty discount (only for continuous) and messing with a few other params, but still get that message. I'd suggest recreating issue as you suggested directly in Java API. (I would but I am busy with possible AMIA paper).
As an aside, I think that there ought to be a way to pick between GFCI.discrete and regular continuous GFCI in the GUI. But I usually do not use the GUI, except for initial experimentation / trying out unfamiliar features.

@jdramsey
Copy link
Contributor

GFCI in the current interface (GUI) handles this OK. I'm taking it this has been fixed. Reopen if not true.

@kingfish777
Copy link
Author

kingfish777 commented Jun 11, 2017

Still seeing the null pointer exception error:

> dat
  a b c d
 1 0 1 0
 1 0 0 1
 1 0 1 0
 0 1 0 1
 0 1 1 0
 0 1 0 0

...

Error in .jcall(gfci_instance, "Ledu/cmu/tetrad/graph/Graph;", "search") : 
  java.lang.NullPointerException

@jdramsey
Copy link
Contributor

jdramsey commented Jun 11, 2017 via email

@jdramsey
Copy link
Contributor

jdramsey commented Jun 11, 2017 via email

@kingfish777
Copy link
Author

kingfish777 commented Jun 12, 2017 via email

@jdramsey
Copy link
Contributor

jdramsey commented Jun 12, 2017 via email

@kingfish777
Copy link
Author

kingfish777 commented Jun 12, 2017 via email

@chirayukong
Copy link
Collaborator

It seems to be a problem when the search result got no edges. It doesn't get the null exception when I run it on PyThon. It might have a problem with the rJava library. Let me check.

@kingfish777
Copy link
Author

New and improved fake data attached.
dat.txt

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

3 participants