SlideShare uma empresa Scribd logo
1 de 11
PROGRAMMING CRASH COURSE
KEDS BIODESIGNS
WEEK :111
CLASS : 8
SESSION : LOGISTIC REGRESSION & SVM
INTRODUCTION TO LOGISTIC REGRESSION
 Logistic regression is a supervised learning classification algorithm used to predict the probability of a
target variable. The nature of target or dependent variable is dichotomous, which means there would be
only two possible classes.
 In simple words, the dependent variable is binary in nature having data coded as either 1 (stands for
success/yes) or 0 (stands for failure/no).
 Mathematically, a logistic regression model predicts P(Y=1) as a function of X. It is one of the simplest
ML algorithms that can be used for various classification problems such as spam detection, Diabetes
prediction, cancer detection etc
TYPES OF LOGISTIC REGRESSION
Generally, logistic regression means binary logistic regression having binary target variables, but there can
be two more categories of target variables that can be predicted by it. Based on those number of
categories, Logistic regression can be divided into following types
 Binary or Binomial
 Multinomial
 Ordinal
Binary or Binomial
 In such a kind of classification, a dependent variable will have only two possible types either 1 and 0.
example, these variables may represent success or failure, yes or no, win or loss etc.
Multinomial
 In such a kind of classification, dependent variable can have 3 or more possible unordered types or
types having no quantitative significance. For example, these variables may represent “Type A” or
B” or “Type C”.
Ordinal
 In such a kind of classification, dependent variable can have 3 or more possible ordered types or the
types having a quantitative significance. For example, these variables may represent “poor” or “good”,
“very good”, “Excellent” and each category can have the scores like 0,1,2,3.
LOGISTIC REGRESSION ASSUMPTIONS
 Before diving into the implementation of logistic regression, we must be aware of the following
assumptions about the same.
 In case of binary logistic regression, the target variables must be binary always and the desired outcome
is represented by the factor level 1.
 There should not be any multi - collinearity in the model, which means the independent variables must
be independent of each other.
 We must include meaningful variables in our model.
 We should choose a large sample size for logistic regression.
REGRESSION MODELS
 Binary Logistic Regression Model − The simplest form of logistic regression is binary or binomial logistic
regression in which the target or dependent variable can have only 2 possible types either 1 or 0.
 Multinomial Logistic Regression Model − Another useful form of logistic regression is multinomial
logistic regression in which the target or dependent variable can have 3 or more
possible unordered types i.e. the types having no quantitative significance.
INTRODUCTION TO SVM
 Support Vector Machine (SVM) was first heard in 1992, introduced by Boser, Guyon, and Vapnik in
COLT-92. ... In another terms, Support Vector Machine (SVM) is a classification and regression prediction
tool that uses machine learning theory to maximize predictive accuracy while automatically avoiding
over-fit to the data.
 Support vector machines (SVMs) are powerful yet flexible supervised machine learning algorithms which
are used both for classification and regression. But generally, they are used in classification problems. In
1960s, SVMs were first introduced but later they got refined in 1990. SVMs have their unique way of
implementation as compared to other machine learning algorithms. Lately, they are extremely popular
because of their ability to handle multiple continuous and categorical variables.
WORKING OF SVM
 An SVM model is basically a representation of different classes in a hyperplane in multidimensional
space. The hyperplane will be generated in an iterative manner by SVM so that the error can be
minimized. The goal of SVM is to divide the datasets into classes to find a maximum marginal
hyperplane (MMH).
CONCEPTS IN SVM
 Support Vectors − Data points that are closest to the hyperplane is called support vectors. Separating
line will be defined with the help of these data points.
 Hyperplane − As we can see in the above diagram, it is a decision plane or space which is divided
between a set of objects having different classes.
 Margin − It may be defined as the gap between two lines on the closet data points of different classes.
It can be calculated as the perpendicular distance from the line to the support vectors. Large margin is
considered as a good margin and small margin is considered as a bad margin.
 The main goal of SVM is to divide the datasets into classes to find a maximum marginal hyperplane
(MMH) and it can be done in the following two steps −
 First, SVM will generate hyper planes iteratively that segregates the classes in best way.
 Then, it will choose the hyperplane that separates the classes correctly.
VIDEO ABOUT MACHINE LEARNING
NEXT SESSION
IMPLEMENTING SVM IN PYTHON

Mais conteúdo relacionado

Semelhante a Machine learning session 8

Multinomial Logistic Regression.pdf
Multinomial Logistic Regression.pdfMultinomial Logistic Regression.pdf
Multinomial Logistic Regression.pdf
AlemAyahu
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
saba khan
 
