Multi-Class Logistic Regression 11/07/2018 Liyuan Liu Ph.D. - - PowerPoint PPT Presentation

multi class logistic regression 11 07 2018
SMART_READER_LITE
LIVE PREVIEW

Multi-Class Logistic Regression 11/07/2018 Liyuan Liu Ph.D. - - PowerPoint PPT Presentation

Multi-Class Logistic Regression 11/07/2018 Liyuan Liu Ph.D. Students in Analytics and Data Science Kennesaw State University Multi-class logistic regression 5-cross validation ROC plot Process Data Preparation Softmax Function Gradient


slide-1
SLIDE 1

Multi-Class Logistic Regression 11/07/2018

Liyuan Liu Ph.D. Students in Analytics and Data Science Kennesaw State University

slide-2
SLIDE 2

5-cross validation ROC plot Multi-class logistic regression

slide-3
SLIDE 3

3

Process

Data Preparation Softmax Function Gradient Descent Model Training and testing Add L1 Regularization

slide-4
SLIDE 4

4

Data Preparation

  • 1. Separate raw data to X and Y.
  • 2. Add Intercept.
  • 3. Normalized X use min-max method.
  • 4. One Hot EncodedY.
slide-5
SLIDE 5

5

Softmax

1/(1+np.exp(-score)) (np.exp(score) / np.sum(np.exp(score))

slide-6
SLIDE 6

6

Gradient Descent

Learning Rate: 0.01 Epoch: 3000

slide-7
SLIDE 7

7

Get Prediction Value

Rule: Extract the indexhas the highest probability.

The argmax() only for compute accuracy

slide-8
SLIDE 8

8

ROC Plot

Use numpy.ravel to flatten the array.¶

slide-9
SLIDE 9

9

Result-5 Cross Validation

slide-10
SLIDE 10

10

Result L1 Regularization-5 Cross Validation

Why Regularization? Reduce Over-fitting Problem.

slide-11
SLIDE 11

11

Result L1 Regularization-5 Cross Validation

slide-12
SLIDE 12

THANKS

Liyuan Liu: lliyuan@students.kennesaw.edu