SlideShare a Scribd company logo
1 of 15
LR&LDA
Logistic Regression (Intuition)
 Logistic Regression main to slove(Binary question)
 Find a logistic regression function to predict event will happen or not
 「people get disease or not」、「company bankrupt or not」
 example:probability of a successful reaction at a certain temperature
2
real
observed
values
succes
s
fail
temperature
Logit function
 Logit function: 𝜎 𝑡 =
1
1+𝑒−𝑡
t = -∞,exp(∞) = ∞
σ(-∞) = 1/(1+∞) = 0
t = 0,exp(0) = 1
σ(0) = 1/(1+1) = 0.5
t =∞,exp(-∞) = 0
σ(∞) = 1/(1+0) = 1
3
Logistic Regression (Intuition)
4
X1: ROA(B)0
X1: ROA(B)
Y
0
1
Y 𝑥 =
1
1 + 𝑒−(𝛽0+𝛽1 𝑋1)
Logistic Regression
0.5
noraml
bankruptcy
Y
1
p
New sample
?
Logistic Regression (Requirement)
1. Can handle not normal distribution data
 Logistic regression can handle not normal distribution data,
because it use non-linear log transformation
2. Cannot has collinearity (共線性)
 One independent variable can be others independent variables
linear combination
 example: two independent variables X1, X2,complete collinearity
means X1 = a + bX2
3. Dependent variable(Y) need to be binary distribution
,example:(0, 1)
5
Logistic Regression (Solution)
 Logistic Regression by Logit function(𝜎 𝑡 ) calculate
「 maximum likelihood 」to find coefficient of logit function
 Purpose:After put training sample into logit function,find
Residuals sum minimum logit function coefficient
case0 probability more close to 0,
case1 probability more close to 1
6
Residuals
Y = σ(β0+β1X1+β2X2+β3X3+……+βiXi), 𝜎 𝑡 =
1
1+𝑒−𝑡
Example
7
Y 𝑥 =
1
1 + 𝑒−(𝛽0+𝛽1 𝑋1)
R1: Y 𝑥 =
1
1+𝑒−(1+𝑋1)
Normal Residuals : 0.88+0.92+0.94+0.95+0.97+0.98 = 5.64
Bankruptcy Residuals : 6-(1+1+1+1+1+1) = 0
Sum: 5.64
R2: Y 𝑥 =
1
1+𝑒−(−298+81𝑋1)
Normal Residuals : 0+0+0+0+0+0 = 0
Bankruptcy Residuals : 6-(1+1+1+1+1+1) = 0
Sum: 0
Y 𝑥 =
1
1 + 𝑒−(1+𝑋1)
Y 𝑥 =
1
1 + 𝑒−(−298+81𝑋1)
Discriminant Analysis (Intuition)
 Discriminant Analysis
 We know classified group,when new sample coming we can choose a classify
standard to determine which group should new sample should classify into.
 example:medical disease classification of patient, company financial status
classification
8
Binary Logistic regression (BLR) vs
Linear Discriminant analysis (with 2 groups: also known as
Fisher's LDA)
BLR
1. Not so exigent to the level of the
scale and the form of the
distribution in predictors
2. Not so sensitive to outliers
LDA
1. Predictirs desirably interval level
with multivariate normal
distribution.
2. Quite sensitive to outliers.
Linear Discriminant Analysis V.S. Logistic
Regression(example_1)
Sample data are two classes data are normal distribution
Class_1
(blue dot)
-2 -0.90909 0.181818 1.272727 2.363636 3.454545 4.545455 5.636364 6.727273 7.818182 8.909091 10
Class_2
(red dot)
-10 -8.90909 -7.81818 -6.72727 -5.63636 -4.54545 -3.45455 -2.36364 -1.27273 -0.18182 0.909091 2
Class_1 is average split 12 dots from 10
to -2
Class_2 is average split 12 dots from 2 to
-10
Linear Discriminant Analysis V.S. Logistic
Regression(example_1)
LDA: f(x) = 0.5171*x + 0
Accuracy = 83% = 20/24
Linear Discriminant Analysis Logistic Regression
Accuracy = 83% = 20/24
LR: f(x) = 0.593*x + 9.17253168582249e-17
Linear Discriminant Analysis V.S. Logistic
Regression(example_2)
Class_1
(blue dot)
8 8.285714 8.571429 8.857143 9.142857 9.428571 9.714286 10 -3 -0.66667 1.666667 4
Class_2
(red dot)
-10 -7.42857 -4.85714 -2.28571 0.285714 2.857143 5.428571 8 -4 -1.66667 0.666667 3
Sample data are two classes data are non normal
distribution
Linear Discriminant Analysis V.S. Logistic
Regression(example_2)
LDA: f(x) = 0.2917*x + -0.7764
Accuracy = 70.8% = 17/24
Linear Discriminant Analysis Logistic Regression
Accuracy = 75% = 18/24
LR: f(x) = 0.2795*x + (-0.8236)
Sample data are two classes data are normal distribution
One of them has Outlier
Linear Discriminant Analysis V.S. Logistic
Regression(example_3)
Class_1
(blue dot)
-2 -0.8 0.4 1.6 2.8 4 5.2 6.4 7.6 8.8 10
20(Outlie
r)
Class_2
(red dot)
-10 -8.90909 -7.81818 -6.72727 -5.63636 -4.54545 -3.45455 -2.36364 -1.27273 -0.18182 0.909091 2
Outlier
Class_1 is average split 12 dots from 10 to -2
Class_2 is average split 12 dots from 2 to -10
LDA: f(x) = 0.3646*x + -0.243
Accuracy = 79.2% = 19/24
Linear Discriminant Analysis Logistic Regression
Accuracy = 83% = 20/24
LR: f(x) = 0.5869*x + (-0.0834)
Linear Discriminant Analysis V.S. Logistic
Regression(example_3)

More Related Content

What's hot

ΠΛΗ20 ΕΠΑΝΑΛΗΨΗ 4
ΠΛΗ20 ΕΠΑΝΑΛΗΨΗ 4ΠΛΗ20 ΕΠΑΝΑΛΗΨΗ 4
ΠΛΗ20 ΕΠΑΝΑΛΗΨΗ 4Dimitris Psounis
 
統計的学習の基礎 第2章後半
統計的学習の基礎 第2章後半統計的学習の基礎 第2章後半
統計的学習の基礎 第2章後半Prunus 1350
 
PRML 4.1 Discriminant Function
PRML 4.1 Discriminant FunctionPRML 4.1 Discriminant Function
PRML 4.1 Discriminant FunctionShintaro Takemura
 
【博士論文発表会】パラメータ制約付き特異モデルの統計的学習理論
【博士論文発表会】パラメータ制約付き特異モデルの統計的学習理論【博士論文発表会】パラメータ制約付き特異モデルの統計的学習理論
【博士論文発表会】パラメータ制約付き特異モデルの統計的学習理論Naoki Hayashi
 
みどりぼん3章前半
みどりぼん3章前半みどりぼん3章前半
みどりぼん3章前半Akifumi Eguchi
 
PCA (Principal Component Analysis)
PCA (Principal Component Analysis)PCA (Principal Component Analysis)
PCA (Principal Component Analysis)Jungho Park
 
PRML上巻勉強会 at 東京大学 資料 第2章2.3.3 〜 2.5.2
PRML上巻勉強会 at 東京大学 資料 第2章2.3.3 〜 2.5.2PRML上巻勉強会 at 東京大学 資料 第2章2.3.3 〜 2.5.2
PRML上巻勉強会 at 東京大学 資料 第2章2.3.3 〜 2.5.2Hiroyuki Kato
 
多変量解析の一般化
多変量解析の一般化多変量解析の一般化
多変量解析の一般化Akisato Kimura
 
パターン認識と機械学習 §8.3.4 有向グラフとの関係
パターン認識と機械学習 §8.3.4 有向グラフとの関係パターン認識と機械学習 §8.3.4 有向グラフとの関係
パターン認識と機械学習 §8.3.4 有向グラフとの関係Prunus 1350
 
機会学習ハッカソン:ランダムフォレスト
機会学習ハッカソン:ランダムフォレスト機会学習ハッカソン:ランダムフォレスト
機会学習ハッカソン:ランダムフォレストTeppei Baba
 
Διαγώνισμα προσομοίωσης Γ Λυκείου 2ο Καζούλλειο Ρόδου
Διαγώνισμα προσομοίωσης Γ Λυκείου 2ο Καζούλλειο ΡόδουΔιαγώνισμα προσομοίωσης Γ Λυκείου 2ο Καζούλλειο Ρόδου
Διαγώνισμα προσομοίωσης Γ Λυκείου 2ο Καζούλλειο ΡόδουΜάκης Χατζόπουλος
 
Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)Robert Almazan
 
Intro to Model Selection
Intro to Model SelectionIntro to Model Selection
Intro to Model Selectionchenhm
 
ガウス過程入門
ガウス過程入門ガウス過程入門
ガウス過程入門ShoShimoyama
 

What's hot (20)

ΠΛΗ20 ΕΠΑΝΑΛΗΨΗ 4
ΠΛΗ20 ΕΠΑΝΑΛΗΨΗ 4ΠΛΗ20 ΕΠΑΝΑΛΗΨΗ 4
ΠΛΗ20 ΕΠΑΝΑΛΗΨΗ 4
 
ゼロから作るDeepLearning 4章 輪読
ゼロから作るDeepLearning 4章 輪読ゼロから作るDeepLearning 4章 輪読
ゼロから作るDeepLearning 4章 輪読
 
統計的学習の基礎 第2章後半
統計的学習の基礎 第2章後半統計的学習の基礎 第2章後半
統計的学習の基礎 第2章後半
 
PRML 4.1 Discriminant Function
PRML 4.1 Discriminant FunctionPRML 4.1 Discriminant Function
PRML 4.1 Discriminant Function
 
【博士論文発表会】パラメータ制約付き特異モデルの統計的学習理論
【博士論文発表会】パラメータ制約付き特異モデルの統計的学習理論【博士論文発表会】パラメータ制約付き特異モデルの統計的学習理論
【博士論文発表会】パラメータ制約付き特異モデルの統計的学習理論
 
PRML 2.3節
PRML 2.3節PRML 2.3節
PRML 2.3節
 
Convex Hull Algorithms
Convex Hull AlgorithmsConvex Hull Algorithms
Convex Hull Algorithms
 
みどりぼん3章前半
みどりぼん3章前半みどりぼん3章前半
みどりぼん3章前半
 
PCA (Principal Component Analysis)
PCA (Principal Component Analysis)PCA (Principal Component Analysis)
PCA (Principal Component Analysis)
 
PRML上巻勉強会 at 東京大学 資料 第2章2.3.3 〜 2.5.2
PRML上巻勉強会 at 東京大学 資料 第2章2.3.3 〜 2.5.2PRML上巻勉強会 at 東京大学 資料 第2章2.3.3 〜 2.5.2
PRML上巻勉強会 at 東京大学 資料 第2章2.3.3 〜 2.5.2
 
多変量解析の一般化
多変量解析の一般化多変量解析の一般化
多変量解析の一般化
 
ΠΛΗ30 ΜΑΘΗΜΑ 6.2
ΠΛΗ30 ΜΑΘΗΜΑ 6.2ΠΛΗ30 ΜΑΘΗΜΑ 6.2
ΠΛΗ30 ΜΑΘΗΜΑ 6.2
 
パターン認識と機械学習 §8.3.4 有向グラフとの関係
パターン認識と機械学習 §8.3.4 有向グラフとの関係パターン認識と機械学習 §8.3.4 有向グラフとの関係
パターン認識と機械学習 §8.3.4 有向グラフとの関係
 
機会学習ハッカソン:ランダムフォレスト
機会学習ハッカソン:ランダムフォレスト機会学習ハッカソン:ランダムフォレスト
機会学習ハッカソン:ランダムフォレスト
 
Huffman Encoding Pr
Huffman Encoding PrHuffman Encoding Pr
Huffman Encoding Pr
 
Bayesian statistics
Bayesian  statisticsBayesian  statistics
Bayesian statistics
 
Διαγώνισμα προσομοίωσης Γ Λυκείου 2ο Καζούλλειο Ρόδου
Διαγώνισμα προσομοίωσης Γ Λυκείου 2ο Καζούλλειο ΡόδουΔιαγώνισμα προσομοίωσης Γ Λυκείου 2ο Καζούλλειο Ρόδου
Διαγώνισμα προσομοίωσης Γ Λυκείου 2ο Καζούλλειο Ρόδου
 
Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)
 
Intro to Model Selection
Intro to Model SelectionIntro to Model Selection
Intro to Model Selection
 
ガウス過程入門
ガウス過程入門ガウス過程入門
ガウス過程入門
 

Similar to LR vs LDA

Ch 6 Slides.doc/9929292929292919299292@:&:&:&9/92
Ch 6 Slides.doc/9929292929292919299292@:&:&:&9/92Ch 6 Slides.doc/9929292929292919299292@:&:&:&9/92
Ch 6 Slides.doc/9929292929292919299292@:&:&:&9/92ohenebabismark508
 
Further Discrete Random Variables
Further Discrete Random VariablesFurther Discrete Random Variables
Further Discrete Random VariablesJJkedst
 
Density theorems for anisotropic point configurations
Density theorems for anisotropic point configurationsDensity theorems for anisotropic point configurations
Density theorems for anisotropic point configurationsVjekoslavKovac1
 
Week05 exercise
Week05 exerciseWeek05 exercise
Week05 exercisehenry KKK
 
Generalized linear model
Generalized linear modelGeneralized linear model
Generalized linear modelRahul Rockers
 
Data-Handling part 2.ppt
Data-Handling part 2.pptData-Handling part 2.ppt
Data-Handling part 2.pptAhmadHashlamon
 
Pydata Katya Vasilaky
Pydata Katya VasilakyPydata Katya Vasilaky
Pydata Katya Vasilakyknv4
 
Cs221 lecture4-fall11
Cs221 lecture4-fall11Cs221 lecture4-fall11
Cs221 lecture4-fall11darwinrlo
 
Machine Learning - Regression model
Machine Learning - Regression modelMachine Learning - Regression model
Machine Learning - Regression modelRADO7900
 
ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)CrackDSE
 
2012 mdsp pr13 support vector machine
2012 mdsp pr13 support vector machine2012 mdsp pr13 support vector machine
2012 mdsp pr13 support vector machinenozomuhamada
 
Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...
Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...
Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...Michael Lie
 
Stochastic Differential Equations: Application to Pension Funds under Adverse...
Stochastic Differential Equations: Application to Pension Funds under Adverse...Stochastic Differential Equations: Application to Pension Funds under Adverse...
Stochastic Differential Equations: Application to Pension Funds under Adverse...Marius García Meza
 
Interpreting Logistic Regression.pptx
Interpreting Logistic Regression.pptxInterpreting Logistic Regression.pptx
Interpreting Logistic Regression.pptxGairuzazmiMGhani
 
Calculus - Functions Review
Calculus - Functions ReviewCalculus - Functions Review
Calculus - Functions Reviewhassaanciit
 

Similar to LR vs LDA (20)

Ch 6 Slides.doc/9929292929292919299292@:&:&:&9/92
Ch 6 Slides.doc/9929292929292919299292@:&:&:&9/92Ch 6 Slides.doc/9929292929292919299292@:&:&:&9/92
Ch 6 Slides.doc/9929292929292919299292@:&:&:&9/92
 
Further Discrete Random Variables
Further Discrete Random VariablesFurther Discrete Random Variables
Further Discrete Random Variables
 
Chapter5.pdf.pdf
Chapter5.pdf.pdfChapter5.pdf.pdf
Chapter5.pdf.pdf
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
Density theorems for anisotropic point configurations
Density theorems for anisotropic point configurationsDensity theorems for anisotropic point configurations
Density theorems for anisotropic point configurations
 
Week05 exercise
Week05 exerciseWeek05 exercise
Week05 exercise
 
Generalized linear model
Generalized linear modelGeneralized linear model
Generalized linear model
 
Ada boost
Ada boostAda boost
Ada boost
 
Data-Handling part 2.ppt
Data-Handling part 2.pptData-Handling part 2.ppt
Data-Handling part 2.ppt
 
Ch02 5
Ch02 5Ch02 5
Ch02 5
 
Pydata Katya Vasilaky
Pydata Katya VasilakyPydata Katya Vasilaky
Pydata Katya Vasilaky
 
Cs221 lecture4-fall11
Cs221 lecture4-fall11Cs221 lecture4-fall11
Cs221 lecture4-fall11
 
Machine Learning - Regression model
Machine Learning - Regression modelMachine Learning - Regression model
Machine Learning - Regression model
 
ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)
 
2012 mdsp pr13 support vector machine
2012 mdsp pr13 support vector machine2012 mdsp pr13 support vector machine
2012 mdsp pr13 support vector machine
 
Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...
Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...
Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...
 
SVM for Regression
SVM for RegressionSVM for Regression
SVM for Regression
 
Stochastic Differential Equations: Application to Pension Funds under Adverse...
Stochastic Differential Equations: Application to Pension Funds under Adverse...Stochastic Differential Equations: Application to Pension Funds under Adverse...
Stochastic Differential Equations: Application to Pension Funds under Adverse...
 
Interpreting Logistic Regression.pptx
Interpreting Logistic Regression.pptxInterpreting Logistic Regression.pptx
Interpreting Logistic Regression.pptx
 
Calculus - Functions Review
Calculus - Functions ReviewCalculus - Functions Review
Calculus - Functions Review
 

More from kalung0313

Stacking ensemble
Stacking ensembleStacking ensemble
Stacking ensemblekalung0313
 
Bagging ensemble
Bagging ensembleBagging ensemble
Bagging ensemblekalung0313
 
Fourier transforms
Fourier transformsFourier transforms
Fourier transformskalung0313
 
Pca(principal components analysis)
Pca(principal components analysis)Pca(principal components analysis)
Pca(principal components analysis)kalung0313
 
FLDA(fisher linear discriminant analysis)
FLDA(fisher linear discriminant analysis)FLDA(fisher linear discriminant analysis)
FLDA(fisher linear discriminant analysis)kalung0313
 
Decision tree of cart
Decision tree of cartDecision tree of cart
Decision tree of cartkalung0313
 
Tests of hypothesis
Tests of hypothesisTests of hypothesis
Tests of hypothesiskalung0313
 

More from kalung0313 (8)

Stacking ensemble
Stacking ensembleStacking ensemble
Stacking ensemble
 
Bagging ensemble
Bagging ensembleBagging ensemble
Bagging ensemble
 
Fourier transforms
Fourier transformsFourier transforms
Fourier transforms
 
Pca(principal components analysis)
Pca(principal components analysis)Pca(principal components analysis)
Pca(principal components analysis)
 
FLDA(fisher linear discriminant analysis)
FLDA(fisher linear discriminant analysis)FLDA(fisher linear discriminant analysis)
FLDA(fisher linear discriminant analysis)
 
Decision tree of cart
Decision tree of cartDecision tree of cart
Decision tree of cart
 
adaboost
adaboostadaboost
adaboost
 
Tests of hypothesis
Tests of hypothesisTests of hypothesis
Tests of hypothesis
 

Recently uploaded

What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 

Recently uploaded (20)

What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 

