• No se han encontrado resultados

4.8. Comentarios, conclusiones y recomendaciones

4.8.3. Comentarios a la auditoría de gestión

is new. In chapter 6, we will see how a model with even more complicated con-straints, an infinite relational model, can be built by reusing the same models we have described here – including inference using exactly the same kernels.

To sum up, constraint States are a general-purpose tool for composing State spaces – they allow State spaces that were designed independently to be “glued” together without modification, and they increase the expressiveness ofBlaiseby enabling the values some States to deterministically derived from the values of other States.

com-Figure 3-25: When new States are added to the State hierarchy, it is often necessary to sample some aspect of them. For example, if a new component is to be added to a mixture model, any component parameters will need to be sampled. This figure shows a simple mixture model. A Metropolis-Hastings adapted component birth/death Kernel on the left will add and remove components from the model, allowing the number of components to be a target of inference. Each time a component is added, the Initialization Kernel (highlighted with an orange annulus) will be invoked by Blaiseto sample an initial value for Θ.

Figure 3-26: Inline mixture models like figure 3-25 could avoid Initialization Ker-nels by writing a special purpose Birth/Death Kernel that samples the component parameter Θ when a component is created. In contrast, bridged form mixture mod-els like the multiple-feature mixture model shown here require Initialization Kernmod-els in order to support inference on the number of components, because feature model components created by Constraint States need to be initialized.

ponent exactly as it existed before deletion. If mixture components are only created with parameters assigned to pre-determined constants, then mixture components can only be deleted when the parameters equal those pre-determined constants, resulting in extremely poor performance (i.e. slowly mixing Markov chains).

The standard solution to this issue is to sample parameter values from some distribution when mixture components are created. In this way, component deletion proposals can be accepted because there is always a positive probability density of proposing to recreate the component with the same parameter values.

One question remains, though: where does the responsibility for sampling param-eter values lie? It is possible that constraint States could sample paramparam-eter values;

however, the choice of what parameter sampling strategy to use is most naturally an aspect of the inference method description rather than an aspect of the state space description. This suggests that parameter sampling should be a responsibility of the Kernel that causes the components to be created, but this has its own challenges.

For example, consider the multi-feature mixture model described in section 3.7. One of the apparent virtues of that model implementation was that additional features could be added without modifying the Kernels that operated on the common object partition – that is, the feature mixture models were thoroughly decoupled from the object partition implementation.

As described previously, Kernels are normally invoked by calling Sample-Next-Stateon the root of the Kernel hierarchy, with each such call advancing the Markov chain to the next state. Blaisesupports decoupled State initialization by introducing a second way for Kernels to be invoked: when new elements of State are added to the State structure and need to have an initial value sampled for them, an Initialization Kernel is triggered. Initialization Kernels are bound to specific locations in the State space; for example, one Initialization Kernel might be triggered only by new States being created as a specific Collection State’s children, while a different Initialization Kernel might be responsible for initializing State elsewhere in the State hierarchy.

Initialization Kernels are automatically invoked on pieces of State that needs to be initialized. Returning to the mixture model example, when a new component

is created as part of some Kernel’s Sample-Next-State operation, the constraint State would give the parameter Θ a dummy value, then add the component to the components Collection State. This would trigger an invocation of the Initialization Kernel’s Sample-Next-State on the new mixture component, allowing Θ to be initialized. As discussed in section 3.7, modifications to the State space as a result of a constraint are considered to be part of the operation that triggered the constraint;

this includes any State initialization done by Initialization Kernels. In the Normal mixture model example, this implies a group birth/death Kernel for the common object partition would produce Moves for which operations such as Move-Forward-Transition-Densityinclude the probability of any triggered Initialization Kernels sampling the values they did. In other words, there are two ways for one Kernel A to invoke another Kernel B: either A could have B as a child and invoke it directly, or A could cause some change to the State space which triggers an invocation of B as an initialization Kernel; in either case, though, any sampling performed by B on behalf of A will be accounted for by Move-Forward-Transition-Density, etc.

Similar patterns allow the automatic invocation of Initialization Kernels as part of Sample-Next-Move and Enumerate-Possible-Movesoperations.

Initialization Kernels are also invoked when a previously-initialized State is about to be destroyed. The Initialization Kernel is signaled that this is a destroy operation rather than a construction operation, enabling the Kernel to make the appropriate contributions to the Move (e.g., incorporating into to the Move’s Move-Reverse-Transition-Density value the probability of sampling this exact configuration on a subsequent Initialization).

It is worth noting that hybrid Kernels may also be used to construct Initialization Kernels via composition. For example, one might choose to use a concrete mixture Kernel to randomly choose between two different initialization strategies.

Figure 3-27: This non-parametric multi-feature beta-binomial mixture model is the capstone of this chapter, using almost all the features that have been presented. This model uses a Chinese Restaurant Process (CRP) prior on the partition of objects. As will be seen in chapter 6, the Infinite Relational Model is very similar to this model, and will use exactly the same inference methods.

3.9 Comparison to the Model-View-Controller

Documento similar