Icon

Linear_Regression_Exercise

Linear Regression

Linear regression: predict house price.

- Partition data into training and test set
- Train a linear regression model
- Apply the trained model to the test set
- Handle missing values
- Evaluate the model performance with the Numeric Scorer node

URL: Guide to Intelligent Data Science https://www.datascienceguide.org/

Annotations and comments
  • Exercise: Linear Regression In this exercise we will predict the price of an house in Ames (Iowa, USA) given a number of features (size, neighborhood, heating...) using Linear Regression. Read dataset AmesHousing_simple.csv. It contains information about houses sold in Ames (only numerical values) as well as the SalePrice. Add Partitioning node to File Reader output. Top port should have 70 % of the rows Draw randomly such rows Add Linear Regression Learner to top output port of Partitioning node Select price column to be learned. Execute the node and open its scatter plot view. Which column is most correlated to the price (column selection tab)? Add Regression Predictor Predict test set (remaining 30% rows) by simply connecting the remaining unconnected output ports Remove rows with missing prediction Add Numeric Scorer to Regression Predictor Output Reference Column: the column you learned. Predicted Column: the new column created by the predictor node
  • Read AmesHousing_simple.csv

Nodes

Extensions

Links