Posts

Showing posts from January, 2020

Logistic Regression - Walk through using Social Network Ads dataset

Image
Classification techniques are very important to understand in the field of machine learning and data mining applications. Logistic regression is very useful regression methodology for solving classification problems, particularly the binary classification problems. In such problems, the target will take only two possible classes. However, Logistic regression can also be applied for Multinomial classification where the target can take more than two classes. We know that Linear equation consisting X1 to Xn input features can be represented as                                           f(x)  = β 0X0 + β1X1 + β2X2 + ....... + βnXn where    β1,  β2,  β3 ....  βn   are co-efficients of respective input feature,  β 0  is constant factor and  f(x) is our predicted target feature. Logistic regression is e...

Auto MPG and Gradient Descent - My next steps

Image
In my previous blog, I attempted prediction of MPG using my limited knowledge of data modelling techniques. My predictions were bad and model didn't work at all!!!  Remember, data modelling is new to me and it is always good start to start from bad ☺ I continued with my analysis using the next level of modelling techniques learned Let's start the Auto MPG Data analysis. Let's import the auto mpg raw file into colab from google.colab import files files.upload() Our next step is to load the data into Pandas DataFrame import pandas as pd autompg = pd.read_fwf( 'auto-mpg.data' ,  headers = None , names = [ 'mpg' , 'cylinders' , 'displacement' , 'horsepower' , 'weight' , 'acceleration' , 'model_year' , 'origin' , 'car_name'  ]) print ( autompg.info() ) autompg.head() Info method shows all columns are populated. However, Horsepower data seems to be float but Info method shows...

Auto MPG - My first ever Blog and Machine Learning

# Auto MPG Linear Regression Model I am always passionatte about data management and now learning Data Science and Machine learning. So far, I have started with Linear Regression and especially Gradient Descent method. I thought I will practice this method on Auto MPG data I think the first most important step in Machine Learning is understanding the data (i.e., Exploratory Data Analysis) provided to train the model # Step - 1 : Import the auto mpg data file from google.colab import files files.upload() # Layout of Auto MPG Data     1. mpg:           continuous     2. cylinders:     multi-valued discrete     3. displacement:  continuous     4. horsepower:    continuous     5. weight:        continuous     6. acceleration:  continuous     7. model year:    multi-valued discrete     8. origin:...