Note: This is a regular classification problem with PyTorch and this is exactly like the one in the previous post of the “PyTorch for Deep Learning” series.

The Reason for doing writing the post is for some more reference to classification problem and better understanding. If You are already good enough with classification withneural network, skip to the part where confusion matrix comes in.

Jumping to the Code Part

  1. Importing required libraries
#importing the libraries

import torch
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

2. Data

The dataset is available at kaggle : https://www.kaggle.com/dragonheir/logistic-regression

#importing the dataset
df = pd.read_csv('Social_Network_Ads.csv')
df.head()

#pytorch-tutorial #confusion-matrix #deep-learning #deep-learning-course #pytorch

PyTorch For Deep Learning — Confusion Matrix
5.40 GEEK