devquora

Posted On: Feb 22, 2018

The following steps are followed to build and evaluate a linear regression model in R

- The first step is to divide the data into train and test sets. This step is crucial because you have to build a model on the train and evaluate its performance on the test set. This can be done with sample.split() function from the package.
- The second step is to build the model on the train set. The function used to build the model is Im() function.
- Once you’ve built the model, you can predict the values on the data set with the help of the predict() function.
- The last step in the linear regression model is to find out the RMSE. The lower the value of RMSE, better is the prediction.

Never Miss an Articles from us.

- Common Interview Questions
- Python Flask Interview Questions
- NoSQL interview questions
- JQuery Interview Questions
- C programming interview questions
- AngularJS Interview Questions
- Node JS Interview Questions with Express
- JavaScript Interview Questions
- Core Java interview questions
- HTML Interview Questions
- Laravel interview questions
- Wordpress Interview Questions
- PHP Interview Questions

R is a programming language and a software environment meant for statistical analysis and creating graphs. It is used b..

The functions that R provides areMean- it is calculated by taking the sum of the values and dividing it by a number o..

Data structure is a form of organizing and storing data. It is imperative to have a strong understanding of various dat..