MeasureBase.jl icon indicating copy to clipboard operation
MeasureBase.jl copied to clipboard

Questions about `getdof`

Open cscherrer opened this issue 2 years ago • 4 comments

I have some questions about getdof. Here's the current docstring:

help?> MeasureBase.getdof
  getdof(μ)

  Returns the effective number of degrees of freedom of variates of measure μ.

  The effective NDOF my differ from the length of the variates. For example, the effective NDOF for a
  Dirichlet distribution with variates of length n is n - 1.

  Also see check_dof.

First and easiest, is it right that we can now drop the "effective" from this? Or does it add anything?

Next, I'm wondering if we can pin down the behavior of this a little bit. Currently in MeasureBase I'm getting

julia> getdof(Normal())
NoDOF{LebesgueMeasure}

This is wrong, but I'm not sure of the best way to fix it. Is there a reason getdof can't just check the dimensionality of the root measure? [And, did we already discuss this?]

Then, I'm wondering what conditions should guarantee that getdof is defined? I don't think the root measure should be requried to be LebesgueMeasure() ^ n for some n, since this doesn't hold for manifolds, including affine transforms.

cscherrer avatar Jul 30 '22 17:07 cscherrer