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

Undefined function or variable 'neff'. in diag/psrf.m #54

Open
YuHsiangLo opened this issue Feb 20, 2021 · 4 comments
Open

Undefined function or variable 'neff'. in diag/psrf.m #54

YuHsiangLo opened this issue Feb 20, 2021 · 4 comments
Assignees

Comments

@YuHsiangLo
Copy link

Hi,

I got the following error while running the test code from LonGP:

>> lonGP('./test/output',1)
processing target 1: y.

in conStep1

Selecting 0th continuous variable.
toSelVarInds: 1
Resuming from rep=1 mcmc_round=4.
Undefined function or variable 'neff'.

Error in psrf (line 108)
neff=min(neff,N*M);

Error in runMCMC (line 97)
    R = psrf(thetaArr{:});

Error in runMcmcInfer (line 26)
    [R, rfull, flag] = runMCMC(gp,xmn,ymn,nRep,tmpresfile);

Error in conStep1 (line 44)
    runMcmcInfer(currVarFlagArr, 1);

Error in lonGP (line 173)
        currNextFun(currNextArg{:});

I think this was caused by the last line neff=min(neff,N*M); being outside the function definition in diag/psrf.m. I was running the code on MATLAB R2019a with macOS 10.15.7, using the gpstuff dev branch. Could you look into this? Thanks a lot!

@jpvanhat
Copy link
Contributor

jpvanhat commented Mar 8, 2021

Hi,
The problem seems to be in the LonGP function that calls GPstuff function. Hence, maybe @avehtari can direct this issue to someone in LonGP team.

-Jarno

@avehtari
Copy link
Contributor

avehtari commented Mar 8, 2021

I emailed Lu Cheng

@chengl7
Copy link

chengl7 commented Mar 11, 2021

Hi YuHsiangLo,

Sorry for the long delay.

The problem is that the code needs to use 'SuiteSparse' in GPstuff to make inferences. There are two solutions.

  1. use the file "LonGP/util/gpcf_cat.m.bak" to replace the file "gpstuff/gp/gpcf_cat.m"
  2. install 'SuiteSparse', check the installation manual of GPstuff

Cheers,
Lu

Hi,

I got the following error while running the test code from LonGP:

>> lonGP('./test/output',1)
processing target 1: y.

in conStep1

Selecting 0th continuous variable.
toSelVarInds: 1
Resuming from rep=1 mcmc_round=4.
Undefined function or variable 'neff'.

Error in psrf (line 108)
neff=min(neff,N*M);

Error in runMCMC (line 97)
    R = psrf(thetaArr{:});

Error in runMcmcInfer (line 26)
    [R, rfull, flag] = runMCMC(gp,xmn,ymn,nRep,tmpresfile);

Error in conStep1 (line 44)
    runMcmcInfer(currVarFlagArr, 1);

Error in lonGP (line 173)
        currNextFun(currNextArg{:});

I think this was caused by the last line neff=min(neff,N*M); being outside the function definition in diag/psrf.m. I was running the code on MATLAB R2019a with macOS 10.15.7, using the gpstuff dev branch. Could you look into this? Thanks a lot!

@jpvanhat
Copy link
Contributor

jpvanhat commented Apr 6, 2021

Hi @YuHsiangLo . Did the above answer solve your problem and can we close this issue?

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

4 participants