Re: [stan-users] MStan?

33 views
Skip to first unread message

Bob Carpenter

unread,
Feb 17, 2014, 12:22:11 PM2/17/14
to stan...@googlegroups.com
[moved to stan-dev now that Aki has write permission]

I'm guessing you were passing it an incomplete csv file.

Daniel --- can we trap that behavior and give a simpler
message?

Aki --- do you have the CSV file that produced that error
so we can reproduce it?

- Bob

On 2/17/14, 3:18 PM, Aki Vehtari wrote:
> Hi,
> I finally had time to test MatlabStan. Sometimes print(fit) gives an error
> ---clip---
> print: lib/eigen_3.2.0/Eigen/src/Core/DenseCoeffsBase.h:173: Eigen::DenseCoeffsBase<Derived,
> 0>::CoeffReturnType Eigen::DenseCoeffsBase<Derived, 0>::operator()(Eigen::DenseCoeffsBase<Derived,
> 0>::Index) const [with Derived = Eigen::Matrix<Eigen::Matrix<double, -0x00000000000000001, 1>,
> -0x00000000000000001, 1>, Eigen::DenseCoeffsBase<Derived, 0>::CoeffReturnType = const
> Eigen::Matrix<double, -0x00000000000000001, 1>&, Eigen::DenseCoeffsBase<Derived, 0>::Index = long
> int]: Assertion `index >= 0 && index < size()' failed.
> Warning: non-fatal error reading adapation data
> Warning: non-fatal error reading samples
> Warning: non-fatal error reading adapation data
> Warning: non-fatal error reading samples
> Warning: non-fatal error reading adapation data
> Warning: non-fatal error reading samples
> Warning: non-fatal error reading adapation data
> Warning: non-fatal error reading samples
> ans =
> [1x92 char]
> [1x98 char]
> [1x94 char]
> [1x85 char]
> [1x97 char]
> 'int]: Assertion `index >= 0 && index < size()' failed.'
> ---clip---
> but retrying gives sensible result. I guess it's possible that Stan was still writing logs, but MatlabStan does not
> realize it and gives strange error...
>
> Aki
>
>
> maanantai, 13. tammikuuta 2014 18.00.44 UTC+2 Brian Lau kirjoitti:
>
> Testing would be great! Some basic docs are up:
>
> https://github.com/brian-lau/MatlabStan/wiki <https://github.com/brian-lau/MatlabStan/wiki>
>
> And things are updated to work with Stan 2.1.0.
>
> -b
>
> On Sunday, January 12, 2014 12:40:06 PM UTC+1, Aki Vehtari wrote:
>
> Joachim and Brian,
>
> Great! I can help you with testing (Linux).
>
> Aki
>
> lauantai, 11. tammikuuta 2014 14.21.34 UTC+2 Brian Lau kirjoitti:
>
> I've got a process-level wrapper here:
>
> https://github.com/brian-lau/MatlabStan <https://github.com/brian-lau/MatlabStan>
>
> I'll get some better docs up in the next week, although some effort went into following Pystan/Rstan
> conventions, so some of those docs could be useful.
>
> Joachim, maybe it's worth merging?
>
> -b
>
> On Friday, January 10, 2014 11:20:01 AM UTC+1, Bob Carpenter wrote:
>
>
>
> On 1/10/14, 9:54 AM, Aki Vehtari wrote:
> > Hi,
> >
> > Do you have any useful estimate when MStan (Matlab/Octave interface) might be available?
>
> When we find a volunteer who knows MATLAB and wants to do it :-)
>
> > Or how should I proceed if I would like to help implement that?
>
> There are two ways to create an interface.
>
> 1. Process-level wrapper
> Just write code in MATLAB to dump the data in a format we can read,
> call Stan in a separate process(es) to write samples out, then write
> code to read back in the results into MATLAB and ideally do some posterior
> analysis.
>
> 2. In-memory wrapper
> This is what we've done for PyStan and RStan. It's a lot more work,
> but potentially much faster and definitely more flexible (e.g., it
> makes it easy to expose the log prob functions and gradients/Hessians.
> MATLAB has a package (whose name I forget) that makes that possible.
>
> One of the things we're going to try to do over the next 12 months
> is clean up the underlying C++ code to make approach (2) easier
> and more consistent across our interfaces. Right now, everything
> that's in stan/gm/command.hpp needs to be reimplemented in each
> interface.
>
> - Bob
>
>
> --
> You received this message because you are subscribed to the Google Groups "stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Aki Vehtari

unread,
Feb 21, 2014, 9:11:02 AM2/21/14
to stan...@googlegroups.com
Brian Lau wrote in stan-users
> Yup, the print method calls down to Stan's print, and it looks like
> there's no check to see if Stan finished. I'll make sure this is the
> problem, and fix it this week.

And I think this the problem, not the csv. The problem goes away by waiting a bit and then trying ago. It was just unexpected that print gave error while extract tells that Stan has not yet finished.

Aki

Reply all
Reply to author
Forward
0 new messages