Boost logo

Boost :

From: Jesse Perla (jlp400_at_[hidden])
Date: 2008-08-13 09:12:44

> >Docs here:
> >
> >Note that these are considered "experimental" in the sense that their
> >interfaces haven't been reviewed for formal inclusion in Boost. They are
> >all rigorously tested though as they're fundamental to the implementation
> of
> >the rest of the library. So... please do use them, and if you find any
> >interface SNAFU's that can be improved let us know! BTW the most likely
> >reason for the interfaces to change is to facilitate improvements to their
> >implementation and especially their efficiency.
> >
> >HTH, John.

(sorry John, I sent my last email before getting the digest)
Perfect. Since a snapshot of the interfaces exists for 1.35, then a port
over to newer versions of boost is reasonable. Hopefully we can turn this
into a top level project that does the baseline optimization/root finding
people need before shopping for really specific tools/algorithms.
A couple of other questions on this beautiful distributions library - which
I see as a great starting point for a lot of operations treating them as
* Is there any planned or existing support in the library for
multi-dimensional distributions? In particular, bivariate norms with a
covariance matrix passed in? Will the library design and notation support
these sorts of extensions without too many problems?
* Is there any way in the current library to pass in a user created discrete
valued probability measure and have it as a "distribution" here? If not, I
think I may write it, but as I am not a very good library programmer I would
love to exploit any other work out there. I would need this to work for at
least 1 and 2 dimension measures.
  * If we were to use a function to bundle a discrete valued function, is
there a nice class/pattern out there that already combines the x-values and
y-values into a single class? (I also want this later for implementing
different interpolation algorithms returning functors after passing in a
discrete function in the constructor).
* Then I would write a specialization of this (2nd and higher dimension) for
a markov measure.
* Then, I want to write a general operator for unconditional expectation
passing in a function object, and over a generic distribution as a measure
from this library (though I will use it for the discrete measures to begin
with). Specializing for different types of distributions, this could use
exact analytical calculations, quadrature, or use monte-carlo methods.
* Last, I want to write a conditional expectation operator that takes in a
function object mapping reals^2 to reals, a distribution (would have to be 2
dimensional), the conditional (which would be a real for now, but could be
generic), and what dimension the condition applies to.
* Eventually, we may be able to tie together this operator with
boost::lambda and boost::bind and we could up with a very elegant way to
write out functions that involve conditional expectations. It may not have
the performance of hand-tweaked fortran loops, but it should be a good
enough place to start and infinitely preferable to matlab.

The main use case I have for this is to implement easy/flexible notation for
conditional distribution functions when writing out bellman equations for
dynamic programming in economics. Most cases of this involve two
dimensional markov measures (often approximated by Tauchen's algorithm from
ARMA processes)

If anyone is interested in this topic, has ideas, wants to work jointly, or
plans to tell me that I am insane, please email me. My main fear is that I
am a library user with a pretty good ability to think in generics, but with
absolutely no chance of ever understanding what all of the crazy
non-algorithmic code in these libraries does or writing it myself.


Boost list run by bdawes at, gregod at, cpdaniel at, john at