Posts

Decision Tree Algorithm – A Complete Guide

Image
  This article was published as a part of the  Data Science Blogathon Introduction Till now we have learned about linear regression, logistic regression, and they were pretty hard to understand. Let’s now start with Decision tree’s and I assure you this is probably the easiest algorithm in Machine Learning. There’s not much mathematics involved here. Since it is very easy to use and interpret it is one of the most widely used and practical methods used in Machine Learning. Contents 1. What is a Decision Tree? 2. Example of a Decision Tree 3. Entropy 4. Information Gain 5. When to stop Splitting? 6. How to stop overfitting? max_depth min_samples_split min_samples_leaf max_features 7. Pruning, Post-pruning Pre-pruning 8. Endnotes What is a Decision Tree? It is a tool that has applications spanning several different areas. Decision trees can be used for classification as well as regression problems. The name itself suggests that it uses a flowchart like a tree structure to show t...

project NYC Taxi Trip Duration Dataset

Image
Introduction Let us walk through the Exploratory Data Analysis on NYC Taxi Trip Duration Dataset. What is Exploratory Data Analysis? Exploratory Data Analysis is investigating data and drawing out insights from it to study its main characteristics. EDA can be done using statistical and visualization techniques. Why is EDA important? We simply can’t make sense of such huge datasets if we don’t explore the data. Exploring and analyzing the data is important to see how features are contributing to the target variable, identifying anomalies and outliers to treat them lest they affect our model, to study the nature of the features, and be able to perform data cleaning so that our model building process is as efficient as possible s. Importing necessary libraries import pandas as pd #data processing import numpy as np #linear algebra #data visualisation import seaborn as sns sns.set() import matplotlib.pyplot as plt %matplotlib inline import datetime as dt import warnings...