skjerns/AutoSleepScorer

Confusion Matrix

Closed this issue · 2 comments

screenshot

Can you please explain the parameters passed to this function for obtaining the confusion matrix for this model?

fname = filename where the png will be saved
conf_mat = the confusion matrix itself, i.e. a square matrix obtained by `https://scikit-learn.org/stable/modules/generated/sklearn.metrics.confusion_matrix.html`
target_names = a list of strings with the names corresponding to the specific prediction label

However, I recommend to simply use any other confusion matrix plotting function instead of mine, for example https://scikit-learn.org/stable/auto_examples/model_selection/plot_confusion_matrix.html

or https://stackoverflow.com/questions/35572000/how-can-i-plot-a-confusion-matrix

Hi Simon

For Plotting a confusion matrix we require a square matrix but like how can we make a square matrix from the dataset as the data are in the csv format and they are very long entries data so do you apply any code for making matrix or you have just done mannualy ?