LR vs LDA

  • 2. Logistic Regression (Intuition)  Logistic Regression main to slove(Binary question)  Find a logistic regression function to predict event will happen or not  「people get disease or not」、「company bankrupt or not」  example:probability of a successful reaction at a certain temperature 2 real observed values succes s fail temperature
  • 3. Logit function  Logit function: 𝜎 𝑡 = 1 1+𝑒−𝑡 t = -∞,exp(∞) = ∞ σ(-∞) = 1/(1+∞) = 0 t = 0,exp(0) = 1 σ(0) = 1/(1+1) = 0.5 t =∞,exp(-∞) = 0 σ(∞) = 1/(1+0) = 1 3
  • 4. Logistic Regression (Intuition) 4 X1: ROA(B)0 X1: ROA(B) Y 0 1 Y 𝑥 = 1 1 + 𝑒−(𝛽0+𝛽1 𝑋1) Logistic Regression 0.5 noraml bankruptcy Y 1 p New sample ?
  • 5. Logistic Regression (Requirement) 1. Can handle not normal distribution data  Logistic regression can handle not normal distribution data, because it use non-linear log transformation 2. Cannot has collinearity (共線性)  One independent variable can be others independent variables linear combination  example: two independent variables X1, X2,complete collinearity means X1 = a + bX2 3. Dependent variable(Y) need to be binary distribution ,example:(0, 1) 5
  • 6. Logistic Regression (Solution)  Logistic Regression by Logit function(𝜎 𝑡 ) calculate 「 maximum likelihood 」to find coefficient of logit function  Purpose:After put training sample into logit function,find Residuals sum minimum logit function coefficient case0 probability more close to 0, case1 probability more close to 1 6 Residuals Y = σ(β0+β1X1+β2X2+β3X3+……+βiXi), 𝜎 𝑡 = 1 1+𝑒−𝑡
  • 7. Example 7 Y 𝑥 = 1 1 + 𝑒−(𝛽0+𝛽1 𝑋1) R1: Y 𝑥 = 1 1+𝑒−(1+𝑋1) Normal Residuals : 0.88+0.92+0.94+0.95+0.97+0.98 = 5.64 Bankruptcy Residuals : 6-(1+1+1+1+1+1) = 0 Sum: 5.64 R2: Y 𝑥 = 1 1+𝑒−(−298+81𝑋1) Normal Residuals : 0+0+0+0+0+0 = 0 Bankruptcy Residuals : 6-(1+1+1+1+1+1) = 0 Sum: 0 Y 𝑥 = 1 1 + 𝑒−(1+𝑋1) Y 𝑥 = 1 1 + 𝑒−(−298+81𝑋1)
  • 8. Discriminant Analysis (Intuition)  Discriminant Analysis  We know classified group,when new sample coming we can choose a classify standard to determine which group should new sample should classify into.  example:medical disease classification of patient, company financial status classification 8
  • 9. Binary Logistic regression (BLR) vs Linear Discriminant analysis (with 2 groups: also known as Fisher's LDA) BLR 1. Not so exigent to the level of the scale and the form of the distribution in predictors 2. Not so sensitive to outliers LDA 1. Predictirs desirably interval level with multivariate normal distribution. 2. Quite sensitive to outliers.
  • 10. Linear Discriminant Analysis V.S. Logistic Regression(example_1) Sample data are two classes data are normal distribution Class_1 (blue dot) -2 -0.90909 0.181818 1.272727 2.363636 3.454545 4.545455 5.636364 6.727273 7.818182 8.909091 10 Class_2 (red dot) -10 -8.90909 -7.81818 -6.72727 -5.63636 -4.54545 -3.45455 -2.36364 -1.27273 -0.18182 0.909091 2 Class_1 is average split 12 dots from 10 to -2 Class_2 is average split 12 dots from 2 to -10
  • 11. Linear Discriminant Analysis V.S. Logistic Regression(example_1) LDA: f(x) = 0.5171*x + 0 Accuracy = 83% = 20/24 Linear Discriminant Analysis Logistic Regression Accuracy = 83% = 20/24 LR: f(x) = 0.593*x + 9.17253168582249e-17
  • 12. Linear Discriminant Analysis V.S. Logistic Regression(example_2) Class_1 (blue dot) 8 8.285714 8.571429 8.857143 9.142857 9.428571 9.714286 10 -3 -0.66667 1.666667 4 Class_2 (red dot) -10 -7.42857 -4.85714 -2.28571 0.285714 2.857143 5.428571 8 -4 -1.66667 0.666667 3 Sample data are two classes data are non normal distribution
  • 13. Linear Discriminant Analysis V.S. Logistic Regression(example_2) LDA: f(x) = 0.2917*x + -0.7764 Accuracy = 70.8% = 17/24 Linear Discriminant Analysis Logistic Regression Accuracy = 75% = 18/24 LR: f(x) = 0.2795*x + (-0.8236)
  • 14. Sample data are two classes data are normal distribution One of them has Outlier Linear Discriminant Analysis V.S. Logistic Regression(example_3) Class_1 (blue dot) -2 -0.8 0.4 1.6 2.8 4 5.2 6.4 7.6 8.8 10 20(Outlie r) Class_2 (red dot) -10 -8.90909 -7.81818 -6.72727 -5.63636 -4.54545 -3.45455 -2.36364 -1.27273 -0.18182 0.909091 2 Outlier Class_1 is average split 12 dots from 10 to -2 Class_2 is average split 12 dots from 2 to -10
  • 15. LDA: f(x) = 0.3646*x + -0.243 Accuracy = 79.2% = 19/24 Linear Discriminant Analysis Logistic Regression Accuracy = 83% = 20/24 LR: f(x) = 0.5869*x + (-0.0834) Linear Discriminant Analysis V.S. Logistic Regression(example_3)

Editor's Notes

  1. Logistic regression can handle all sorts of relationships, because it applies a non-linear log transformation Assumptions: The data Y1, Y2, ..., Yn are independently distributed, i.e., cases are independent. Distribution of Yi is Bin(ni, πi), i.e., binary logistic regression model assumes binomial distribution of the response. The dependent variable does NOT need to be normally distributed, but it typically assumes a distribution from an exponential family (e.g. binomial, Poisson, multinomial, normal,...) Does NOT assume a linear relationship between the dependent variable and the independent variables, but it does assume linear relationship between the logit of the response and the explanatory variables; logit(π) = β0 + βX. Independent (explanatory) variables can be even the power terms or some other nonlinear transformations of the original independent variables. The homogeneity of variance does NOT need to be satisfied. In fact, it is not even possible in many cases given the model structure. Errors need to be independent but NOT normally distributed. It uses maximum likelihood estimation (MLE) rather than ordinary least squares (OLS) to estimate the parameters, and thus relies on large-sample approximations. Goodness-of-fit measures rely on sufficiently large samples, where a heuristic rule is that not more than 20% of the expected cells counts are less than 5.
  2. Group_1 = linspace(-2, 10, 12) Group_2 = linspace(-10, 2, 12)