You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
There are two types of servers in
serving.py
: theTreeCatServer
for single latent hypotheses, andEnsembleServer
for ensembles of multiple latent hypotheses (typicallymodel_ensemble_size = 8
).The
.marginals()
method of serves should compute marginal probabilitiesP(Z_v=z|data)
for each vertexv
, whereZ_v
is the observed multinomial variable at vertexv
, anddata
is a partially-observed row of conditioning data. This method is currently implemented for individualTreeCatServer
objects, but not for aggregateEnsembleServer
objects.To implement
.marginals()
forEnsembleServers
, we need to compute the individualself._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 byragged_index
.The text was updated successfully, but these errors were encountered: