Regressions Exercise Exercise 1 Linear Regression Guide to

  • Slides: 13
Download presentation
Regressions: Exercise

Regressions: Exercise

Exercise 1 Linear Regression Guide to Intelligent Data Science Second Edition, 2020 2

Exercise 1 Linear Regression Guide to Intelligent Data Science Second Edition, 2020 2

Linear Regression - Guide to Intelligent Data Science Second Edition, 2020 x 1 2

Linear Regression - Guide to Intelligent Data Science Second Edition, 2020 x 1 2 6 4 5 y 1 2 4 3 3 3

1. Parameter Estimation - - Data 1 2 6 4 5 18 1 2

1. Parameter Estimation - - Data 1 2 6 4 5 18 1 2 4 3 3 13 1 4 36 16 25 82 1 4 24 12 15 56 Guide to Intelligent Data Science Second Edition, 2020 4

1. Parameter Estimation - Guide to Intelligent Data Science Second Edition, 2020 5

1. Parameter Estimation - Guide to Intelligent Data Science Second Edition, 2020 5

1. Parameter Estimation - Regression line Guide to Intelligent Data Science Second Edition, 2020

1. Parameter Estimation - Regression line Guide to Intelligent Data Science Second Edition, 2020 6

2. Prediction - - Guide to Intelligent Data Science Second Edition, 2020 7

2. Prediction - - Guide to Intelligent Data Science Second Edition, 2020 7

Exercise 2 Practice with KNIME Guide to Intelligent Data Science Second Edition, 2020 8

Exercise 2 Practice with KNIME Guide to Intelligent Data Science Second Edition, 2020 8

1. Linear Regression Predict the price of an house in Ames (Iowa, USA) given

1. Linear Regression Predict the price of an house in Ames (Iowa, USA) given a number of features (size, neighborhood, heating. . . ) using Linear Regression. 1. 2. Read dataset Ames. Housing_simple. csv. It contains information about houses sold in Ames (only numerical values) as well as the Sale. Price. 4. 5. Remove rows with missing prediction Add Partitioning node to File Reader output 6. Add Numeric Scorer to Regression Predictor Output - Top port should have 70 % of the rows - Draw randomly such rows 3. Add Linear Regression Learner to top output port of Partitioning node Add Regression Predictor - Predict test set (remaining 30% rows) by simply connecting the remaining unconnected output ports - Reference Column: the column you learned - Predicted Column: the new column created by the predictor 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)? Guide to Intelligent Data Science Second Edition, 2020 9

1. Linear Regression Predict the price of an house in Ames (Iowa, USA) given

1. Linear Regression Predict the price of an house in Ames (Iowa, USA) given a number of features (size, neighborhood, heating. . . ) using Linear Regression. Guide to Intelligent Data Science Second Edition, 2020 10

2. Logistic Regression Train a Logistic Regression model that predicts whether a wine is

2. Logistic Regression Train a Logistic Regression model that predicts whether a wine is red or white. 1. Read data wine. csv (Hint: drag and drop) 2. Use the Normalizer (PMML) node to z normalize all numerical columns 3. Partition the dataset into a training set (80%) and a test set (20%). a. Apply stratified sampling on the color column. 4. Train a logistic regression model on the training set, and apply the model to the test set 5. Use the Scorer node to evaluate the accuracy of the model Guide to Intelligent Data Science Second Edition, 2020 11

2. Logistic Regression Train a Logistic Regression model that predicts whether a wine is

2. Logistic Regression Train a Logistic Regression model that predicts whether a wine is red or white. Guide to Intelligent Data Science Second Edition, 2020 12

Thank you For any questions please contact: education@knime. com Guide to Intelligent Data Science

Thank you For any questions please contact: education@knime. com Guide to Intelligent Data Science Second Edition, 2020 13