How to render a semi supervised model?

Hi,
I am trying to plot a model where I would like to also do automatized rendering, however I can only set obs=data to denote that sample is supervised, and if I keep obs empty, then the node is unsupervised.
However, I would like to denote a semi supervised setting where we would ‘paint’ the half of the sample, like in SS-VAE figures in Pyro website, as below:

Can you let me know how to make that happen?
Thanks!

This is a cool idea, you should open an feature request issue. I think we could make this work by passing two sets of *args,kwargs**.

1 Like

Actually, this was simple to implement, here’s a PR on github.
image

1 Like

Thanks!

Hi again @fritzo , can you let me know if we can have diamond shape in the rendering to denote deterministic qualities? I am somehow unable to find it in the documentation.
I would be glad to hear back from you,
Best,

Hi @kkalt, currently Pyro does not support rendering deterministic dependencies. I had tried to get this working in the render-deterministic branch addressing this issue, but it was more complex than I expected. The similar issue in NumPyro has already been resolved, so we might try following that pattern. Additionally I believe @eb8680_2 has been looking into rendering deterministic nodes for use in causal inference. We do want to support it, we just haven’t had time :sweat_smile:

Hi @fritzo, thank you for your quick reply. I see. I checked the NumPyro link (thank you for that), and I notice that it is solving the issue of the need of rending a derived attribute (dashed ellipse). However what I need would be a deterministic attribute in a box or a lozenge.
Ofcourse, time is indeed limited! It would be a great feature to have!

@kkalt sounds good. Could we continue discussion at the pyro issue? @eb8680_2 and I should have time to look into it in the next month or two.

Sure! That would be great :slight_smile:
Shall I duplicate my question in that issue?

@kkalt sure, we could use any extra context in that issue.

@fritzo I just see that you put the forum issue there. Therefore I didnt post and duplicate the content. Thanks for looking into this!