CLASSIFICATION: LOGISTIC REGRESSION Instructor: Dr. Chun Yu School of Statistics Jiangxi University of Finance and Economics Fall 2015.

Slides:



Advertisements
Similar presentations
Bayes rule, priors and maximum a posteriori
Advertisements

The Software Infrastructure for Electronic Commerce Databases and Data Mining Lecture 4: An Introduction To Data Mining (II) Johannes Gehrke
Two-sample tests. Binary or categorical outcomes (proportions) Outcome Variable Are the observations correlated?Alternative to the chi- square test if.
Prof. Navneet Goyal CS & IS BITS, Pilani
- Word counts - Speech error counts - Metaphor counts - Active construction counts Moving further Categorical count data.
Discrete Choice Modeling William Greene Stern School of Business IFS at UCL February 11-13, 2004
Hunt’s Algorithm CIT365: Data Mining & Data Warehousing Bajuna Salehe
Classification: Definition Given a collection of records (training set ) –Each record contains a set of attributes, one of the attributes is the class.
Statistics 202: Statistical Aspects of Data Mining
1 Data Mining Classification Techniques: Decision Trees (BUSINESS INTELLIGENCE) Slides prepared by Elizabeth Anglo, DISCS ADMU.
Decision Tree.
Week 3. Logistic Regression Overview and applications Additional issues Select Inputs Optimize complexity Transforming Inputs.
Normal Approximation of the Binomial Distribution.
CHAPTER 13: Binomial Distributions
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 6: Random Variables Section 6.3 Binomial and Geometric Random Variables.
© aSup Probability and Normal Distribution  1 PROBABILITY.
Lecture 1: Introduction
1 BUS 297D: Data Mining Professor David Mease Lecture 5 Agenda: 1) Go over midterm exam solutions 2) Assign HW #3 (Due Thurs 10/1) 3) Lecture over Chapter.
Modeling Wim Buysse RUFORUM 1 December 2006 Research Methods Group.
“Teach A Level Maths” Statistics 1
Thanks to Nir Friedman, HU
The Binomial Distribution. Introduction # correct TallyFrequencyP(experiment)P(theory) Mix the cards, select one & guess the type. Repeat 3 times.
Part 10: Qualitative Data 10-1/21 Regression Models Professor William Greene Stern School of Business IOMS Department Department of Economics.
Decision Tree Models in Data Mining
Binomial & Geometric Random Variables §6-3. Goals: Binomial settings and binomial random variables Binomial probabilities Mean and standard deviation.
Aim: How do we use binominal distribution for sample counts?
Binomial Distributions Calculating the Probability of Success.
The Binomial Distribution. Binomial Experiment.
Business and Finance College Principles of Statistics Eng. Heba Hamad 2008.
Logistic Regression Pre-Challenger Relation Between Temperature and Field-Joint O-Ring Failure Dalal, Fowlkes, and Hoadley (1989). “Risk Analysis of the.
1 Data Mining Lecture 3: Decision Trees. 2 Classification: Definition l Given a collection of records (training set ) –Each record contains a set of attributes,
Statistics Frequency and Distribution. We interrupt this lecture for the following… Significant digits You should not report numbers with more significant.
Unit 5 Section 5-4 – Day : The Binomial Distribution  The mean, variance, and standard deviation of a variable that has the binomial distribution.
Chapter 4 Classification. 2 Classification: Definition Given a collection of records (training set ) –Each record contains a set of attributes, one of.
Lecture 7. Outline 1. Overview of Classification and Decision Tree 2. Algorithm to build Decision Tree 3. Formula to measure information 4. Weka, data.
Data Mining: Classification & Predication Hosam Al-Samarraie, PhD. Centre for Instructional Technology & Multimedia Universiti Sains Malaysia.
Logistic Regression Debapriyo Majumdar Data Mining – Fall 2014 Indian Statistical Institute Kolkata September 1, 2014.
Binomial Experiment A binomial experiment (also known as a Bernoulli trial) is a statistical experiment that has the following properties:
Probability Distributions BINOMIAL DISTRIBUTION. Binomial Trials There are a specified number of repeated, independent trials There are a specified number.
By Sharath Kumar Aitha. Instructor: Dr. Dongchul Kim.
Chapter 14 Inference for Regression AP Statistics 14.1 – Inference about the Model 14.2 – Predictions and Conditions.
Section 5.2 Binomial Distribution HAWKES LEARNING SYSTEMS math courseware specialists Copyright © 2008 by Hawkes Learning Systems/Quant Systems, Inc. All.
Unit 11 Binomial Distribution IT Disicipline ITD1111 Discrete Mathematics & Statistics STDTLP 1 Unit 11 Binomial Distribution.
Linear Discriminant Analysis (LDA). Goal To classify observations into 2 or more groups based on k discriminant functions (Dependent variable Y is categorical.
Probability and Simulation Rules in Probability. Probability Rules 1. Any probability is a number between 0 and 1 0 ≤ P[A] ≤ 1 0 ≤ P[A] ≤ 1 2. The sum.
Linear Methods for Classification Based on Chapter 4 of Hastie, Tibshirani, and Friedman David Madigan.
DECISION TREE Ge Song. Introduction ■ Decision Tree: is a supervised learning algorithm used for classification or regression. ■ Decision Tree Graph:
Psychology 202a Advanced Psychological Statistics September 29, 2015.
Logistic Regression Saed Sayad 1www.ismartsoft.com.
1 Illustration of the Classification Task: Learning Algorithm Model.
16-3 The Binomial Probability Theorem. Let’s roll a die 3 times Look at the probability of getting a 6 or NOT getting a 6. Let’s make a tree diagram.
Binomial Distributions Chapter 5.3 – Probability Distributions and Predictions Mathematics of Data Management (Nelson) MDM 4U Authors: Gary Greer (with.
RECITATION 4 MAY 23 DPMM Splines with multiple predictors Classification and regression trees.
 Propensity Model  Propensity Model refers to Statistical Models predicting “willingness” to perform an action like accepting an offer etc. Acquisition.
Binomial Distribution (Dr. Monticino). Assignment Sheet  Read Chapter 15  Assignment # 9 (Due March 30 th )  Chapter 15  Exercise Set A: 1-6  Review.
Illustrating Classification Task
The binomial distribution
CHAPTER 6 Random Variables
Negative Binomial Experiment
Binomial and Geometric Random Variables
CHAPTER 14: Binomial Distributions*
Chapter 6 6.1/6.2 Probability Probability is the branch of mathematics that describes the pattern of chance outcomes.
10701 / Machine Learning.
Chapter 5 Sampling Distributions
CHAPTER 3: Bayesian Decision Theory
The Binomial and Geometric Distributions
Econometric Models The most basic econometric model consists of a relationship between two variables which is disturbed by a random error. We need to use.
Chapter 5 Sampling Distributions
Chapter 14 Inference for Regression
Machine Learning – a Probabilistic Perspective
Presentation transcript:

CLASSIFICATION: LOGISTIC REGRESSION Instructor: Dr. Chun Yu School of Statistics Jiangxi University of Finance and Economics Fall 2015

Dependent Variable Y In many regression applications the dependent variable y is categorical, we can describe it in binary fashion such that any outcome is either a success or a failure (arbitrarily defined) For example, tossing a coin, we can get either heads (success) or tails (failure) y=1, if outcome is success y=0, if outcome is failure If repeat the experiment for n times, then y follows a binomial distribution

Logistic Regression Model

Estimating P

Example Home owner Marital Status Taxable Income Defaulted Borrower Yes No Yes No Yes No Single Married Single Married Divorce Married Divorce Single Married Single 125k 100k 70k 120k 95k 60k 220k 85k 75k 90k No Yes No Yes No Yes

Inputted data HO=1 if “Yes”; HO=0 if “No” MS=1 if “single or divorce”; MS=0 if “married” Y=1 if “No”; Y=0 if “Yes” HOMSTIY

R Results for Logistic Regression > HO=c(1,0,0,1,0,0,1,0,0,0) > MS=c(1,0,1,0,1,0,1,1,0,1) > TI=c(125,100,70,120,95,60,220,85,75,90) > y=c(1,1,1,1,0,1,1,0,1,0) > mylogit <- glm(y ~ HO + MS + TI,family = "binomial") > mylogit$coef (Intercept) HO MS TI

Prediction HO=0, MS=1, TI=100, P=? The predicted P is: e-16 Classification? Home owner Marital Status Taxable Income Defaulted Borrower NoSingle100k?

Classification Error Rate ##Prediction on Training data and test data > ##correct classification rate > sum((newdata3$PredictedProb-trainData$y)<0.0001)/ nrow(trainData) [1] 1 > sum((newdata3$PredictedProb-testData$y)<0.0001)/ nrow(testData) [1] 1

Decision Tree Classification > myFormula <- y ~ HO+MS+TI > loan_ctree <- ctree(myFormula, data=trainData) > # check the prediction > testPred <- predict(loan_ctree, newdata = testData) > table(testPred, testData$y) testPred 0 1 misclassification

Thank You!