# Classification through logistic regression
# This lecture consists of materials that are either scattered
# in the text book or not even covered in the book. You
# will need to rely on my lecture.
# Rearrange the lecture and add linear boundary!
#
#
#
#
# Categorical responses with more than two levels
# 1) General ideas
# 2) Several methods
#
. Tree based or RF (readily to be used)
#
. Logistic regression/LASSO extended to I many levels
#
. One against all others
#
# Case study: Diabetic readmission rev
# Bootstrap
and its applications#
# Part I: motivation example via Weibull distribution
# Skip this part #
# Part II: Bootstrap in action (library(boot)
#
Apply the technique in linear models
# Part I: A motivating example using Weibull distribution
# In
#
# Tree based methods #
# Text book
# 5.2: Bootstrap
# 8.1: Single trees
# 8.2: Ensemble methods
#
. Bagging
#
. Random Forest
# Part I: regression trees
# 1) Single Tree
# 2) Bootstrap Technique applied to trees
# 3) Random Forest (Bagging is a special
# Logistic Regression
# Read Chapter 4.1-4.3
# Topics:
# 1) Link function
# 2) Fit the data through ML estimation
# 3) Wald tests/intervals and Maximum Likelihood Ratio test
# 4) Model selection through backward selection
# 5) Appendix 1: log odd ratio as
# Elastic net extended to classifications
# Case study: ART effects.
# 1) Data exploration
# 2) Elastic net in classification
# 3) Final findings
# An almost same analysis is prepared in a .rmd file. You will find explanations
there, especially
# about el
#
# Tree based methods #
# Text book
# 5.2: Bootstrap
# 8.1: Single trees
# 8.2: Ensemble methods
#
. Bagging
#
. Random Forest
# Part I: regression trees
# 1) Single Tree
# 2) Bagging
# 3) Random Forest (Bagging is a special case)
# 4) Appendix: Bootstra
# Classification through logistic regression
# This lecture consists of materials that are either scattered
# in the text book or not even covered in the book. You
# will need to rely on my lecture.
# Rearrange the lecture and add linear boundary!
#
#
#
#
# Logistic Regression
# Topics:
# 1) Link function
# 2) Fit the data through ML estimation
# 3) Wald tests/intervals and Maximum Likelihood Ratio test
# 4) Model selection through backward selection
# 5) Appendix 1: log odd ratio as a function of SBP
# Ca
# Elastic net extended to classifications
# Case study: ART effects.
# 1) Data exploration
# 2) Elastic net in classification
# 3) Final findings
# An almost same analysis is prepared in a .rmd file. You will find explanations
there, especially
# about el
# Model selection #
#
#
#
#
#
1)
2)
3)
4)
5)
Exploring the data
Transformation on y's or some x's
Model building: forward, backward or all subsets
Creterion of accuracy for the models: Cp, BIC, Rsquared, RSS
Findings/reports
rm(list=ls()
library(ISLR)
lib
#
# Tree based methods
# Part II: RandomForest for classifications
# 1) Single Trees
# 2) Random Forests
# 3) Appendix 1: Deviance and Gini index in details
# 4) Appendix 2. Random classifiers
#
# Part II: RandomForeset for classifications #
library(rando
# Multiple Regression
# Read Chapter 3 and 6.1
# Note: Many important topics are put in Appendices. Please go through them.
#
# 1. Introduction to multiple regression
#
a. Quick review of simple regression
#
b. Interpretation of coefficients in multiple r
#
# Tree based methods
# Part II: RandomForest for classifications
# 1) Single Trees
# 2) Random Forest
# 3) Comments
#
# Part II: RandomForeset for classifications #
library(randomForest)
library(tree)
library(pROC)
# Random Forest for classification is
# Multiple Regression
# Read Chapter 3 and 6.1
# Note: Many important topics are put in Appendices. Please go through them.
#
# 1. Introduction to multiple regression
#
a. Quick review of simple regression
#
b. Interpretation of coefficients in multiple r
Chapter 8 Notes and elaborations for Math 1125-Introductory Statistics
Assignment:
First read my additional notes below. It will tell you when to go read section 8.1. Then do the 8.1 exercises.
8.1: 2, 5, 7, 11, 12, 13.
8.2: 1, 5, 9-21 odd.
8.3: 3- 13 odd
Chapter 2 Notes and elaborations for Math 1125-Introductory Statistics
Assignment:
The material in Chapter 2 is considered high-school review, although you certainly should read it and make sure
you are comfortable with all of the terms. I am not terribly
Chapter 6 Notes and elaborations for Math 1125-Introductory Statistics
Assignment:
Chapter 6 is also pretty good, so Ill be following the text pretty closely. It is of the upmost importance that you are
able to find areas under the normal curve. You will
MATH 125 Probability Homework
Problem 1. Assume that P(A) = 0.4 and P(B) = 0.3. for all parts of this problem. Find the following probabilities:
a.) What is P(B)?
P(B) = 1 - P(B) = 1 - 0.3 = 0.7
b.) Given that P(A and B) = 0.1, find P(A or B).
P(A or B) =
Chapter 4 Notes and elaborations for Math 1125-Introductory Statistics
Assignment:
Chapter 4 is fairly well written, for the most part. You will want to read section 4.1, 4.2 and 4.3 very carefully.
Note that subjective probability as mentioned in section
Chapter 1 Notes and elaborations for Math 1125-Introductory Statistics
Assignment:
Read all of Chapter 1 except for the following: you may skip the parts about nominal, ordinal, interval, and ratio
levels of measurement on pages 8 and 9. What the book cal
Chapter 9. Notes and elaborations for Math 1125-Introductory Statistics
Assignment:
Im only teaching two sections of chapter 9. They are both two-sample hypothesis test. In fact, they behave
in almost the same way that the analogous single-sample tests wo
Chapter 5 Notes and elaborations for Math 1125-Introductory Statistics
Assignment:
Chapter 5 is pretty good, so Ill be following the text pretty closely. The book likes to talk about the mean of a
random variable, I tend to call it the expected value of t
Chapter 7 Notes and elaborations for Math 1125-Introductory Statistics
Assignment:
For section 1 of chapter 7 you may stop reading on page 363. (I wont be asking about proper sample size.) Do read
all of section 7.2. Be sure you know when to use a z-confi