ASCE_ChingHuei_Rev00..
ASCE_ChingHuei_Rev00..ASCE_ChingHuei_Rev00..
ASCE_ChingHuei_Rev00..
butest
 
ASCE_ChingHuei_Rev00..
ASCE_ChingHuei_Rev00..ASCE_ChingHuei_Rev00..
ASCE_ChingHuei_Rev00..
butest
 
Logistic Regression in machine learning.docx
Logistic Regression in machine learning.docxLogistic Regression in machine learning.docx
Logistic Regression in machine learning.docx
AbhaBansal8
 

Semelhante a Machine learning session 8 (20)

Machine Learning Unit 3 Semester 3 MSc IT Part 2 Mumbai University
Machine Learning Unit 3 Semester 3  MSc IT Part 2 Mumbai UniversityMachine Learning Unit 3 Semester 3  MSc IT Part 2 Mumbai University
Machine Learning Unit 3 Semester 3 MSc IT Part 2 Mumbai University
 
Multinomial Logistic Regression.pdf
Multinomial Logistic Regression.pdfMultinomial Logistic Regression.pdf
Multinomial Logistic Regression.pdf
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
Performance evaluation of hepatitis diagnosis using single and multi classifi...
Performance evaluation of hepatitis diagnosis using single and multi classifi...Performance evaluation of hepatitis diagnosis using single and multi classifi...
Performance evaluation of hepatitis diagnosis using single and multi classifi...
 
Introduction to Limited Dependent variable
Introduction to Limited Dependent variableIntroduction to Limited Dependent variable
Introduction to Limited Dependent variable
 
ASCE_ChingHuei_Rev00..
ASCE_ChingHuei_Rev00..ASCE_ChingHuei_Rev00..
ASCE_ChingHuei_Rev00..
 
ASCE_ChingHuei_Rev00..
ASCE_ChingHuei_Rev00..ASCE_ChingHuei_Rev00..
ASCE_ChingHuei_Rev00..
 
Ai saturdays presentation
Ai saturdays presentationAi saturdays presentation
Ai saturdays presentation
 
ML Softmax JP 24.pptx
ML Softmax JP 24.pptxML Softmax JP 24.pptx
ML Softmax JP 24.pptx
 
Logistic Regression in machine learning.docx
Logistic Regression in machine learning.docxLogistic Regression in machine learning.docx
Logistic Regression in machine learning.docx
 
Discriminant analysis.pptx
Discriminant analysis.pptxDiscriminant analysis.pptx
Discriminant analysis.pptx
 
Penalized Logistic Regression methods .pptx
Penalized Logistic Regression methods .pptxPenalized Logistic Regression methods .pptx
Penalized Logistic Regression methods .pptx
 
3. Regression.pdf
3. Regression.pdf3. Regression.pdf
3. Regression.pdf
 
Multinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsMultinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationships
 
35000120030_Aritra Kundu_Operations Research.pdf
35000120030_Aritra Kundu_Operations Research.pdf35000120030_Aritra Kundu_Operations Research.pdf
35000120030_Aritra Kundu_Operations Research.pdf
 
7. logistics regression using spss
7. logistics regression using spss7. logistics regression using spss
7. logistics regression using spss
 
Regression analysis and its type
Regression analysis and its typeRegression analysis and its type
Regression analysis and its type
 
CHAPTER 11 LOGISTIC REGRESSION.pptx
CHAPTER 11 LOGISTIC REGRESSION.pptxCHAPTER 11 LOGISTIC REGRESSION.pptx
CHAPTER 11 LOGISTIC REGRESSION.pptx
 
Supervised Learning.pptx
Supervised Learning.pptxSupervised Learning.pptx
Supervised Learning.pptx
 
Classification-Support Vector Machines.pptx
Classification-Support Vector Machines.pptxClassification-Support Vector Machines.pptx
Classification-Support Vector Machines.pptx
 

Mais de NirsandhG

Mais de NirsandhG (11)

Machine learning session 10
Machine learning session 10Machine learning session 10
Machine learning session 10
 
Machine learning session 9
Machine learning session 9Machine learning session 9
Machine learning session 9
 
Machine learning session 7
Machine learning session 7Machine learning session 7
Machine learning session 7
 
Machine learning session 5
Machine learning session 5Machine learning session 5
Machine learning session 5
 
Machine learning session 4
Machine learning session 4Machine learning session 4
Machine learning session 4
 
Machine learning session 3
Machine learning session 3Machine learning session 3
Machine learning session 3
 
Machine learning session 1
Machine learning session 1Machine learning session 1
Machine learning session 1
 
