diff --git a/Schrick-Noah_Learning-Practice-2.ipynb b/Schrick-Noah_Learning-Practice-2.ipynb new file mode 100644 index 0000000..d81064b --- /dev/null +++ b/Schrick-Noah_Learning-Practice-2.ipynb @@ -0,0 +1,50 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Learning Practice 2 for the University of Tulsa's QM-7063 Data Mining Course\n", + "# Dimension Reduction\n", + "# Professor: Dr. Abdulrashid, Spring 2023\n", + "# Noah L. Schrick - 1492657\n", + "\n", + "import pandas as pd\n", + "import numpy as np\n", + "from sklearn.decomposition import PCA\n", + "import matplotlib.pyplot as plt" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "## Read in Breakfast Cereal data\n", + "cereals_df = pd.read_csv('Cereals.csv')\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "name": "python", + "version": "3.10.9 (main, Dec 19 2022, 17:35:49) [GCC 12.2.0]" + }, + "orig_nbformat": 4, + "vscode": { + "interpreter": { + "hash": "767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90" + } + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Schrick-Noah_Learning-Practice-2.odt b/Schrick-Noah_Learning-Practice-2.odt new file mode 100644 index 0000000..657ebf8 Binary files /dev/null and b/Schrick-Noah_Learning-Practice-2.odt differ diff --git a/Schrick-Noah_Lecture-Work.ipynb b/Schrick-Noah_Lecture-Work.ipynb index 69b4812..b315032 100644 --- a/Schrick-Noah_Lecture-Work.ipynb +++ b/Schrick-Noah_Lecture-Work.ipynb @@ -6,7 +6,7 @@ "metadata": {}, "outputs": [], "source": [ - "# Learning Practice 2 for the University of Tulsa's QM-7063 Data Mining Course\n", + "# Lecture 3 for the University of Tulsa's QM-7063 Data Mining Course\n", "# Dimension Reduction\n", "# Professor: Dr. Abdulrashid, Spring 2023\n", "# Noah L. Schrick - 1492657\n", @@ -890,6 +890,27 @@ " len(pcsSummary_df.columns) + 1)]\n", "pcsSummary_df.round(4)" ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[ 379.63089542, -188.68156228],\n", + " [-188.68156228, 197.32632105]])" + ] + }, + "execution_count": 57, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "np.cov(cereals_df.calories, cereals_df.rating)" + ] } ], "metadata": { @@ -898,18 +919,6 @@ "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.10.9" - }, "orig_nbformat": 4 }, "nbformat": 4,