trace of quadratic form

27 views
Skip to first unread message

Bob Carpenter

unread,
Oct 9, 2013, 2:31:30 PM10/9/13
to stan...@googlegroups.com
Is there a reason to have this function signature:

real trace_quad_form(matrix m, vector v)

=def= trace(v' * m * v)

This looks like it'll define the same function as

real quad_form(matrix m, vector v)

=def= v' * m * v

So we're just going to scratch the signature for trace_quad_form.

(We're leaving trace_quad_form(matrix,matrix):real, of course.)

- Bob

Marcus Brubaker

unread,
Oct 9, 2013, 3:35:00 PM10/9/13
to stan...@googlegroups.com
I don't think there's a reason other than for completeness.




- Bob

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Bob Carpenter

unread,
Oct 9, 2013, 3:53:21 PM10/9/13
to stan...@googlegroups.com
Marcus --- are those tolerance parameters conjunctive or
disjunctive? That is do they all have to be satisfied, or
just one.

And am I understanding that if the init_alpha isn't set
well, the algorithm will adapt its own value?

- Bob

On 10/9/13 3:35 PM, Marcus Brubaker wrote:
> I don't think there's a reason other than for completeness.
>
>
> On Wed, Oct 9, 2013 at 2:31 PM, Bob Carpenter <ca...@alias-i.com <mailto:ca...@alias-i.com>> wrote:
>
> Is there a reason to have this function signature:
>
> real trace_quad_form(matrix m, vector v)
>
> =def= trace(v' * m * v)
>
> This looks like it'll define the same function as
>
> real quad_form(matrix m, vector v)
>
> =def= v' * m * v
>
> So we're just going to scratch the signature for trace_quad_form.
>
> (We're leaving trace_quad_form(matrix,matrix)__:real, of course.)
>
> - Bob
>
> --
> 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 <mailto:stan-dev%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/__groups/opt_out <https://groups.google.com/groups/opt_out>.
>
>
> --
> 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.

Marcus Brubaker

unread,
Oct 9, 2013, 4:36:01 PM10/9/13
to stan...@googlegroups.com
Just one of those conditions being satisfied will result in the algorithm terminating.

init_alpha has a default value (something like 0.0001) which is reasonable for many problems but might be too large or too small depending on the objective function and initialization.  Being too big or too small just means that the first iteration will take longer (require more gradient evaluations) before the line search finds a good step length.  It's not a critical parameter, but if you're optimizing the same model multiple times (as you tweak things or with different data) being able to change it can save some real time.

Cheers,
Marcus


To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
--
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.

Jiqiang Guo

unread,
Oct 12, 2013, 10:34:39 PM10/12/13
to stan...@googlegroups.com
What is exactly the default init_alpha now implemented in Stan?  It seems that it is doced as 0.001 (https://github.com/stan-dev/stan/blob/feature/issue-211-stan2-manual/src/docs/stan-reference/introduction.tex#L788).

--
Jiqiang 


To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.

Marcus Brubaker

unread,
Oct 13, 2013, 11:27:28 AM10/13/13
to stan...@googlegroups.com
Regarding the BFGS parameters, that doc should be accurate.

Cheers,
Marcus

Jiqiang Guo

unread,
Oct 13, 2013, 10:29:41 PM10/13/13
to stan...@googlegroups.com
Thanks.  I would change init_alpha from 0.0001 to 0.001 then in rstan. 

--
Jiqiang 
Reply all
Reply to author
Forward
0 new messages