You are on page 1of 18

Methods in Data Science and Machine Learning

Pallavi Chavan
May 18, 2021
Ramrao Adik Institute of Technology
D Y Patil Deemed to be University, Nerul, Navi Mumbai, MH, India
pallavi.chavan@rait.ac.in
Data Science Age

1
Artificial Intelligence

• Building machines that have intelligence like humans


• Learns from examples and experience
• Top 4 AI Techniques:

2
Going in Deep

3
Data Science

1. Emerging field of study


2. Big Data and Analytics
3. multidimensional scope
4. Data Science root - Industry
5. Statistical methods, machine learning techniques and
mathematics under one umbrella

4
Data Science & Machine Learning Methods

5
Data Science Tools

1. Data Analysis Tools


1.1 R
1.2 Python
1.3 Apache Spark- Real time Analysis, Highly interactive
2. Data Visualization Tools
2.1 R
2.2 Python
2.3 Tableau
2.4 Orange
2.5 Google Fusion Table

6
Classification Techniques

1. Logistic regression
2. Decision trees
3. Naïve Bayes classifiers
4. K-nearest neighbor
5. Neural networks

7
When to use What ?

• Regression: when the output variable is a real or continuous


value
• Clustering: When you have a set of unlabeled data, exploring
data you know nothing about, Ex. City Planning
• Classification: When output is discrete or categorical

8
Linear Regression

• A linear regression is a statistical model


• Analyzes relationship between response variable and the
independent variable(s)
• Simple Linear Regression:

y = a + bx (1)

• Some Examples:
• Relationship between height and weight
• Effect of fertilizer and water on crop yields
• Relationship between qualification and the salary of employee
• Relationship between height and age of individual
• Impact of product price on number of sales
• Impact of rainfall amount on number fruits yielded
• Impact of GPA on Placement of candidate

9
Linear Regression

Linear regression assumes that there is linear relationship between


dependent variable and independent variable.

10
Linear Regression- Simulation in R

• Relationship between the age of children and their heights.


• Aim is to predict the height of a child if you know his/her age
• Formulation:
height = a + age ∗ b (2)
where, a - intercept, b- slope
• Newborn child with zero months are not zero centimeters, this
is the function of the intercept
• slope measures the change of height with respect to the age in
months

11
Logistic Regression

• Linear regression is not capable of predicting probability


• Logistic R. is Statistical tool to model the probability of some
event
• Measures the relationship between the categorical dependent
variable and one or more independent variables
• Ex. determining something is true or false, win or lose, spam or
not spam, gender belongs to male or female etc.
• Used for classification
• Predict a qualitative response

12
Logistic Regression

Logistic regression model:

y = 1/(1 + e− (a + b1x1 + b2x2 + b3x3 + ...)) (3)

Where,
y is the response variable
x is the predictor variable
a and b are the coefficients

13
Simulating Logistic Regression in R

• The function used to create the regression model is : glm()


• glm(formula,data,family)
• formula is the symbol presenting the relationship between the
variables
• data is the data set giving the values of these variables
• family is R object to specify the details of the model. It’s value is
binomial for logistic regression

14
Deep Neural Network

• Class of Machine Learning


• Inspired from Human Biological Neural Network
• Layers
• Input
• Output
• Hidden
• Activation Functions
• Weights
• Feed Forward Architecture
• Supervised, semi supervised, unsupervised

15
Designing Binary Classifier using Deep Learning

Based on the Technical Skill set and Communication Skills of the


student, Predicting whether he/she will get placed in the company or
not.

• Library : neuralnet
• Training data set,technical knowledge score, communication skill
score placed
• TKS=c(20,10,30,20,80,30)
• CSS=c(90,20,40,50,50,80)
• Placed=c(1,0,0,0,1,1)
• Test data set:
• TKS=c(30,40,10,34,67)
• CSS=c(85,50,10,55,80)

16
Thank you

17

You might also like