Learn practical skills, build real-world projects, and advance your career

Predicting best quality of wine using Linear Regression and PyTorch

In this notebook we will predict the best quality of the wine using pytorch and linear regression.

# importing essential libraries 
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
import seaborn as sns
import matplotlib.pyplot as plt
import torch.nn.functional as F
from torchvision.datasets.utils import download_url
from torch.utils.data import DataLoader, TensorDataset, random_split
# lets load the csv file into datasets
dataframe = pd.read_csv('https://raw.githubusercontent.com/rishabh25126/DatasetsRepo/master/winequality-red.csv')
dataframe.head()
# columns in our dataset
dataframe.keys()
Index(['fixed acidity', 'volatile acidity', 'citric acid', 'residual sugar',
       'chlorides', 'free sulfur dioxide', 'total sulfur dioxide', 'density',
       'pH', 'sulphates', 'alcohol', 'quality'],
      dtype='object')