Icon

01.02 Logistic Regression solution

<p>01.02 Logistic Regression - solution<br><br>[L4-ML] Machine Learning Algorithms - Specialization</p><p>01 Classification Models<br>- Train a logistic regression model<br>- Apply the model to the test set<br>- Evaluate the model performances with the Scorer node</p>

URL: Description of the Ames Iowa Housing Data https://rdrr.io/cran/AmesHousing/man/ames_raw.html
URL: Ames Housing Dataset on kaggle https://www.kaggle.com/prevek18/ames-housing-dataset

01 - Classification Models

01.02 Logistic Regression

Learning objective: In this exercise you'll learn how predict the price of a house in Ames (Iowa, USA) given a number of features: size, neighborhood, heating...


Workflow description: This workflow uses a dataset that describes the sale of individual residential properties in Ames, Iowa from 2006 to 2010. One of the columns is the overall condition ranking, with values between 1 and 10.


You'll find the instructions to the exercises in the yellow annotations.

Step 1. Logistic Regression Learner

Train a Logistic Regression model to predict the overall condition of a house (high/low) (Logistic Regression Learner node)

  • Select the rank column as the target column

  • Select low as the reference category

  • Leave other settings to their defaults


Step 2. Logistic Regression Predictor

Use the trained model to predict the rank of the houses in the test set (Logistic Regression Predictor node)


Data Preparation


Step 3. Model evaluation

Evaluate the accuracy of the logistic regression model (Scorer node)

  • Select rank as the actual column and Prediction (rank) as the predicted column

  • What is the accuracy of the model?


Evaluate
Scorer
Logistic Regression Learner
Logistic Regression Predictor
Preprocessing
Read AmesHousing.csv
CSV Reader

Nodes

Extensions

Links