{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# E20- Neural Networks in Keras " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Use keras framework to solve the below exercises.\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Using TensorFlow backend.\n" ] } ], "source": [ "import numpy as np\n", "import keras \n", "import pandas as pd\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 20.1 Predicting Student Admissions with Neural Networks\n", "\n", "In this notebook, we predict student admissions to graduate schools based on six pieces of data:\n", "\n", "1. GRE Scores (Test)\n", "2. TOEFL Scores (Test)\n", "3. University Ranking (1-5)\n", "4. Statement of Purpose (SOP) and Letter of Recommendation Strength ( out of 5 )\n", "5. Undergraduate GPA Scores (Grades)\n", "6. Research Experience ( either 0 or 1 )\n", "\n", "**Exercise:** Design and train a shallow neural network to predict the chance of Admission for each entry. Choose the number of hidden layer and neurons that minimizes the error. " ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | GRE Score | \n", "TOEFL Score | \n", "University Rating | \n", "SOP | \n", "LOR | \n", "CGPA | \n", "Research | \n", "Chance of Admit | \n", "
---|---|---|---|---|---|---|---|---|
Serial No. | \n", "\n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " |
1 | \n", "337 | \n", "118 | \n", "4 | \n", "4.5 | \n", "4.5 | \n", "9.65 | \n", "1 | \n", "0.92 | \n", "
2 | \n", "324 | \n", "107 | \n", "4 | \n", "4.0 | \n", "4.5 | \n", "8.87 | \n", "1 | \n", "0.76 | \n", "
3 | \n", "316 | \n", "104 | \n", "3 | \n", "3.0 | \n", "3.5 | \n", "8.00 | \n", "1 | \n", "0.72 | \n", "
4 | \n", "322 | \n", "110 | \n", "3 | \n", "3.5 | \n", "2.5 | \n", "8.67 | \n", "1 | \n", "0.80 | \n", "
5 | \n", "314 | \n", "103 | \n", "2 | \n", "2.0 | \n", "3.0 | \n", "8.21 | \n", "0 | \n", "0.65 | \n", "