* vertical bar with lcdfs, lccdfs, and ldiff_cdfs?
* allow access to target as a value?
* allow access to target as a value?I vote only in print statements, although I’d be fine with no.
After reading the summary this makes sense to me.
> All existing functionality still supported, but deprecated. If we get
> it in before Stan 3, we could just pull it out from under people in
> Stan 3, or we could wait a year. The downside is all the material written
> using our existing notation; the risk is that people will keep using
> the existing notation, even if we deprecate it.
>
> There are still a couple issues to resolve:
>
> * vertical bar with lcdfs, lccdfs, and ldiff_cdfs?
Yes
> * allow access to target as a value?
Yes for print statements, no for anything else? The whole benefit of only allowing += is that
it's something you build up.
> * allow vectors on RHS of += the way we do with increment_log_prob()?
Seems confusing to me, I'd prefer no unless it would be a performance consideration for some reason?
Don't know about general judgement but I use enough different tools that having _lp but _lcdf or some other similar combination would force me to go to docs every time I need to write Stan code. Whatever it is I'd prefer consistent.
I'm curious to see what users' reactions will be when we change assignment from "<-" to "=" given that the majority of users seem to use the RStan interface and are used to "<-". Personally, I'm fine with making that change, as it brings Stan more in line with the overwhelming majority of programming languages, but I do think there is something nice about using "<-" for assignment, as "=" already has other uses unrelated to assignment.
--
You received this message because you are subscribed to a topic in the Google Groups "stan development mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-dev/325D3xsaI08/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-dev+u...@googlegroups.com.
@ 42;
target += 42;
--
You received this message because you are subscribed to a topic in the Google Groups "stan development mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-dev/325D3xsaI08/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-dev+u...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "stan development mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-dev/325D3xsaI08/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-dev+u...@googlegroups.com.
2) users are still jamming everything in strings without any care to indentation
--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
> On Jan 22, 2016, at 4:20 PM, Daniel Lee <bea...@alum.mit.edu> wrote:
>
> There's been a lot of discussion. Here's where I stand:
>
> Proposed suffixes:
> - I'd prefer if the pdfs on the log scale were left without a suffix, but I think I'm the only one. I was thinking about treating lpdfs / lpmfs as first class objects that are always on the log scale. Yes, it doesn't run parallel with cdfs, but I was thinking about the most common use case and how Stan programs look. I'm assuming this idea won't be supported by anyone else and this will be the last I bring it up, unless someone else supports it.
I'm pretty sure that's also what Andrew wants. I'm leaning
toward just being more explicit and consistent.
It's easier to write and easier to read as normal() when you
understand Stan, but harder to learn in a way that
supports what Stan actually does.
> - log pdf / pmf: I prefer _lp, but would be ok with _lpdf. Although I understand Michael's point about forcing the user to think about pdf vs pmf, I think it's going to cause confusion and slow down the process.
This is the biggest drawback to "_pdf" --- I don't
like having to distinguish. Especially since the two
options don't even partition the probability functions.
What we're really defnining as a model with a Stan
program is often the joint density of a combination of
discrete and continuous variables.
I prefer nothing to "_lp". I don't think "_lp" conveys
enough and it lacks parallelism with "_cdf" and "_rng".
> Vertical bar notation:
> - yes. I don't know what to do with user-defined multivariate distributions, but we can figure that out later.
I'm also on the fence on this one. I don't think user-defined
or developer-defined multivariates will be a major. We can
change the way the function's defined to match, for example.
real my_distribution_pdf(y | foo, bar) {
...
}
> Normalization control:
> - I prefer having "<norm>" and "". It saves space. I see the point about not being the best decision for adding other control, but it's either normalized or not.
> - default: unnormalized. For speed.
I like this, too. I think the idea is that <norm> will force
normalization and leaving it blank will leave in the template
parameter. So we could control from the outside and still norm
everything. I don't think there's ever a case where the user
needs the unnormalized form.
> Increment log density statement:
> - one more vote for "target +="
> - one downvote for @. Looks too much like an attribute to me.
> - I want something on the left size. target seems right. Second choice: model.
Models are joint densities in my mind, so using "model" here
seems like a type error.
What we're really defnining as a model with a Stan
program is often the joint density of a combination of
discrete and continuous variables.
+1. I'm now just for having "target" on the lhs. I do not want "" (nothing) on the lhs. I also do not want "model" on the lhs.
“target distribution” is the MCMC equivalent of “objective function” in optimization.In Bayesian inference the target distribution is the posterior, although Stan istechnically more general than that. I’m not sure what you mean by the posteriornot being the thing that is being incremented — at any point if we stopped thenthe current state of the LHS would be the target distribution.
normal_lpdf(y | mu, sigma);
target += normal_lpdf(y | mu, sigma);
Well “target distribution” is standard MCMC terminology andwe can emphasize that in the doc. Besides, we never actuallyadd a number of the LHS — we’re always aggregating a function.
On Jan 22, 2016, at 10:18 PM, Ben Goodrich <goodri...@gmail.com> wrote:
On Friday, January 22, 2016 at 4:59:18 PM UTC-5, Michael Betancourt wrote:“target distribution” is the MCMC equivalent of “objective function” in optimization.In Bayesian inference the target distribution is the posterior, although Stan istechnically more general than that. I’m not sure what you mean by the posteriornot being the thing that is being incremented — at any point if we stopped thenthe current state of the LHS would be the target distribution.
Yes, it's the posterior distribution being targeted by MCMC but ifnormal_lpdf(y | mu, sigma);
evaluates to some number like 0.12345 it is not as iftarget += normal_lpdf(y | mu, sigma);
means something like "increase the posterior distribution by 0.12345". It means "increase the value of the log of the numerator in Bayes' theorem by 0.12345".
When maximizing, it is reasonably clear that the goal is to choose the values of the parameters to make the objective function as large as possible. I think "target" would be perceived by users as implying "I am adding 0.12345 to something in order to make it closer to its target".
Ben--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
Fair point — in fact I think that’s why I originally suggested a stream.But I don’t think there’s any way to discriminate between addingfunctions and adding values so it may have to be something thatwe tackle with detailed doc.
You received this message because you are subscribed to a topic in the Google Groups "stan development mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-dev/325D3xsaI08/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-dev+u...@googlegroups.com.
Are you agreeing with Andrew, normal_lp() for log pdf/pmf and
normal_cdf_lp() for log CDF?
That's back to where we started with "lp" in place of "log",
which just feels more obscure.
Yes I think _lp should appended, so normal_lp() and normal_cdf_lp(). Levels of detail:
Aki