Macaulay2 » Documentation
Packages » GraphicalModels :: inverseMarginMap
next | previous | forward | backward | up | index | toc

# inverseMarginMap -- inverse of the marginMap

- Usage:
    `inverseMarginMap(i,R)`
- Inputs:
  - i, an integer, the index of the variable for which to undo the "margin trick"
  - R, a ring, a markovRing
- Outputs:
  - a ring map,

## Description

This method computes the inverse of the marginMap.

    i1 : R = markovRing (3,2)

    o1 = R

    o1 : PolynomialRing

    i2 : F = marginMap(1,R)

    o2 = map (R, R, {p    - p    - p   , p    - p    - p   , p   , p   , p   , p   })
                      1,1    2,1    3,1   1,2    2,2    3,2   2,1   2,2   3,1   3,2

    o2 : RingMap R <-- R

    i3 : G = inverseMarginMap(1,R)

    o3 = map (R, R, {p    + p    + p   , p    + p    + p   , p   , p   , p   , p   })
                      1,1    2,1    3,1   1,2    2,2    3,2   2,1   2,2   3,1   3,2

    o3 : RingMap R <-- R

    i4 : gens R

    o4 = {p   , p   , p   , p   , p   , p   }
           1,1   1,2   2,1   2,2   3,1   3,2

    o4 : List

    i5 : F*G -- we see that the composition is the identity map:

    o5 = map (R, R, {p   , p   , p   , p   , p   , p   })
                      1,1   1,2   2,1   2,2   3,1   3,2

    o5 : RingMap R <-- R

## See also

- hiddenMap -- linear map between the ring of a model with one hidden variable and the ring of the corresponding fully observed model
- marginMap -- linear map on joint distributions for discrete random variables replacing marginals for indeterminates

## Ways to use inverseMarginMap:

- `inverseMarginMap(ZZ,Ring)`

## For the programmer

The object inverseMarginMap is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/GraphicalModels.m2:1676:0.