Is it possible to make parametric plots?

Hello, I would like to make plots such as the ones that can be seen in this video at this timestamp (59:59): Stanford Seminar - Information Theory of Deep Learning - YouTube

Basically, I have two variables (let’s say X and Y) that are measured at each layer and epoch, and I would like to have a unified plot where each layer is represented as a parametric curve. Connecting points in a same epoch by neighboring layers would be a plus but that’s optional.
So for each epoch and layer, I would like to plot a point at coordinates (X,Y) connected to the corresponding previous point of the previous epoch. If possible, I would like to color each point according to the epoch so that we can see the progression.

I tried to plot a line series like this:

wandb.log({"XY": wandb.plot.line_series(self.layers_x, self.layers_y, self.layer_names,
                                        "XY by layer and epoch", "X")}, step=step)

But there are three issues with this:

  1. The points of the curves aren’t connected in the correct order, it seems they are implicitly connected according to their sorted X values. So the resulting curves are incorrect, even if I can guess the true shapes they should have.
  2. I haven’t managed to get point coloring according to the epoch number, and I had to manually modify the plot in the dashboard so that I had all curves correctly displayed in the same plot. I had to use custom plots but I am not familiar with these. I also don’t know how to set the display name of the y axis which is “y” by default.
  3. I have to manually keep track of the table values, if possible I would like to log the values for each step normally, like any other value like the accuracy at each epoch.

So, is it possible to make such plots? Thank you.

Hi Ben,

Thanks for being in touch with this interesting question. So that I can get a clear picture of what you are trying to achieve would you be able to share a link to the workplace where you are trying to plot this? Look forward to hearing from you. ~Frida

Hi Frida,

You can see the issue here

As you can see in the custom chart, the line corresponding to layer_8 should arc from left to right then right to left while going up at all times, but the first point is connected to the last and make the trajectory incorrect.

Hi Ben,

I think that weave plots will likely give you much closer functionality to the image at the timestamp of the video that you shared. I have attached a screengrab of this, alongside steps that you would need to take, you can see an arc where the colour is each layer and x and y values on a scatter follow the same logic as you have shared. To reproduce this you would need to add a panel, and use Weave to select ‘Merge Tables Plot’. set the x dim and y dim, this will colour by step.


The Weave plot is indeed a easier to read, but I didn’t manage to get the correct coloring of the points. I guess this is because the epoch variable isn’t in the table.
Changing the style to “line” instead of “point” also displays the line incorrectly, I guess the available plots weren’t designed to do this.

Well in any case thank you, I will adapt.

Hey Ben thanks for being back in touch and always happy to help. I think that this would make an interesting use case, and yes I did notice the same behaviour when adding a line. I will log this as a feature request for your (line group by) functionality, where the order of precedence is not dictated by the x axis). One interesting point of using weave is that you can use feature embedding such as PCA (principal component analysis) which I notice produces some interesting results for this and may add value/insight to your use case.

Hey Ben, Updating you that I have created a feature request for you on this. Let me know if you need any further help just now.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.