Questions about `getdof` · Issue #74 · JuliaMath/MeasureBase.jl · GitHub
Skip to content

Questions about getdof #74

Open
Open

Description

@cscherrer

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.

Activity

  1. oschulz commented on Jul 31, 2022

    @oschulz
    Collaborator

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

    Definitely, that's left over from an early draft.

    Currently in MeasureBase I'm getting ... NoDOF{LebesgueMeasure}

    That should definitely work, getdof should go down the base-measure stack recursively. With the current releases it does work, though:

    pkg> st MeasureBase MeasureTheory
    Status `/user/.julia/environments/measuretheory/Project.toml`
      [fa1605e6] MeasureBase v0.12.2
      [eadaa1a4] MeasureTheory v0.16.5
    
    julia> getdof(Normal())
    static(1)

    Then, I'm wondering what conditions should guarantee that getdof is defined?

    I'm not quite sure what the correct approach for discrete measures is here. For contiguous measures it shouldn't be limited to Lebesgue-based measure, of course - but getdof will have to be specialized of course. For manifolds based on affine transformations (I'll see that I get that package done), I guess we can specialize on PushforwardMeasure{<:AffineTransformation}?

  2. cscherrer commented on Jul 31, 2022

    @cscherrer
    CollaboratorAuthor

    Definitely, that's left over from an early draft.

    Ok great, that's a quick update :)

    That should definitely work, getdof should go down the base-measure stack recursively. With the current releases it does work, though

    Ah ok, I think I just needed to update this. Thanks

    I'm not quite sure what the correct approach for discrete measures is here. For contiguous measures it shouldn't be limited to Lebesgue-based measure, of course - but getdof will have to be specialized of course. For manifolds based on affine transformations (I'll see that I get that package done), I guess we can specialize on PushforwardMeasure{<:AffineTransformation}?

    Is the only purpose of getdof to have a global dimensionality to use for transforms? I was about to say we could make it local -- allowing an x argument -- but that doesn't make sense if we're only ever interested in this globally.

  3. oschulz commented on Aug 1, 2022

    @oschulz
    Collaborator

    Is the only purpose of getdof to have a global dimensionality to use for transforms?

    So far, yes, I've only used it globally, and often need to use it before x i known.

  4. cscherrer commented on Aug 2, 2022

    @cscherrer
    CollaboratorAuthor

    Thanks @oschulz . Let's leave this open until the docstring is updated, then we can close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions