CPE EL3 Lab 3 Using TensorFlow for Linear Regression With Real Data Set

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

CPE EL3 ELECTIVE 3 (SOFTWARE DEVELOPMENT)

LABORATORY EXERCISES

LAB3 – Using TensorFlow for Linear Regression with Real Data Set

I. OBJECTIVES

1. Load data sets (csv files) into pandas DataFrame


2. View or inspect the loaded dataset
3. Change, modify or combine features to form a new feature
4. Configure hyperparameters for training the model.

II. RESOURCES AND MATERIALS

 Internet connection
 Google account
 Google Colaboratory

III. CONCEPTS/THEORY/CONTENT

This exercise explores the application of linear regression on a real data set. Loss reduction will be
performed through a variety of ways:
 Selection of features valid for training a model
 Modifying features, such as scaling or creating a synthetic feature that combines two or more
existing features
 Examination of data set, such as performing correlation
 Tweaking of hyperparameters

These techniques will be combined in an attempt to have the best results as possible, having a low loss
output with proper selection of features for training and hyperparameters. Figure 1 illustrates an output for
the exercise using population as the feature used for training prediction for a label, median_house_value”.

Figure 1. Model training performance, using population as feature

CPE EL3 Elective 3 Page 1 of 2


Prepared, edited by: Jeremiah Dearborn F. Gangoso, CpE
IV. EXERCISES

1. Do the exercise, “Simple Linear Regression with Synthetic Data”. Use colaboratory for
convenience:

https://developers.google.com/machine-learning/crash-course/first-steps-with-
tensorflow/programming-exercises

2. You may use this colab notebook for reference or as a template:

https://colab.research.google.com/drive/1BAPsETCJ-
qUcdVWc1_FQ1nkJDpDBGydm?usp=sharing

NOTE: It is recommended to have a personal copy of the notebook. Use File > Save a copy in
Drive

CPE EL3 Elective 3 Page 2 of 2


Prepared, edited by: Jeremiah Dearborn F. Gangoso, CpE

You might also like