{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# CS 20 : TensorFlow for Deep Learning Research\n", "## Lecture 03 : Linear and Logistic Regression\n", "### Linear Regression with mse loss" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Setup" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1.12.0\n" ] } ], "source": [ "from __future__ import absolute_import, division, print_function\n", "import numpy as np\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import tensorflow as tf\n", "%matplotlib inline\n", "\n", "print(tf.__version__)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Load and Pre-process data" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | Country | \n", "Birth rate | \n", "Life expectancy | \n", "
|---|---|---|---|
| 0 | \n", "Vietnam | \n", "1.822 | \n", "74.828244 | \n", "
| 1 | \n", "Vanuatu | \n", "3.869 | \n", "70.819488 | \n", "
| 2 | \n", "Tonga | \n", "3.911 | \n", "72.150659 | \n", "
| 3 | \n", "Timor-Leste | \n", "5.578 | \n", "61.999854 | \n", "
| 4 | \n", "Thailand | \n", "1.579 | \n", "73.927659 | \n", "