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

Wine quality predictions

This is an optional assignment taken as a part of excellent cource Deep Learning with PyTorch: Zero to GANs experience.

Our goal will be to predict the quality of red wine based upon its characteristics, such as alcohol content, pH, density etc. The original dataset can be found here,only red wines dataset is explored.

As it is a part of the assignment, only logistics regression algorithm is used, implemented as a simple neural network structure.

Preparing librarries and downloading the dataset

I will use pytorch library to implement our simple neural network. Jovian library allows to commit the work to jovian.ml website

!pip install jovian --upgrade --quiet
WARNING: You are using pip version 20.1; however, version 20.1.1 is available. You should consider upgrading via the '/opt/conda/bin/python3.7 -m pip install --upgrade pip' command.
import torch
import jovian
import urllib.request
import torchvision
import torch.nn as nn
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import torch.nn.functional as F
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
from torchvision.datasets.utils import download_url
from torch.utils.data import DataLoader, TensorDataset, random_split