# Lab 7 - Gnkhakimova/CS5542-BigData_LabAssignments GitHub Wiki

# Lab 7

**1. Implementation of linear regression in Tensorflow using Boston Dataset.**

For this task linear regression was implemented using given dataset (Boston housing dataset). Dataset was divided into training and testing data.

- Training dataset was initialized.
- Initialize input variables
- Initialize weights
- Create Linear model
- Calculate mean squared errors
- Calculate gradient

Output:

![](https://raw.githubusercontent.com/wiki/Gnkhakimova/CS5542-BigData_LabAssignments/Lab 7/1.png)

**2.Plot training cost using Matplotlib in python**

Matplotlib was used to plot training cost.

Output:

![](https://raw.githubusercontent.com/wiki/Gnkhakimova/CS5542-BigData_LabAssignments/Lab 7/2.png)

![](https://raw.githubusercontent.com/wiki/Gnkhakimova/CS5542-BigData_LabAssignments/Lab 7/3.png)