0
$\begingroup$

Here are three curves. I'm training a model and trying to plot the training loss curve; the x-axis is iterations and the y-axis is loss value:

enter image description here

All the curves contain many spikes and noises. I'm interested in seeing which curve has less chaos ("less chaos" refers to less spikes or a smoother curve). One way is to use np.convolve to smooth the curve. Unfortunately, it lost so much information and defeat my original purposes. I'm wondering if there different way to visualize this? (Not necessarily plotting the curve differently, but using some mathematical method to visualize the smoothness in a different way.)

$\endgroup$
  • $\begingroup$ What are these data? What specifically do you mean by "less chaos" in this context? Would that be just fewer spikes? The same number, but lower amplitude? Something else? Can you post your data, or a small example dataset? $\endgroup$ – gung - Reinstate Monica Jun 1 '19 at 2:20
  • $\begingroup$ @gung; "less chaos" refers to less spikes more smoother curve. The data here. I'm training on some model and trying to plot the training loss curve : x-axis is iterations and y-axis are loss values $\endgroup$ – ElleryL Jun 1 '19 at 2:22
  • $\begingroup$ The nature of you data is unclear. Can you post the data, or a similar data set? $\endgroup$ – xan Jun 2 '19 at 23:34
  • $\begingroup$ A dummy or a link help in evaluation. You might ask what options there are to contrive the relative vertical slew per horizontal distance for horizontal step sizes greater than 1. $\endgroup$ – EngrStudent Jun 20 '19 at 18:28
1
$\begingroup$

This is a very common phenomenon when training neural networks with stochastic or mini-batch methods. Typical solutions include plotting only per-epoch averages (i.e. collecting results for all mini-batches and then averaging) or else using moving averages, smoothing, etc.

To avoid re-inventing the wheel, Tensorboard give a nice way to log, plot and smooth results. If you use software like TensorboardX, you can access the convenience of the Tensorboard interface even if you're not using Tensorflow to estimate the model.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.