Augmented reality session 5
Augmented reality session 5Augmented reality session 5
Augmented reality session 5
 
Augmented reality session 4
Augmented reality session 4Augmented reality session 4
Augmented reality session 4
 
Augmented reality session 3
Augmented reality session 3Augmented reality session 3
Augmented reality session 3
 
Augmented reality session 2
Augmented reality session 2Augmented reality session 2
Augmented reality session 2
 

Último

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

Machine learning session 8

  • 1. PROGRAMMING CRASH COURSE KEDS BIODESIGNS WEEK :111 CLASS : 8 SESSION : LOGISTIC REGRESSION & SVM
  • 2. INTRODUCTION TO LOGISTIC REGRESSION  Logistic regression is a supervised learning classification algorithm used to predict the probability of a target variable. The nature of target or dependent variable is dichotomous, which means there would be only two possible classes.  In simple words, the dependent variable is binary in nature having data coded as either 1 (stands for success/yes) or 0 (stands for failure/no).  Mathematically, a logistic regression model predicts P(Y=1) as a function of X. It is one of the simplest ML algorithms that can be used for various classification problems such as spam detection, Diabetes prediction, cancer detection etc
  • 3. TYPES OF LOGISTIC REGRESSION Generally, logistic regression means binary logistic regression having binary target variables, but there can be two more categories of target variables that can be predicted by it. Based on those number of categories, Logistic regression can be divided into following types  Binary or Binomial  Multinomial  Ordinal
  • 4. Binary or Binomial  In such a kind of classification, a dependent variable will have only two possible types either 1 and 0. example, these variables may represent success or failure, yes or no, win or loss etc. Multinomial  In such a kind of classification, dependent variable can have 3 or more possible unordered types or types having no quantitative significance. For example, these variables may represent “Type A” or B” or “Type C”. Ordinal  In such a kind of classification, dependent variable can have 3 or more possible ordered types or the types having a quantitative significance. For example, these variables may represent “poor” or “good”, “very good”, “Excellent” and each category can have the scores like 0,1,2,3.
  • 5. LOGISTIC REGRESSION ASSUMPTIONS  Before diving into the implementation of logistic regression, we must be aware of the following assumptions about the same.  In case of binary logistic regression, the target variables must be binary always and the desired outcome is represented by the factor level 1.  There should not be any multi - collinearity in the model, which means the independent variables must be independent of each other.  We must include meaningful variables in our model.  We should choose a large sample size for logistic regression.
  • 6. REGRESSION MODELS  Binary Logistic Regression Model − The simplest form of logistic regression is binary or binomial logistic regression in which the target or dependent variable can have only 2 possible types either 1 or 0.  Multinomial Logistic Regression Model − Another useful form of logistic regression is multinomial logistic regression in which the target or dependent variable can have 3 or more possible unordered types i.e. the types having no quantitative significance.
  • 7. INTRODUCTION TO SVM  Support Vector Machine (SVM) was first heard in 1992, introduced by Boser, Guyon, and Vapnik in COLT-92. ... In another terms, Support Vector Machine (SVM) is a classification and regression prediction tool that uses machine learning theory to maximize predictive accuracy while automatically avoiding over-fit to the data.  Support vector machines (SVMs) are powerful yet flexible supervised machine learning algorithms which are used both for classification and regression. But generally, they are used in classification problems. In 1960s, SVMs were first introduced but later they got refined in 1990. SVMs have their unique way of implementation as compared to other machine learning algorithms. Lately, they are extremely popular because of their ability to handle multiple continuous and categorical variables.
  • 8. WORKING OF SVM  An SVM model is basically a representation of different classes in a hyperplane in multidimensional space. The hyperplane will be generated in an iterative manner by SVM so that the error can be minimized. The goal of SVM is to divide the datasets into classes to find a maximum marginal hyperplane (MMH).
  • 9. CONCEPTS IN SVM  Support Vectors − Data points that are closest to the hyperplane is called support vectors. Separating line will be defined with the help of these data points.  Hyperplane − As we can see in the above diagram, it is a decision plane or space which is divided between a set of objects having different classes.  Margin − It may be defined as the gap between two lines on the closet data points of different classes. It can be calculated as the perpendicular distance from the line to the support vectors. Large margin is considered as a good margin and small margin is considered as a bad margin.  The main goal of SVM is to divide the datasets into classes to find a maximum marginal hyperplane (MMH) and it can be done in the following two steps −  First, SVM will generate hyper planes iteratively that segregates the classes in best way.  Then, it will choose the hyperplane that separates the classes correctly.