ROC/AUC curves for matplotlib - matplotlib

I have a lot of data that comes from some experiment, just one column "measure" and would like to calculate ROC/AUC curves. I use matplotlib and had a look, but found no way to do with it. I wonder if anyone can share experiences with matplotlib or with any other open source easy to use library for ROC/AUC curves.

Matplotlib is mostly used for plotting things, so you'd need to calculate the curves first and then plot them with matplotlib. There seem to be multiple relevant Python modules:
scipy roc_curve
PyROC
CROC
yard

Related

How can I draw a graph using networkx without explicitly calling matplotlib?

I am making interactive worksheets in Jupyter Notebook, introducing people to NetworkX. Suddenly, the nx.draw() command is not creating an output of a graph. It was working fine before, and I haven't changed anything about the code I was using. For example, one block of code that was working fine before was:
import networkx as nx
G2 = nx.Graph()
G2.add_nodes_from([1,2,3,4,5,6,7])
edgelist = [(1,4),(1,6),(1,7),(2,5),(2,6),(3,7),(4,6),(4,7),(5,7),(6,7)]
G2.add_edges_from(edgelist)
nx.draw_networkx(G2, with_labels=True, node_color = 'y')
Now, no errors come up, but neither does a graph. I have looked and seen that other people fixed this issue bu using plt.show() but I don't understand why I suddenly need to include that when I didn't have to before. Does anyone know a way I can avoid importing matplotlib and using the plt.show() command?
Perhaps the issue is to do with some other package I have or something to do with jupyter notebook?
EDIT: It has been pointed out to me that matplotlib is a package dependency so technically there is no way of drawing a graph in networkx without using matplotlib. I understand that, but is there a way to do it without explicitly calling matplotlib?

Using %matplotlib widget in jupyter lab with julia kernel

So it turns out when you want to use interactive plots (i.e. with zooming, moving around, rotating etc.) in jupyter lab with a python kernel, you need to use %matplotlib widget, this at least works for me. Now the question is: How could I use that feature with a julia kernel? I am a big fan of both matplotlib and julia and I do not want to compromise on them. When I type the above command with a julia kernel, I get the message
The analogue of IPython's %matplotlib in Julia is to use the PyPlot package, which gives a Julia interface to Matplotlib including inline plots in IJulia notebooks. (The equivalent of numpy is already loaded by default in Julia.) Given PyPlot, the analogue of %matplotlib inline is using PyPlot, since PyPlot defaults to inline plots in IJulia. To enable separate GUI windows in PyPlot, analogous to %matplotlib, do using PyPlot; pygui(true). To specify a particular gui backend, analogous to %matplotlib gui, you can either do using PyPlot; pygui(:gui); using PyPlot; pygui(true) (where gui is wx, qt, tk, or gtk), or you can do ENV["MPLBACKEND"]=backend; using PyPlot; pygui(true) (where backend is the name of a Matplotlib backend, like tkagg).
For more options, see the PyPlot documentation.
This of course is all true, but it does not mention how interactivity could be achieved. PyPlot works out of the box, but the plots are non-interactive (in the above sense). Any ideas?
See the PyPlot docs here: https://github.com/JuliaPy/PyPlot.jl for details on setting up interactive plots and such.
This gist may also be of use to you: https://gist.github.com/gizmaa/7214002. I would also suggest looking into Makie.jl for more rich interactive plotting.
Edit:
This question may also be relevant to you: Inline Interactive Plots with Julia in jupyter notebook

Librosa Spectogram vs Matplotlib Spectrogram

I know spectrogram can be plotted using different functions of the different libraries in python. In matplotlib, plyplot plots spectrogram directly using time-series audio data but librosa first applies short Fourier transform on data before plotting spectrogram.
But I am still confused between two.
Please tell me the detailed difference between
1.librosa.dispay.specshow()
2.matplotlib.pyplot.specgram()
I have searched the internet a lot but couldn't find any relevant information though.
According to librosa documentation, all librosa plotting functions are depends on matplotlib.
All of librosa’s plotting functions rely on matplotlib. To demonstrate everything we can do, it will help to import matplotlib’s pyplot API here.

plotting a function like ezplot in matlab in python using matplotlib

I have a a classification function that classify a data point into one of two classes. The problem is, I need a way to plot the decision boundary of two class. While this is easy for linear function. it's cumbersome to find the equation of the boundary. ezplot package in matlab seems to be able to do it. It will plot the result automatically. It works using linear and quadratic function. It doesn't require you to provide the coordinate. In matplotlib, you can only plot if you are given the coordinate. Does anyone know how to do this with matplotlib?

python 3d and multidimensional plots

What are the different alternatives available for 3D plotting in python matplotlib? I am using scatterplot and would like to know more about other types of 3d plots. I checked the site http://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html but could not get effective results as I was not able to interpret results effectively. Please let me know of some good 3D plots. Also I would like to try multidimensional plotting and have heard that scatterplot matrix is very effective. Please give some good examples demonstrating the same.