28
WWW.1PPT.COM Generalized Additive Models Yufei Wang & Zhuoqun Cheng

Generalized Additive Models - Feng

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Generalized Additive Models - Feng

WWW.1PPT.COM

Generalized Additive Models

Yufei Wang & Zhuoqun Cheng

Page 2: Generalized Additive Models - Feng

Company Logo

Contents

Generalized Additive Models

Piecewise Polynomials

Fitting Additive Models

Additive Logistic Models

Page 3: Generalized Additive Models - Feng

Company Logo

Generalized Additive Models

Page 4: Generalized Additive Models - Feng

Generalized Additive Models

Page 5: Generalized Additive Models - Feng

Generalized Additive Models

Page 6: Generalized Additive Models - Feng

Generalized Additive Models

Page 7: Generalized Additive Models - Feng

Generalized Additive Models

Page 8: Generalized Additive Models - Feng

Generalized Additive Models

Page 9: Generalized Additive Models - Feng

Piecewise Polynomials

Page 10: Generalized Additive Models - Feng

Piecewise Polynomials

Page 11: Generalized Additive Models - Feng

Then we add two constraint conditions:

Piecewise Polynomials

Page 12: Generalized Additive Models - Feng

Piecewise Polynomials

A more direct way to proceed in this case is to

use a basis that incorporates the constraints:

Page 13: Generalized Additive Models - Feng

Piecewise Polynomials

We often prefer smoother functions, and these can be

achieved by increasing the order of the local polynomial.

Page 14: Generalized Additive Models - Feng

Piecewise Polynomials

The function in this figure is continuous, and has

continuous first and second derivatives at the knots.

Page 15: Generalized Additive Models - Feng

Piecewise Polynomials

cubic spline

The function has two continuous derivatives at the knots.

It is known as a cubic spline.

It is not hard to show that the basis represents a cubic

spline with knots at 1 and 2:

Page 16: Generalized Additive Models - Feng

Piecewise Polynomials

More generally, an order M spline with knots j , j = 1, . . . ,K

is a piecewise-polynomial of order M, and has continuous

derivatives up to order M − 2.

Likewise the general form for the truncated-power basis set

would be:

Page 17: Generalized Additive Models - Feng

Fitting Additive Models

Page 18: Generalized Additive Models - Feng

Fitting Additive Models

The Backfitting Algorithm for Additive Models

Page 19: Generalized Additive Models - Feng

Additive Logistic Regression

Page 20: Generalized Additive Models - Feng

Additive Logistic Regression

Page 21: Generalized Additive Models - Feng

Additive Logistic Regression

Page 22: Generalized Additive Models - Feng

Additive Logistic Regression

Example : Predicting Email Spam

We apply a generalized additive model to the spam data. The data consists of information from 4601 email messages, in a study to screen email for

“ spam ” (i.e. junk email).

Page 23: Generalized Additive Models - Feng

The response variable is binary, with values email or spam, and there are 57 predictors as described below:

48 quantitative predictors—the percentage of words in the email that match a given word. Examples include business, address, internet, free and george. The idea was that these could be customized for Individual users.

6 quantitative predictors—the percentage of characters in the email That match a given character. The characters are ch;, ch(, ch[, ch!, ch$, and ch#.

The average length of uninterrupted sequences of capital letters:CAPAVE.

The length of the longest uninterrupted sequences of capital letters: CAPMAX.

The sum of the length of uninterrupted sequences of capital letters: CAPTOT.

Fitting Additive Models

Page 24: Generalized Additive Models - Feng

Additive Logistic Regression

Page 25: Generalized Additive Models - Feng

Additive Logistic Regression

Table 1

Table2 shows the predictors that are highly significant in

the additive model.

Page 26: Generalized Additive Models - Feng

Additive Logistic Regression

Table2

Page 27: Generalized Additive Models - Feng

Additive Logistic Regression

The figure shows the estimated functions for the significant predictors appearing in Table2.

Page 28: Generalized Additive Models - Feng

WWW.1PPT.COM