79322329

Date: 2025-01-01 21:14:57
Score: 1
Natty:
Report link

Is there something that's preventing you from just using seaborn directly?

def plt1():
    # Added this example confusion matrix.
    c_mtrx_N = pd.DataFrame([[1, 2], [3, 4]], index=['Actual 0', 'Actual 1'], columns=['Predicted 0', 'Predicted 1'])
    plt.figure(figsize=(4,4))
    # c_mtrx_N = pd.crosstab(y_test, y_pred_N, rownames=['Actual'], colnames=['Predicted'])
    sns.heatmap(c_mtrx_N, annot=True, fmt = '.3g')
    plt.show()

plt1()

Also, sns.set() is deprecated. Use sns.set_theme() instead.

Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Is there some
  • Low reputation (0.5):
Posted by: simpleParadox