linear models for regression
play

Linear Models for Regression Greg Mori - CMPT 419/726 Bishop PRML - PowerPoint PPT Presentation

Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Linear Models for Regression Greg Mori - CMPT 419/726 Bishop PRML Ch. 3 Regression Linear Basis Function Models


  1. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Linear Models for Regression Greg Mori - CMPT 419/726 Bishop PRML Ch. 3

  2. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Outline Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Regression

  3. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Outline Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Regression

  4. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Regression • Given training set { ( x 1 , t 1 ) , . . . , ( x N , t N ) } • t i is continuous: regression • For now, assume t i ∈ R , x i ∈ R D • E.g. t i is stock price, x i contains company profit, debt, cash flow, gross sales, number of spam emails sent, . . .

  5. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Outline Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Regression

  6. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Linear Functions • A function f ( · ) is linear if f ( α u + β v ) = α f ( u ) + β f ( v ) • Linear functions will lead to simple algorithms, so let’s see what we can do with them

  7. ✂☎✄✝✆ ✁ � Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Linear Regression • Simplest linear model for regression y ( x , w ) = w 0 + w 1 x 1 + w 2 x 2 + . . . + w D x D • Remember, we’re learning w • Set w so that y ( x , w ) aligns with target value in training data

  8. ✂☎✄✝✆ ✁ � Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Linear Regression • Simplest linear model for regression y ( x , w ) = w 0 + w 1 x 1 + w 2 x 2 + . . . + w D x D • Remember, we’re learning w • Set w so that y ( x , w ) aligns with target value in training data

  9. � ✁ Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Linear Regression • Simplest linear model for regression y ( x , w ) = w 0 + w 1 x 1 + w 2 x 2 + . . . + w D x D • Remember, we’re learning w • Set w so that y ( x , w ) aligns with target value in training data • This is a very simple model, limited in what it can do ✂☎✄✝✆ 1 0 −1 0 1

  10. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Linear Basis Function Models • Simplest linear model y ( x , w ) = w 0 + w 1 x 1 + w 2 x 2 + . . . + w D x D was linear in x ( ∗ ) and w • Linear in w is what will be important for simple algorithms • Extend to include fixed non-linear functions of data y ( x , w ) = w 0 + w 1 φ 1 ( x ) + w 2 φ 2 ( x ) + . . . + w M − 1 φ M − 1 ( x ) • Linear combinations of these basis functions also linear in parameters

  11. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Linear Basis Function Models • Simplest linear model y ( x , w ) = w 0 + w 1 x 1 + w 2 x 2 + . . . + w D x D was linear in x ( ∗ ) and w • Linear in w is what will be important for simple algorithms • Extend to include fixed non-linear functions of data y ( x , w ) = w 0 + w 1 φ 1 ( x ) + w 2 φ 2 ( x ) + . . . + w M − 1 φ M − 1 ( x ) • Linear combinations of these basis functions also linear in parameters

  12. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Linear Basis Function Models • Simplest linear model y ( x , w ) = w 0 + w 1 x 1 + w 2 x 2 + . . . + w D x D was linear in x ( ∗ ) and w • Linear in w is what will be important for simple algorithms • Extend to include fixed non-linear functions of data y ( x , w ) = w 0 + w 1 φ 1 ( x ) + w 2 φ 2 ( x ) + . . . + w M − 1 φ M − 1 ( x ) • Linear combinations of these basis functions also linear in parameters

  13. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Linear Basis Function Models • Bias parameter allows fixed offset in data y ( x , w ) = w 0 + w 1 φ 1 ( x ) + w 2 φ 2 ( x ) + . . . + w M − 1 φ M − 1 ( x ) ���� bias • Think of simple 1-D x : y ( x , w ) = + w 1 w 0 x ���� ���� intercept slope • For notational convenience, define φ 0 ( x ) = 1 : M − 1 � w j φ j ( x ) = w T φ ( x ) y ( x , w ) = j = 0

  14. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Linear Basis Function Models • Bias parameter allows fixed offset in data y ( x , w ) = w 0 + w 1 φ 1 ( x ) + w 2 φ 2 ( x ) + . . . + w M − 1 φ M − 1 ( x ) ���� bias • Think of simple 1-D x : y ( x , w ) = + w 1 w 0 x ���� ���� intercept slope • For notational convenience, define φ 0 ( x ) = 1 : M − 1 � w j φ j ( x ) = w T φ ( x ) y ( x , w ) = j = 0

  15. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Linear Basis Function Models • Bias parameter allows fixed offset in data y ( x , w ) = w 0 + w 1 φ 1 ( x ) + w 2 φ 2 ( x ) + . . . + w M − 1 φ M − 1 ( x ) ���� bias • Think of simple 1-D x : y ( x , w ) = + w 1 w 0 x ���� ���� intercept slope • For notational convenience, define φ 0 ( x ) = 1 : M − 1 � w j φ j ( x ) = w T φ ( x ) y ( x , w ) = j = 0

  16. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Linear Basis Function Models • Function for regression y ( x , w ) is non-linear function of x , but linear in w : M − 1 � w j φ j ( x ) = w T φ ( x ) y ( x , w ) = j = 0 • Polynomial regression is an example of this • Order M polynomial regression, φ j ( x ) =?

  17. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Linear Basis Function Models • Function for regression y ( x , w ) is non-linear function of x , but linear in w : M − 1 � w j φ j ( x ) = w T φ ( x ) y ( x , w ) = j = 0 • Polynomial regression is an example of this • Order M polynomial regression, φ j ( x ) =?

  18. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Linear Basis Function Models • Function for regression y ( x , w ) is non-linear function of x , but linear in w : M − 1 � w j φ j ( x ) = w T φ ( x ) y ( x , w ) = j = 0 • Polynomial regression is an example of this • Order M polynomial regression, φ j ( x ) =? • φ j ( x ) = x j : y ( x , w ) = w 0 x 0 + w 1 x 1 + . . . + w M x M

  19. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Basis Functions: Feature Functions • Often we extract features from x • An intuitve way to think of φ j ( x ) is as feature functions • E.g. Automatic CMPT726 project report grading system • x is text of report: In this project we apply the algorithm of Mori [2] to recognizing blue objects. We test this algorithm on pictures of you and I from my holiday photo collection. ... • φ 1 ( x ) is count of occurrences of Mori [ • φ 2 ( x ) is count of occurrences of of you and I • Regression grade y ( x , w ) = 20 φ 1 ( x ) − 10 φ 2 ( x )

  20. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Basis Functions: Feature Functions • Often we extract features from x • An intuitve way to think of φ j ( x ) is as feature functions • E.g. Automatic CMPT726 project report grading system • x is text of report: In this project we apply the algorithm of Mori [2] to recognizing blue objects. We test this algorithm on pictures of you and I from my holiday photo collection. ... • φ 1 ( x ) is count of occurrences of Mori [ • φ 2 ( x ) is count of occurrences of of you and I • Regression grade y ( x , w ) = 20 φ 1 ( x ) − 10 φ 2 ( x )

  21. Regression Linear Basis Function Models Loss Functions for Regression Finding Optimal Weights Regularization Bayesian Linear Basis Functions: Feature Functions • Often we extract features from x • An intuitve way to think of φ j ( x ) is as feature functions • E.g. Automatic CMPT726 project report grading system • x is text of report: In this project we apply the algorithm of Mori [2] to recognizing blue objects. We test this algorithm on pictures of you and I from my holiday photo collection. ... • φ 1 ( x ) is count of occurrences of Mori [ • φ 2 ( x ) is count of occurrences of of you and I • Regression grade y ( x , w ) = 20 φ 1 ( x ) − 10 φ 2 ( x )

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend