Note:
-An R Notebook is an R Markdown document with chunks that can be executed independently and interactively, with output visible immediately beneath the input.
-Notebook output are available as HTML, PDF, Word, or Latex.
-This Notebook as HTML is preferably open with Google Chrome.
-R-Code can be extracted as Rmd file under the button “Code” in the notebook.
-This Notebook using iterative development. It means the process starts with a simple implementation of a small set of idea requirements and iteratively enhances the evolving versions until the complete version is implemented and perfect.
World of Regression
The relationships among variables. Used for predictive modeling and data mining tasks.
The word “Regression” came into existence due to “Sir Francis Galton”. There are more than 10 types of regression algorithms designed for various types of analysis. Each type has its own significance. Every analyst must know which form of regression to use depending on type of data and distribution.
Lets take a simple example : We are a small company that sell milktea. There can be a hundred of factors that affects our sales. In our case, sales is your dependent variable. Factors affecting sales are independent variables.
It helps us to answer the following questions:
- Which of the factors have a significant impact on sales
- Which is the most important factors for sales
- How do the factors interact with each other
- What would be the annual sales ot the next year
Type of Regression:
1. Linear Regression
2. Polynomial Regression
3. Logistic Regression
4. Quantile Regression
5. Ridge Regression
6. Lasso Regression
7. ElasticNet Regression
8. Principal Component Regression
9. Partial Least Square Regression
10. Support Vector Regression
11. Ordinal Regression
12. Poisson Regression
13. Negative Binomial Regression
14. Quasi-Poisson Regression
15. Cox Regression
LS0tDQp0aXRsZTogIlJlZ3Jlc3Npb24gMTAxIg0Kc3VidGl0bGU6ICJDb21wbGV0ZSBNZW51IGZvciBSZWdyZXNzaW9uIEFuYWx5c2lzIGluIFIiDQphdXRob3I6ICJDZXZpIEhlcmRpYW4sIEIuIFNjIg0KZGF0ZTogIjI5LjAxLjIwMTkiDQpvdXRwdXQ6DQogIGh0bWxfbm90ZWJvb2s6DQogICAgY29kZV9mb2xkaW5nOiBoaWRlDQogICAgaGlnaGxpZ2h0OiBweWdtZW50cw0KICAgIHRoZW1lOiBjb3Ntbw0KICAgIHRvYzogeWVzDQogICAgdG9jX2RlcHRoOiA1DQogICAgdG9jX2Zsb2F0OiB5ZXMNCiAgaHRtbF9kb2N1bWVudDoNCiAgICBkZl9wcmludDogcGFn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