LFD Book Forum Polynomial regression
 User Name Remember Me? Password
 Register FAQ Calendar Mark Forums Read

 Thread Tools Display Modes
#1
09-18-2012, 10:59 PM
 Daniel Junior Member Join Date: Jun 2012 Posts: 4
Polynomial regression

I'm curious about using polynomial regression with multiple features. I understand how to use polynomial hypotheses with univariate regression, but I'm unsure how to extend this to multiple features. Let's say I want to use a cubic polynomial. Do I introduce three terms in the hypothesis for each feature x^1 and x^2 and x^3 ?? So in effect, I'm tripling the number of features (or terms in the hypothesis equation)?

Thank you.

Daniel
#2
09-19-2012, 04:49 PM
 magdon RPI Join Date: Aug 2009 Location: Troy, NY, USA. Posts: 596
Re: Polynomial regression

You can certainly implement your suggestion, but it is technically not the 3rd order polynomial transform, although it is a form of polynomial transform. You would introduce every term that is at most 3rd order to get the full 3rd order polynomial transform. Here are those terms:

If you have variables and you want the -order polynomial transform, there are quick algorithms to generate these terms. As you can see, the number of terms rises very quickly. In this example you have done much worse than tripling. In general, for the -order polynomial transform with variables, the number of terms is

Quote:
 Originally Posted by Daniel I'm curious about using polynomial regression with multiple features. I understand how to use polynomial hypotheses with univariate regression, but I'm unsure how to extend this to multiple features. Let's say I want to use a cubic polynomial. Do I introduce three terms in the hypothesis for each feature x^1 and x^2 and x^3 ?? So in effect, I'm tripling the number of features (or terms in the hypothesis equation)? Thank you. Daniel
__________________
Have faith in probability
#3
09-27-2012, 09:00 PM
 Daniel Junior Member Join Date: Jun 2012 Posts: 4
Re: Polynomial regression

Dear Dr. Magdon,

Thank you so much for the informative reply. Of course, your solution makes perfect sense. It just wasn't obvious to me. I shall experiment with this.

Cheers,

Daniel

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home General     General Discussion of Machine Learning     Free Additional Material         Dynamic e-Chapters         Dynamic e-Appendices Course Discussions     Online LFD course         General comments on the course         Homework 1         Homework 2         Homework 3         Homework 4         Homework 5         Homework 6         Homework 7         Homework 8         The Final         Create New Homework Problems Book Feedback - Learning From Data     General comments on the book     Chapter 1 - The Learning Problem     Chapter 2 - Training versus Testing     Chapter 3 - The Linear Model     Chapter 4 - Overfitting     Chapter 5 - Three Learning Principles     e-Chapter 6 - Similarity Based Methods     e-Chapter 7 - Neural Networks     e-Chapter 8 - Support Vector Machines     e-Chapter 9 - Learning Aides     Appendix and Notation     e-Appendices

All times are GMT -7. The time now is 01:52 PM.

 Contact Us - LFD Book - Top