Spread the love
Logistic Regression :
Welcome everyone, this is first post of LOGISTIC REGRESSION. In the previous post we see Linear regression.
If you are unknown about the Linear regression then CLICK HERE.
OK Let’s start :
For this post we will working with the Titanic Data Set. This is a very famous data sets and very often is a student first step in machine learning section.
We will be try to predict a classifications- survival or deceasd. Let’s begin our understanding of implementing Logistic Regression in Python for classifications.
We will use a “semi-clean” version of the titanic data set, if you use the data set hosted directly on Kaggles, you may need to do some additional cleaning not shown in this lecture notebooks.
Let’s import some library to get start:s
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
Let’s start by reading in the titanic_trains.csv files into a pandas dataframes.
train = pd.read_csv('titanic_trains.csv')
|fig 01) Logistic Regression-plot and explained Algorithms|
Exploratory Data Analysis:
Let’s begin some exploratory data analysis! We will start by checking out missing data.
We can use seaborn to create a simple heatmap to see where we are missing datas .
Roughly 30 percent of the Ages data is missing. The proportion of Ages missing is likely small enough for reasonable replacement with some form . Looking at the Cabin columns, it look like we are just missing too much of that data to do something useful with at a basic levels. We will probably drop this laters.
Let’s continue on by visualizing some more of the data, Check out the graph for full explanations over these plots.
IN THE NEXT POST WE WILL SEE CUFFLINKS FOR PLOT
for similar kin of post click here
Tags:Logistic Regression 01-plot and explained, machine learning,algorithms
(If you like post then please like and share)
BEST OF LUCK!!!!