Member-only story

Neural Network in Python

Step-by-step follow-along | Data Series | Episode 13.2

Mazen Ahmed
4 min readNov 2, 2023

The previous episode discusses the structure of a neural network and how one is built. In this episode we look to model some data using a neural network from the sklearn libary.

You can view and use the code and data in this episode here: Link

Objective

To implement a neural network that predicts the Ph of water given its hardness, solids, chloramines, sulfate, conductivity, organic carbon, trihalomethanes and turbidity using sklearn.

Libraries

We start by importing some general python libraries that will enable us to import and manipulate our data such as pandas and produce graphs such as seaborn.

import pandas as pd
import numpy as np
import warnings
import seaborn as sns

warnings.filterwarnings("ignore")

Data Exploration

Let us take a brief look at our data to gain an idea of our input and target features.

First we read our water data into python by making use of the pandas library:

--

--

Mazen Ahmed
Mazen Ahmed

No responses yet