{"metadata": {"kernelspec": {"display_name": "sd212", "language": "python", "name": "python3"}, "language_info": {"codemirror_mode": {"name": "ipython", "version": 3}, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.1"}}, "nbformat": 4, "nbformat_minor": 2, "cells": [{"cell_type": "markdown", "metadata": {}, "source": ["## [name] Type your name on the next line\n", "\n", "\n"]}, {"cell_type": "markdown", "metadata": {}, "source": ["# SD212 Lab 7: Football ML\n", "\n", "[Full instructions on the course webpage here](https://usna.edu/Users/cs/SD212/lab/fb/)"]}, {"cell_type": "code", "metadata": {}, "outputs": [], "execution_count": null, "source": ["api_key = 'YOU_FILL_THIS_IN'\n", "train_year = 2022\n", "test_week = 10\n", "test_year = 2023\n"]}, {"cell_type": "code", "metadata": {}, "outputs": [], "execution_count": null, "source": ["import requests\n", "requests.packages.urllib3.disable_warnings() # silences HTTPS warning about verify=False\n", "# Add more imports here as needed\n"]}, {"cell_type": "markdown", "metadata": {}, "source": ["# Section 2: Preliminaries"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## [Q1]\n", "> List any sources of help you used other than your instructor and\n", "> links directly on the course website.\n", "\n", "\n", "\n"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## [Q2]\n", "> This is our first time trying this lab. What did you think of it?\n", "\n", "\n", "\n", "\n"]}, {"cell_type": "markdown", "metadata": {}, "source": ["# Section 3: Get you some data"]}, {"cell_type": "code", "metadata": {}, "outputs": [], "execution_count": null, "source": ["# YOUR CODE HERE to download the training and testing datasets"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## [Q3]\n", "> How many rows (observations, which in this case are plays) are in\n", "> your *training* dataset?\n", "\n", "\n", "\n"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## [Q4]\n", "> How many columns (features) are in your datasets after your cleaning?\n", "\n", "\n", "\n"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## [Q5]\n", "> Looking at the original dataframes with all of the textural columns,\n", "> What is the *second-most* common `play_type` that occurs?\n", "\n", "\n", "\n"]}, {"cell_type": "markdown", "metadata": {}, "source": ["# Section 4: Regression to predict yards gained"]}, {"cell_type": "code", "metadata": {}, "outputs": [], "execution_count": null, "source": ["# YOUR CODE HERE to do regression"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## [Q6]\n", "> What took longer in Python - fitting the model to the training data,\n", "> or predicting the labels on the testing data? Why do you think that\n", "> is?\n", "\n", "\n", "\n"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## [Q7]\n", "> What was the RMSE of your predictions?\n", "\n", "\n", "\n"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## [Q8]\n", "> How good do you think that is? Would your predictions be useful\n", "> information for a football coach?\n", "\n", "\n", "\n"]}, {"cell_type": "markdown", "metadata": {}, "source": ["# Section 5: Classification to predict running plays"]}, {"cell_type": "code", "metadata": {}, "outputs": [], "execution_count": null, "source": ["# YOUR CODE HERE to do classification"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## [Q9]\n", "> What is your classifier's accuracy on *true negatives*? (Top-left\n", "> corner in the normalized confusion matrix, should be a number\n", "> between 0 and 1)\n", "\n", "\n", "\n"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## [Q10]\n", "> What is your classifier's accuracy on *true positives*?\n", "> (Bottom-right corner)\n", "\n", "\n", "\n"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## [Q11]\n", "> Interpret the results you are seeing. Is your classifier useful?\n", "> Where is it better or worse? What makes this an easy or challenging\n", "> task for machine learning?\n", "\n", "\n", "\n"]}, {"cell_type": "markdown", "metadata": {}, "source": ["# Section 7: Make it better!"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## [Q12]\n", "> What change(s) did you make to improve the regression task?\n", "> How much (if at all) did it improve the RMSE?\n", "> Why did you think it would help?\n", "\n", "\n", "\n"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## [Q13]\n", "> Same question as #12, for the classification task.\n", "\n", "\n", "\n"]}]}