Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement EnsembleServer.marginals() #2

Open
fritzo opened this issue Jul 10, 2017 · 0 comments
Open

Implement EnsembleServer.marginals() #2

fritzo opened this issue Jul 10, 2017 · 0 comments

Comments

@fritzo
Copy link
Member

fritzo commented Jul 10, 2017

There are two types of servers in serving.py: the TreeCatServer for single latent hypotheses, and EnsembleServer for ensembles of multiple latent hypotheses (typically model_ensemble_size = 8).

The .marginals() method of serves should compute marginal probabilities P(Z_v=z|data) for each vertex v, where Z_v is the observed multinomial variable at vertex v, and data is a partially-observed row of conditioning data. This method is currently implemented for individual TreeCatServer objects, but not for aggregate EnsembleServer objects.

To implement .marginals() for EnsembleServers, we need to compute the individual self._ensemble[i].mean(data), and then return a weighted average of these w.r.t. self._ensemble[i].logprob(data).

Note that data here is specified in the internal format of an [N, R]-shaped ragged array, with blocks defined by ragged_index.

@fritzo fritzo changed the title Implement EnsembleServer.marginals() Implement EnsembleServer.mean() Jul 15, 2017
@fritzo fritzo changed the title Implement EnsembleServer.mean() Implement EnsembleServer.marginals() Jul 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant