reiinakano / scikit-plot

An intuitive library to add plotting functionality to scikit-learn objects.
MIT License
2.43k stars 285 forks source link

Example Request: PyTorch Precision Recall #45

Closed FuriouslyCurious closed 7 years ago

FuriouslyCurious commented 7 years ago

Thank you for the Keras example in README: scikit-plot looks like a very elegant solution for plotting ML / DL curves.

I was wondering if you have tried plotting PyTorch optimizers with scikit-plot? If you have an example of PyTorch it will help me out a lot.

Thank you again for an awesome library!

reiinakano commented 7 years ago

What kind of graphs would you like to see from a Pytorch optimizer?

FuriouslyCurious commented 7 years ago

PyTorch has torch.optim.lr_scheduler.ReduceLROnPlateau() method which reduces learning rate (LR) when stuck on a plateau. This method is similar to Keras method ReduceLROnPlateau().

A plot of LR for each Epoch would be a great example.

Doc: http://pytorch.org/docs/master/optim.html#how-to-adjust-learning-rate

reiinakano commented 7 years ago

Hi @FuriouslyCurious, I am not sure if this is a problem that needs to be solved by scikit-plot. If you want to plot LR per epoch, then you need to collect LR and Epochs into two lists and just use vanilla matplotlib to plot the curve. scikit-plot is mostly for curves that require additional computation, and I don't see how a plot of LR per epoch fits within scikit-plot.