├── .gitignore
├── 1_AI Course Presentation.pdf
├── 1_AI Course Presentation.pptx
├── 2_ConceptsML.ipynb
├── 3_DeepLearning.ipynb
├── 4_CNNTheory.ipynb
├── 5_KerasNueralNetwork.ipynb
├── 6_Intro_to_NLP.ipynb
├── 7_ProjectIdeas.ipynb
├── 8_FurtherLearning.ipynb
├── README.md
├── images
├── ANN.png
├── MSE.png
├── SGD.jpeg
├── Test-vs-TrainAcc.png
├── adamOpt.png
├── deepLearning.png
├── differentSets.png
├── focusingCostFunction.png
├── generalGraph.png
├── gradientGraph.png
├── h5image.png
├── learningTypes.png
├── modelTraining.png
├── numpy.png
├── pandasImage.png
├── relu.png
├── sigmoid.png
├── sklearn.png
├── sparse_categorical_entropy.png
├── weights.png
└── weightsImage.png
├── project_data
├── Salary_Data.csv
├── data_description.txt
├── emails.csv
├── pima-indians-diabetes.csv
├── sales_data.csv
├── test.csv
└── train.csv
└── projects
├── 1_LinearRegressionProject.ipynb
├── 2_KerasPrerequisites.ipynb
├── 3_BasicModelPreProcessing.ipynb
├── 4_BasicModel.ipynb
├── 5_ModelPractice2.ipynb
├── 6_LinearRegressionProject2.ipynb
├── 7_CatDogCNN.ipynb
├── 8_NLPModel.ipynb
├── 9_MNIST.ipynb
└── models
├── 4_my_model_weights.h5
└── 5_medical_trial_model.h5
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | .ipynb_checkpoints
4 | */.ipynb_checkpoints/*
5 | .DS_Store
6 |
--------------------------------------------------------------------------------
/1_AI Course Presentation.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/1_AI Course Presentation.pdf
--------------------------------------------------------------------------------
/1_AI Course Presentation.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/1_AI Course Presentation.pptx
--------------------------------------------------------------------------------
/2_ConceptsML.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {
6 | "colab_type": "text",
7 | "id": "view-in-github"
8 | },
9 | "source": [
10 | ""
11 | ]
12 | },
13 | {
14 | "cell_type": "markdown",
15 | "metadata": {
16 | "id": "b2BUOcQ15hIS"
17 | },
18 | "source": [
19 | "# Basic Concepts of Machine Learning\n",
20 | "\n",
21 | "\n",
22 | "\n",
23 | "- Concepts\n",
24 | " - Human Example\n",
25 | " - How does machine learning relate to the human example? \n",
26 | " - Understanding the data\n",
27 | " - Using the data in our ML model\n",
28 | " - Conclusion\n",
29 | " - Mathematics behind the concepts\n",
30 | " - The Loss Function\n",
31 | " - Using the Loss Function to improve accuracy"
32 | ]
33 | },
34 | {
35 | "cell_type": "markdown",
36 | "metadata": {
37 | "id": "SDDf5uu35hIU"
38 | },
39 | "source": [
40 | "## Concepts"
41 | ]
42 | },
43 | {
44 | "cell_type": "markdown",
45 | "metadata": {
46 | "id": "Z1tVaXZ2-FvH"
47 | },
48 | "source": [
49 | "### Human Example\n",
50 | "\n",
51 | "Machine Learning is very similar to how humans learn, and at the end of the day, the fundamental concepts are very similar to what we already know. \n",
52 | "\n",
53 | "Let's say you have a child and two pieces of fruit: an apple and a banana. The child doesn't know what the red fruit is called; it could easily be the banana. \n",
54 | "\n",
55 | "So, how do you get the child to understand that the red fruit is the apple? It's pretty simple: you show them the red fruit and say \"apple\". You show them the yellow fruit and say \"banana\". If you continue this process again and again and again, they'll eventually figure out which name belongs with each fruit by looking at the characteristics of the apple and figuring out that they match with the word \"apple\". \n",
56 | "\n",
57 | "\n",
58 | "\n",
59 | "\n",
60 | "The child is able to figure this out because it gets rewarded when it gets the name of the fruit right with a \"Good Job!\". When it gets the fruit wrong, it gets punished in a sense with a \"No, you got that wrong\". The child wants to be rewarded, so it'll keep doing what it did right before and continue to improve this. "
61 | ]
62 | },
63 | {
64 | "cell_type": "markdown",
65 | "metadata": {
66 | "id": "QFQhQhrcAY5J"
67 | },
68 | "source": [
69 | "### How does Machine Learning relate to the human example?\n",
70 | "\n",
71 | "Machine Learning does the exact same thing, but with a computer instead of humans. \n",
72 | "\n",
73 | "We refer to this period when we are trying to teach the machine learning program what is right and what is wrong as \"training\". There are three main forms of training: supervised, unsupervised, and semi-supervised learning. \n",
74 | "\n",
75 | "For the sake of this example, we are going to focus on supervised learning, which is the most common. \n"
76 | ]
77 | },
78 | {
79 | "cell_type": "markdown",
80 | "metadata": {
81 | "id": "RhfS6loJEB2U"
82 | },
83 | "source": [
84 | "#### Understanding the data\n",
85 | "\n",
86 | "In supervised learning, we have a dataset with features and labels. \n",
87 | "\n",
88 | "Features are the characteristics of whatever you're trying to predict. For example, if it were the child's apple, the features could be: color (red), shape (round), and firmness (hard).\n",
89 | "\n",
90 | "Labels are what you are trying to predict -- the correct answer. In this case, the label of the apple would be \"apple\", since we are trying to guess its name. \n",
91 | "\n",
92 | "\n",
93 | "\n",
94 | "The algorithm, just like the child, wants to associate the features with the labels. It wants to figure out that the red, round, hard fruit is called an apple. \n"
95 | ]
96 | },
97 | {
98 | "cell_type": "markdown",
99 | "metadata": {
100 | "id": "Hg8hkhadD_0G"
101 | },
102 | "source": [
103 | "#### Using the data in our ML model\n",
104 | "\n",
105 | "The algorithm will start off by essentially guessing which labels are associated with the features. \n",
106 | "\n",
107 | "If it gets the feature right, then that's great! Using mathematics, it will understand that those features are correlated with the correct label. From then on, it will continue to associate those features with the correct labels. \n",
108 | "\n",
109 | "However, if it gets the label wrong, it will use mathematics to determine \"okay, that actually made my program worse.\" From then on, it will understand that whatever mathematical patterns was in those features is not associated with the correct label. \n",
110 | "\n",
111 | "The machine learning model will run through thousands of these cycles (each one called an epoch) and see how these features and labels connect again and again. Each time, it carries over what it learned from the last cycles and continues to improve how well it matches with the data. Much like the human baby will use the patterns it learned in the past, the machine learning model will do the same. \n",
112 | "\n",
113 | ""
114 | ]
115 | },
116 | {
117 | "cell_type": "markdown",
118 | "metadata": {
119 | "id": "dwQDVkFtFVZb"
120 | },
121 | "source": [
122 | "#### Conclusion\n",
123 | "\n",
124 | "Just like humans learn different concepts in all different ways, there are countless different ways these machine learning concepts can be applied. But this is what most models boil down to: you feed data to an algorithm, and it mathematically associates certain features with certain labels. As we tell it whether its prediction was right or wrong, it adjusts and continues doing what we said was right to improve itself over time. "
125 | ]
126 | },
127 | {
128 | "cell_type": "markdown",
129 | "metadata": {
130 | "id": "cpBI2pPGAS-V"
131 | },
132 | "source": [
133 | "## Mathematics behind the concepts"
134 | ]
135 | },
136 | {
137 | "cell_type": "markdown",
138 | "metadata": {
139 | "id": "K9F-Vig0IX4p"
140 | },
141 | "source": [
142 | "I want to preface this section by saying that the mathematics may be very complicated depending on your familiarity with algebra. It is totally possible to get by with simply understanding the concepts behind machine learning and leaving the mathematics until later. In this course, this is essentially the only time we will be going over the fundamental math, as you don't need to be too familiar with it to succeed at a beginner level. \n",
143 | "\n",
144 | "With that said, if you are enthusiastic about how exactly the computer uses math to determine which features are associated with what labels, and how it learns from its past errors, this section will go over some common ways it does so!"
145 | ]
146 | },
147 | {
148 | "cell_type": "markdown",
149 | "metadata": {
150 | "id": "cl1sSHhiJrMV"
151 | },
152 | "source": [
153 | "### The Loss Function\n",
154 | "\n",
155 | "We know our model has an initial hypothesis about which features are correlated with which labels. \n",
156 | "\n",
157 | "In order to proceed, our model needs to understand how far off its prediction was from the real answer. To do so, we use a loss function. \n",
158 | "\n",
159 | "To be clear, there are a lot of different loss functions you can use — cross-entropy, mean-square error, and more. However, to keep it simple, we're going to focus on the most common one: mean-square error. \n",
160 | "\n",
161 | "Here is the mean square error loss function: \n",
162 | "\n",
163 | "\n",
164 | "\n",
165 | "On first take, this looks like a pretty intimidating math equation. However, it's not so bad once we understand it. Let's look at each part of it. \n",
166 | "\n",
167 | "n: the number of entries in our dataset\n",
168 | "\n",
169 | "i: which entry in the dataset we are on\n",
170 | "\n",
171 | "yi: the current y value that our function predicted\n",
172 | "\n",
173 | "yip: the true y value from the dataset \n",
174 | "\n",
175 | "1. First, let's look inside the parentheses. With yi - yip, we are subtracting the true value of the function from whatever our function predicted, which gives us the difference between the right and wrong answer. \n",
176 | "\n",
177 | "2. Then, we square this difference. This has been proven to be more effective in machine learning, but the mathematical proof is a bit complicated, so we aren't going to go over it here. Don't worry too much about this step.\n",
178 | "\n",
179 | "3. The sigma sign is the symbol that looks like a fancy \"e\". Basically, it's saying that we are going to do the (yi - yip)2 again and again for each value we have. After we find the difference of every value we have, we are going to add them all up. \n",
180 | "\n",
181 | "4. At this point, we got the difference for every prediction we made versus the real answer, squared it, and added them all up together. Now, we are going to divide it by the total number of predictions we made. \n",
182 | "\n",
183 | "You may remember that we find the mean, or average, of something by adding all its parts together and dividing by the total number of parts present. That's exactly what we are doing here. We are finding the difference between the model's predictions and the real value, squaring this difference, and finding the average for all predictions. \n",
184 | "\n",
185 | "So, what is our output? At this point, we would have a number that represents, on average, how wrong our model's prediction was compared to the real answer. Our model's fundamental goal is to minimize the output of this loss function, meaning it's the least wrong it can be. \n",
186 | "\n"
187 | ]
188 | },
189 | {
190 | "cell_type": "markdown",
191 | "metadata": {
192 | "id": "y_Y0qlySQHP0"
193 | },
194 | "source": [
195 | "### Using the Loss Function to improve accuracy\n",
196 | "\n",
197 | "Now, we have a target goal in mind. We want to decrase how wrong our machine learning model is by finding the miniumum of our loss function. \n",
198 | "\n",
199 | "Let's say we have a graph: \n",
200 | "\n",
201 | "\n",
202 | "\n",
203 | "The y coordinates of this graph represents our loss function. Remember, our goal is to minimize the loss function and find the lowest value it can have. So on this graph, if we are at the point \"initial weights\", we want the output of our loss function to be at the global minimum. \n",
204 | "\n",
205 | "So, how do we do this? \n",
206 | "\n",
207 | "Let's say our machine learning model does a couple predictions. It puts these predictions into the loss function and comes up with the output. Pretend that output is where the \"initial weights\" point is on the graph. \n",
208 | "\n",
209 | "Then, it does a couple more predictions. It puts all these predictions into the loss function and comes up with the output. However, let's say the loss function's output is actually higher than it was before. The model knows it's going in the wrong direction, since it should be going down, not up. \n",
210 | "\n",
211 | "So, it does even more predictions, but continues to change its predictions until it comes up with a lower loss function output than it initially had. Now, the model knows it's doing better, since it's being less wrong. \n",
212 | "\n",
213 | "The model continues to do this over and over again thousands of times, testing which way it can go before finding the path that lets it have a lower loss function output. \n",
214 | "\n",
215 | "Eventually it reaches the global minimum, where it cannot be get lower no matter what it does. We say that the model has converged, meaning it is the best it can be. "
216 | ]
217 | }
218 | ],
219 | "metadata": {
220 | "colab": {
221 | "collapsed_sections": [],
222 | "include_colab_link": true,
223 | "name": "LinearRegression.ipynb",
224 | "provenance": [],
225 | "toc_visible": true
226 | },
227 | "kernelspec": {
228 | "display_name": "Python 3",
229 | "language": "python",
230 | "name": "python3"
231 | },
232 | "language_info": {
233 | "codemirror_mode": {
234 | "name": "ipython",
235 | "version": 3
236 | },
237 | "file_extension": ".py",
238 | "mimetype": "text/x-python",
239 | "name": "python",
240 | "nbconvert_exporter": "python",
241 | "pygments_lexer": "ipython3",
242 | "version": "3.7.6"
243 | }
244 | },
245 | "nbformat": 4,
246 | "nbformat_minor": 1
247 | }
248 |
--------------------------------------------------------------------------------
/4_CNNTheory.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "kernelspec": {
6 | "display_name": "Python 3",
7 | "language": "python",
8 | "name": "python3"
9 | },
10 | "language_info": {
11 | "codemirror_mode": {
12 | "name": "ipython",
13 | "version": 3
14 | },
15 | "file_extension": ".py",
16 | "mimetype": "text/x-python",
17 | "name": "python",
18 | "nbconvert_exporter": "python",
19 | "pygments_lexer": "ipython3",
20 | "version": "3.8.3"
21 | },
22 | "colab": {
23 | "name": "cnnTheory.ipynb",
24 | "provenance": [],
25 | "include_colab_link": true
26 | }
27 | },
28 | "cells": [
29 | {
30 | "cell_type": "markdown",
31 | "metadata": {
32 | "id": "view-in-github",
33 | "colab_type": "text"
34 | },
35 | "source": [
36 | ""
37 | ]
38 | },
39 | {
40 | "cell_type": "markdown",
41 | "metadata": {
42 | "id": "XPMG6ZqGnnds",
43 | "colab_type": "text"
44 | },
45 | "source": [
46 | "# Theory of Convolutional Neural Networks (CNN)"
47 | ]
48 | },
49 | {
50 | "cell_type": "markdown",
51 | "metadata": {
52 | "id": "BOaePd7cn4Qf",
53 | "colab_type": "text"
54 | },
55 | "source": [
56 | "## Introduction to CNNs\n",
57 | "\n",
58 | "Imagine that we want to create a neural network that can recognize a cat versus a dog. Our brains has been trained to recognize a variety of patterns differentiating a cat and a dog -- furriness, size, bone structure, etc. We can replicate this same process with neural networks, which are based off the human brain. Specifically, we do so using Convolutional Neural Networks (CNNs), which can recognize these patterns and differentiate between them. Much like other aspects of neural networks, CNNs are based off human anatomy, specifically the visual cortex of the brain. \n",
59 | "\n",
60 | "A CNN is a Deep Learning algorithm which can take in an input image, assign importance (learnable weights and biases) to various patterns in the image and be able to differentiate one from the other. A CNN is able to use much less pre-processing compared to other classification algorithms. While a traditional neural network has to hand-determine filters, a CNN is able to learn these filters by itself. \n",
61 | "\n",
62 | "CNNs are most commonly used for image processing, classification, segmentation and also for other auto correlated data. For example, we applied CNNs to classify images as either cats or dogs. \n",
63 | "\n",
64 | "This guide includes: \n",
65 | "- Introduction to CNNs\n",
66 | "- Traditional Neural Networks vs CNNs\n",
67 | "- Convolutional Layers\n",
68 | "- Pooling Layers\n",
69 | "- Fully Connected Layer"
70 | ]
71 | },
72 | {
73 | "cell_type": "markdown",
74 | "metadata": {
75 | "id": "oUyYNvdov_Ww",
76 | "colab_type": "text"
77 | },
78 | "source": [
79 | "### Traditional Nueral Networks vs CNNs"
80 | ]
81 | },
82 | {
83 | "cell_type": "markdown",
84 | "metadata": {
85 | "id": "5tvHtZtswHWm",
86 | "colab_type": "text"
87 | },
88 | "source": [
89 | "At first glance, it's not completely clear why we need a CNN versus a traditional neural network. Hypothetically, we could do the same processes just by flattening an image out into an array of its pixels, as shown below. \n",
90 | "\n",
91 | "\n",
92 | "\n",
93 | "However, by doing this, we would lose all the spatial recognition between pixels -- for example, the relationship between the top left 1 and the middle 2. It would be virtually impossible to have good accuracy with all this spatial recognition lost by flattening the image into an array. \n",
94 | "\n",
95 | "A CNN is able to succcessfully capture the Spatial dependencies by applying relevant filters. The architecture performs a better fit to the image dataset by reducing the number of parameters involved and allowing reusability of weights. Across the board, the network can understand the image in general much better. "
96 | ]
97 | },
98 | {
99 | "cell_type": "markdown",
100 | "metadata": {
101 | "id": "mOC1o_VCoTA8",
102 | "colab_type": "text"
103 | },
104 | "source": [
105 | "## Layers of a CNN\n",
106 | "\n",
107 | "A CNN usually has 3 main layers: \n",
108 | "- Convolutional Layer: differentiates various patterns/features in the image dataset -- for example, a nose, a paw, etc. \n",
109 | "- Pooling layer: improves efficiency of the program\n",
110 | "- Fully connected layer: assigns importance to specific features through weights\n",
111 | "\n",
112 | "\n",
113 | "\n",
114 | "In a machine learning model, one convolutional layer is paired with one pooling layer. For example, in our cats and dogs demo, this is what the model structure looks like: \n",
115 | "- Convolutional layer\n",
116 | "- Pooling layer\n",
117 | "- Convolutional Layer\n",
118 | "- Pooling layer\n",
119 | "- Convolutional layer\n",
120 | "- Pooling Layer\n",
121 | "- Fully connected layer\n",
122 | "\n"
123 | ]
124 | },
125 | {
126 | "cell_type": "markdown",
127 | "metadata": {
128 | "id": "Rzh5oTJaqpc-",
129 | "colab_type": "text"
130 | },
131 | "source": [
132 | "## Convolutional Layers\n",
133 | "\n",
134 | "The convolutional layer is the backbone of a CNN and will extract features from an input image. Convolution preserves the relationship between pixels by learning image features using small squares of input data. \n"
135 | ]
136 | },
137 | {
138 | "cell_type": "markdown",
139 | "metadata": {
140 | "id": "l-T8xc4MvRl6",
141 | "colab_type": "text"
142 | },
143 | "source": [
144 | "### Filters\n",
145 | "\n",
146 | "Convolution will learn these features through a mathematical operation that takes 2 inputs, specifically an image matrix from the original image and a filter. \n",
147 | "\n",
148 | "A filter is essentially a matrix of learnable weights that is learned through backpropogation. A filter is able to slice through an image and map each section one by one, learning different portions one by one. For example, if a small filter is looking for a dark edge, each time a match is found, you output that onto another matrix. By improving the filter through back-propogation each time, you gradually train the filter to recognize deep patterns in the set of images. \n",
149 | "\n",
150 | "Imagine, for example, that we have a 5x5 matrix with image pixel values of 0, 1 and a filter matrix 3 x 3 as shown below. \n",
151 | "\n",
152 | "\n",
153 | "\n",
154 | "We would then perform convolution by multiplying the 5x5 matrix with a 3x3 filter at each section. This will output a feature map, which is depicted below as a pink matrix. \n",
155 | "\n",
156 | "\n",
157 | "\n",
158 | "By convoluting the image with different filters, we can perform various operations such as edge detection, blur, and sharpen. \n",
159 | "\n",
160 | "\n"
161 | ]
162 | },
163 | {
164 | "cell_type": "markdown",
165 | "metadata": {
166 | "id": "EVFTojU-uSpZ",
167 | "colab_type": "text"
168 | },
169 | "source": [
170 | "### Strides\n",
171 | "\n",
172 | "Filters are not the only trainable variable. Strides, which are the number of pixel sihfts over the input matrix, can have a noticeable effect on the results. For example, in the image above, you can see we move the matrix over one pixel at a time. As opposed to this, the image below shows how it may look if we moved the matrix over two pixels at a time. \n",
173 | "\n",
174 | "\n"
175 | ]
176 | },
177 | {
178 | "cell_type": "markdown",
179 | "metadata": {
180 | "id": "XqxuauAauMje",
181 | "colab_type": "text"
182 | },
183 | "source": [
184 | "### Padding\n",
185 | "Sometimes, the filter doesn't perfectly fit the input image. In this case, we usually have two options. \n",
186 | "1. Pad the picture with zeros to make it compatible with the filter (zero-padding)\n",
187 | "2. Drop the section of the image where the filter didn't fit (valid padding)\n",
188 | "\n",
189 | "Both are acceptable ways of making the filter and the image compatible. "
190 | ]
191 | },
192 | {
193 | "cell_type": "markdown",
194 | "metadata": {
195 | "id": "3X78Q-w6sEkm",
196 | "colab_type": "text"
197 | },
198 | "source": [
199 | "##Pooling layers"
200 | ]
201 | },
202 | {
203 | "cell_type": "markdown",
204 | "metadata": {
205 | "id": "8tW_AP2uoTgh",
206 | "colab_type": "text"
207 | },
208 | "source": [
209 | "The Pooling Layer is able to reduce the spatial size of the convolved feature. This allows your program to decrease the computational power required to process the data, which is far more efficient. In addition, it can isolate the dominant features of an image that don't depend on rotation or position, which we always want with image recognition. \n",
210 | "\n",
211 | ""
212 | ]
213 | },
214 | {
215 | "cell_type": "markdown",
216 | "metadata": {
217 | "id": "PC9MlY22oKaw",
218 | "colab_type": "text"
219 | },
220 | "source": [
221 | "There are 2 main types of pooling: Max Pooling and Average Pooling.\n",
222 | "\n",
223 | "Max Pooling will return the maxiumum value from the portion of the image covered by the filter. On the other hand, Average Pooling will return the avearge of all the values from the portion of the image covered by the filter. \n",
224 | "\n",
225 | "In general, Max Pooling performs far better than Average Pooling. Max Pooling is essentially a noise suppressant, which will discard the irrelevant activations and reduce dimensionality. Average Pooling will simply perform dimenionality reduction as a noise suppressing mechanism. We don't need all this extra noise in our system, so we typically use Max Pooling. "
226 | ]
227 | },
228 | {
229 | "cell_type": "markdown",
230 | "metadata": {
231 | "id": "_TKklWEkoQvC",
232 | "colab_type": "text"
233 | },
234 | "source": [
235 | "We typically put the convolutional layer and its associated pooling layer together to form the i-th layer of a CNN. Depending on the complexities in the image, the number of layers may be increased to further capture low-level details, but this must be weighed against the computational power available. \n",
236 | "\n",
237 | "At this point, the model is able to understand the features of a neural network. From here, we can flatten the final output and feed it to a regular neural network for classification, which we do using the Fully Connected Layer."
238 | ]
239 | },
240 | {
241 | "cell_type": "markdown",
242 | "metadata": {
243 | "id": "TyK1rizYsEsW",
244 | "colab_type": "text"
245 | },
246 | "source": [
247 | "##Fully Connected Layer\n",
248 | "A Fully Connected layer is essentially a normal neural network layer. Our model is now able to recognize and understand the specific features in our image. The Fully Connected layer is a way to determine non-linear relationships between these features and assign importance to each of them during classification. \n",
249 | "\n",
250 | "At this point, our input image has been converted to a suitable form for our Multi-Level Perception. Therefore, we can flatten this image into a column vector. After doing so, we can feed this vector to a neural network and apply backpropogation to ever iteration of training. By doing this over numerous epochs, the model can distinguish between dominating and low-level features in images. "
251 | ]
252 | }
253 | ]
254 | }
--------------------------------------------------------------------------------
/6_Intro_to_NLP.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "kernelspec": {
6 | "display_name": "Python 3",
7 | "language": "python",
8 | "name": "python3"
9 | },
10 | "language_info": {
11 | "codemirror_mode": {
12 | "name": "ipython",
13 | "version": 3
14 | },
15 | "file_extension": ".py",
16 | "mimetype": "text/x-python",
17 | "name": "python",
18 | "nbconvert_exporter": "python",
19 | "pygments_lexer": "ipython3",
20 | "version": "3.7.6"
21 | },
22 | "colab": {
23 | "name": "Intro_to_NLP.ipynb",
24 | "provenance": [],
25 | "toc_visible": true,
26 | "include_colab_link": true
27 | }
28 | },
29 | "cells": [
30 | {
31 | "cell_type": "markdown",
32 | "metadata": {
33 | "id": "view-in-github",
34 | "colab_type": "text"
35 | },
36 | "source": [
37 | ""
38 | ]
39 | },
40 | {
41 | "cell_type": "markdown",
42 | "metadata": {
43 | "id": "wvdjN-w1gojl",
44 | "colab_type": "text"
45 | },
46 | "source": [
47 | "# 1. What is NLP?\n",
48 | "We edited these materials from the FastAI NLP Course, so full credit to them.\n",
49 | "Here is the repo: https://github.com/fastai/course-nlp\n",
50 | "We also referenced a blog from Algorithma: https://algorithmia.com/blog/introduction-natural-language-processing-nlp\n",
51 | "\n",
52 | "Natural language processing (NLP) is a field of artificial intelligence in which computers analyze, understand, and derive meaning from human language in a smart and useful way. By utilizing NLP, developers can organize and structure knowledge to perform tasks such as automatic summarization, translation, named entity recognition, relationship extraction, sentiment analysis, speech recognition, and topic segmentation.\n",
53 | "\n",
54 | "Some examples of NLP are with common products such as: \n",
55 | "- Amazon Alexa/Google Home\n",
56 | "- Spam detectors\n",
57 | "- Google Search\n",
58 | "- Lemmatization\n",
59 | "\n",
60 | "Besides common word processors, NLP considers the hierarchical structure of language.\n",
61 | "- several words make a phrase\n",
62 | "- several phrases make a sentence\n",
63 | "- sentences convey ideas \n",
64 | "\n",
65 | "John Rehling, an NLP expert at Meltwater Group, said in How Natural Language Processing Helps Uncover Social Media Sentiment. “By analyzing language for its meaning, NLP systems have long filled useful roles, such as correcting grammar, converting speech to text and automatically translating between languages.”\n",
66 | "\n",
67 | "NLP is used to analyze text, allowing machines to understand how humans speak. This human-computer interaction enables real-world applications like automatic text summarization, sentiment analysis, topic extraction, named entity recognition, parts-of-speech tagging, relationship extraction, stemming, and more. NLP is commonly used for text mining, machine translation, and automated question answering.\n",
68 | "\n",
69 | "NLP is very difficult in computer science because human language is rarely precise or plainly spoken. To understand human language is to understand not only the words, but the concepts and how they’re linked together to create meaning. Despite language being one of the easiest things for the human mind to learn, the ambiguity of language is what makes natural language processing a difficult problem for computers to master."
70 | ]
71 | },
72 | {
73 | "cell_type": "markdown",
74 | "metadata": {
75 | "id": "RqVUx5Dzgojn",
76 | "colab_type": "text"
77 | },
78 | "source": [
79 | "## What can you do with NLP?"
80 | ]
81 | },
82 | {
83 | "cell_type": "markdown",
84 | "metadata": {
85 | "id": "3hDUJg_Pgojo",
86 | "colab_type": "text"
87 | },
88 | "source": [
89 | "NLP algorithms have a variety of uses. Basically, they allow developers to create a software that understands human language. Due to the complicated nature of human language, NLP can be difficult to learn and implement correctly. However, with the knowledge gained from this article, you will be better equipped to use NLP successfully. Some of the projects developers can use NLP algorithms for are:\n",
90 | "\n",
91 | "- Part-of-speech tagging: identify if each word is a noun, verb, adjective, etc.\n",
92 | "- Named entity recognition NER: identify person names, organizations, locations, medical codes, time expressions, quantities, monetary values, etc.\n",
93 | "- Question answering\n",
94 | "- Speech recognition\n",
95 | "- Text-to-speech and Speech-to-text\n",
96 | "- Topic modeling\n",
97 | "- Sentiment classification\n",
98 | "- Language modeling\n",
99 | "- Translation"
100 | ]
101 | },
102 | {
103 | "cell_type": "markdown",
104 | "metadata": {
105 | "id": "CaYeqegogojp",
106 | "colab_type": "text"
107 | },
108 | "source": [
109 | "Many techniques from NLP are useful in a variety of places, for instance, you may have text within your tabular data.\n",
110 | "\n",
111 | "There are also interesting techniques that let you go between text and images:"
112 | ]
113 | },
114 | {
115 | "cell_type": "markdown",
116 | "metadata": {
117 | "id": "jmuGvP_Vgojs",
118 | "colab_type": "text"
119 | },
120 | "source": [
121 | "## A changing field"
122 | ]
123 | },
124 | {
125 | "cell_type": "markdown",
126 | "metadata": {
127 | "id": "Y3HTqhmAgojt",
128 | "colab_type": "text"
129 | },
130 | "source": [
131 | "Historically, NLP originally relied on hard-coded rules about a language. In the 1990s, there was a change towards using statistical & machine learning approaches, but the complexity of natural language meant that simple statistical approaches were often not state-of-the-art. We are now currently in the midst of a major change in the move towards neural networks. Because deep learning allows for much greater complexity, it is now achieving state-of-the-art for many things.\n",
132 | "\n",
133 | "This doesn't have to be binary: there is room to combine deep learning with rules-based approaches."
134 | ]
135 | },
136 | {
137 | "cell_type": "markdown",
138 | "metadata": {
139 | "id": "hm7Eka2ygoj7",
140 | "colab_type": "text"
141 | },
142 | "source": [
143 | "## Here is a quick Intro Video\n",
144 | "https://www.youtube.com/watch?v=5ctbvkAMQO4\n",
145 | "Stop at 5:25"
146 | ]
147 | },
148 | {
149 | "cell_type": "markdown",
150 | "metadata": {
151 | "id": "Gzsi94zXgoj7",
152 | "colab_type": "text"
153 | },
154 | "source": [
155 | "## Resources"
156 | ]
157 | },
158 | {
159 | "cell_type": "markdown",
160 | "metadata": {
161 | "id": "Zm4H74aggoj8",
162 | "colab_type": "text"
163 | },
164 | "source": [
165 | "**Books**\n",
166 | "\n",
167 | "Here are a few helpful references if you want to get really in-depth: (Note, these are really advanced)\n",
168 | "\n",
169 | "- [**Speech and Language Processing**](https://web.stanford.edu/~jurafsky/slp3/), by Dan Jurafsky and James H. Martin (free PDF)\n",
170 | "\n",
171 | "- [**Introduction to Information Retrieval**](https://nlp.stanford.edu/IR-book/html/htmledition/irbook.html) by By Christopher D. Manning, Prabhakar Raghavan, and Hinrich Schütze (free online)\n",
172 | "\n",
173 | "- [**Natural Language Processing with PyTorch**](https://learning.oreilly.com/library/view/natural-language-processing/9781491978221/) by Brian McMahan and Delip Rao (need to purchase or have O'Reilly Safari account) \n",
174 | "\n",
175 | "**Blogs**\n",
176 | "\n",
177 | "Good NLP-related blogs:\n",
178 | "- [Sebastian Ruder](http://ruder.io/)\n",
179 | "- [Joyce Xu](https://medium.com/@joycex99)\n",
180 | "- [Jay Alammar](https://jalammar.github.io/)\n",
181 | "- [Stephen Merity](https://smerity.com/articles/articles.html)\n",
182 | "- [Rachael Tatman](https://towardsdatascience.com/evaluating-text-output-in-nlp-bleu-at-your-own-risk-e8609665a213)"
183 | ]
184 | },
185 | {
186 | "cell_type": "markdown",
187 | "metadata": {
188 | "id": "8lSfftvKgoj9",
189 | "colab_type": "text"
190 | },
191 | "source": [
192 | "## NLP Tools"
193 | ]
194 | },
195 | {
196 | "cell_type": "markdown",
197 | "metadata": {
198 | "id": "A6Ec1jSOgoj-",
199 | "colab_type": "text"
200 | },
201 | "source": [
202 | "- Regex (example: find all phone numbers: 123-456-7890, (123) 456-7890, etc.)\n",
203 | "- Tokenization: splitting your text into meaningful units (has a different meaning in security)\n",
204 | "- Lemmatization: grouping together the different conjugations of a word so they can be analyzed together \n",
205 | "- Word embeddings\n",
206 | "- Linear algebra/matrix decomposition\n",
207 | "- Neural nets\n",
208 | "- Hidden Markov Models\n",
209 | "- Parse trees"
210 | ]
211 | },
212 | {
213 | "cell_type": "markdown",
214 | "metadata": {
215 | "id": "qVJrYOEPgoj-",
216 | "colab_type": "text"
217 | },
218 | "source": [
219 | "## Python Libraries"
220 | ]
221 | },
222 | {
223 | "cell_type": "markdown",
224 | "metadata": {
225 | "id": "kClVSvqMgoj_",
226 | "colab_type": "text"
227 | },
228 | "source": [
229 | "- [nltk](https://www.nltk.org/): first released in 2001, very broad NLP library\n",
230 | "- [spaCy](https://spacy.io/): creates parse trees, excellent tokenizer, opinionated\n",
231 | "- [gensim](https://radimrehurek.com/gensim/): topic modeling and similarity detection\n",
232 | "\n",
233 | "specialized tools:\n",
234 | "- [PyText](https://pytext-pytext.readthedocs-hosted.com/en/latest/)\n",
235 | "- [fastText](https://fasttext.cc/) has library of embeddings\n",
236 | "\n",
237 | "general ML/DL libraries with text features:\n",
238 | "- [sklearn](https://scikit-learn.org/stable/): general purpose Python ML library\n",
239 | "- [fastai](https://docs.fast.ai/): fast & accurate neural nets using modern best practices, on top of PyTorch"
240 | ]
241 | },
242 | {
243 | "cell_type": "markdown",
244 | "metadata": {
245 | "collapsed": true,
246 | "id": "BaTTktK1goj_",
247 | "colab_type": "text"
248 | },
249 | "source": [
250 | "## Ethics issues"
251 | ]
252 | },
253 | {
254 | "cell_type": "markdown",
255 | "metadata": {
256 | "id": "KlddDSoMgokA",
257 | "colab_type": "text"
258 | },
259 | "source": [
260 | "### Bias\n",
261 | "\n",
262 | "- [How Vector Space Mathematics Reveals the Hidden Sexism in Language](https://www.technologyreview.com/s/602025/how-vector-space-mathematics-reveals-the-hidden-sexism-in-language/)\n",
263 | "- [Semantics derived automatically from language corpora contain human-like biases](https://arxiv.org/abs/1608.07187)\n",
264 | "- [Lipstick on a Pig: Debiasing Methods Cover up Systematic Gender Biases in Word Embeddings But do not Remove Them](https://arxiv.org/abs/1903.03862)\n",
265 | "- [Word Embeddings, Bias in ML, Why You Don't Like Math, & Why AI Needs You](https://www.youtube.com/watch?v=25nC0n9ERq4&list=PLtmWHNX-gukLQlMvtRJ19s7-8MrnRV6h6&index=9)"
266 | ]
267 | }
268 | ]
269 | }
--------------------------------------------------------------------------------
/7_ProjectIdeas.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "ProjectIdeas.ipynb",
7 | "provenance": [],
8 | "include_colab_link": true
9 | },
10 | "kernelspec": {
11 | "display_name": "Python 3",
12 | "language": "python",
13 | "name": "python3"
14 | },
15 | "language_info": {
16 | "codemirror_mode": {
17 | "name": "ipython",
18 | "version": 3
19 | },
20 | "file_extension": ".py",
21 | "mimetype": "text/x-python",
22 | "name": "python",
23 | "nbconvert_exporter": "python",
24 | "pygments_lexer": "ipython3",
25 | "version": "3.7.6"
26 | }
27 | },
28 | "cells": [
29 | {
30 | "cell_type": "markdown",
31 | "metadata": {
32 | "id": "view-in-github",
33 | "colab_type": "text"
34 | },
35 | "source": [
36 | ""
37 | ]
38 | },
39 | {
40 | "cell_type": "markdown",
41 | "metadata": {
42 | "colab_type": "text",
43 | "id": "VqEuW3xvVlM5"
44 | },
45 | "source": [
46 | "Here is a list of project ideas that you guys can use. Of course, we encourage you guys to be creative and potentially come up with your own ideas. \n",
47 | "\n",
48 | "1. MNIST Hand-Written Digits Classification\n",
49 | " - This is a really basic machine learning project, you will classify hand written digits as 1 to 10. \n",
50 | " - You will make a CNN that will be able to classify the images. \n",
51 | " - Lastly, you will make a small application that allows you to draw a digit and the system will tell you if you are drawing the digit correctly.\n",
52 | " - https://data-flair.training/blogs/python-deep-learning-project-handwritten-digit-recognition/\n",
53 | " \n",
54 | " \n",
55 | "2. Salary Predictor\n",
56 | " - This is a very simple linear regression project where you will attempt to predict someone's salary based on how many years they have worked\n",
57 | " - You will use a very basic dataset and with that you will create a linear regression model to guess salaries.\n",
58 | " - https://github.com/SiP-AI-ML/LessonMaterials/blob/master/LinearRegressionProject.ipynb\n",
59 | "\n",
60 | "3. Soccer Winner Predictions\n",
61 | " - This project is meant to take a soccer team's data and see if they will win games based on their previous statisitcs.\n",
62 | " - You will learn how to analyze data and statistics in a formatted method to make predictions.\n",
63 | " - You will learn about machine learning algorithms that can make predictions for winners and losers. \n",
64 | " - You will learn how to collect data from different websites.\n",
65 | " - https://github.com/llSourcell/Predicting_Winning_Teams\n",
66 | "\n",
67 | "4. Stock Price Predictions\n",
68 | " - Guess the prices of stocks based on the market previously. \n",
69 | " - You will learn how to use the most up to date data and make predictions\n",
70 | " - You can use a variety of different algorithms such as linear regression, logistic regression, or clustering.\n",
71 | " - This is one of the more easy projects.\n",
72 | " - https://www.analyticsvidhya.com/blog/2018/10/predicting-stock-price-machine-learningnd-deep-learning-techniques-python/\n",
73 | " \n",
74 | "5. CIFAR-10 Image Classification\n",
75 | " - This is a similar dataset to the MNIST dataset, but you have to predict which class an image is, and they are not digits. \n",
76 | " - The images to classify are Airplane, Car, Bird, Cat, Deer, Dog, Frog, Horse, Ship, and Truck\n",
77 | " - You will build a CNN to classify these images using Keras. \n",
78 | " - This is a harder task than the MNIST Dataset because the images are more complex and have more going on.\n",
79 | " - https://data-flair.training/blogs/image-classification-deep-learning-project-python-keras/\n",
80 | "\n",
81 | "6. Fake News Detection Project\n",
82 | " - Fake news is obviously a huge problem with misinformation, and you can use machine learning to differentiate it from real news. \n",
83 | " - You will extensively learn about NLP, tokenization, lemmatization, classifiers, and more. \n",
84 | " - If you didn't understand the NLP stuff that much, maybe try one of the earler projects\n",
85 | " - https://data-flair.training/blogs/advanced-python-project-detecting-fake-news/ \n",
86 | "\n",
87 | "7. Emojify – Create your own emoji with Deep Learning\n",
88 | " - We will build a deep learning model to classify facial expressions. Then, we will map the classified emotion to an emoji or an avatar.\n",
89 | " - This is a harder project, but it's very cool and uses many groundbreaking concepts\n",
90 | " - You will work with cameras, use keras models, and more. \n",
91 | " - This is one of the hardest projects to choose from, so you will have to do a lot on your own between classes. This is an advanced project, so choose a more beginner project if you struggled with many of our advanced topics.\n",
92 | " - https://data-flair.training/blogs/create-emoji-with-deep-learning/\n",
93 | " \n",
94 | "8. Home Price Predictions\n",
95 | " - For this project, you will try to predict the prices of homes based on the data provided.\n",
96 | " - The data is in the example_data folder in our repo, just link the raw version.\n",
97 | " - This is a fun project where you can learn about logisitc regression, neural networks, and other types of models\n",
98 | " - It is an intermediate level project, not too difficult though\n",
99 | " - https://www.hackerearth.com/practice/machine-learning/machine-learning-projects/python-project/tutorial/\n",
100 | "\n",
101 | "9. Breast Cancer Detection\n",
102 | " - classify whether breast cancer is benign (not harmful) or malignant (harmful)\n",
103 | " - use multiple factors (e.g. age, family history, genetics, etc) to determine classification\n",
104 | " - note: this project involves a lot of biological background and information, so we only recommend it for our older students\n",
105 | " https://towardsdatascience.com/building-a-simple-machine-learning-model-on-breast-cancer-data-eca4b3b99fa3\n",
106 | "\n",
107 | "10. Iris Flower Classification\n",
108 | " - In this project, you have to classify a flower in three different categories: Setosa, Virginica, and Versicolor.\n",
109 | " - You will work with a CSV file and classify flowers based on their attributes.\n",
110 | " - https://github.com/aayush2906/Iris_flower_classification-Data-Science\n",
111 | "\n",
112 | "11. Classifying IMDb movie reviews as positive or negative\n",
113 | " - you will learn about sentiment analysis, which is a big topic in NLP\n",
114 | " - you will use logistic regression, which classifies the output as 0 or 1\n",
115 | " - this is a decently easy project and be too easy\n",
116 | " - https://towardsdatascience.com/sentiment-analysis-with-python-part-1-5ce197074184\n",
117 | "\n",
118 | "12. Credit Card Fraud Detection\n",
119 | " - Credit card fraud is a huge problem allowing (bad) hackers to steal money, forcing victims into terrible debt\n",
120 | " - you will learn about the Random Forest model, which uses decision trees to classify outputs and introduces you to new concepts\n",
121 | " - this is a very advanced project for those who want to go further beyond\n",
122 | " - https://medium.com/analytics-vidhya/credit-card-fraud-detection-in-python-using-scikit-learn-f9046a030f50"
123 | ]
124 | }
125 | ]
126 | }
--------------------------------------------------------------------------------
/8_FurtherLearning.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "kernelspec": {
6 | "display_name": "Python 3",
7 | "language": "python",
8 | "name": "python3"
9 | },
10 | "language_info": {
11 | "codemirror_mode": {
12 | "name": "ipython",
13 | "version": 3
14 | },
15 | "file_extension": ".py",
16 | "mimetype": "text/x-python",
17 | "name": "python",
18 | "nbconvert_exporter": "python",
19 | "pygments_lexer": "ipython3",
20 | "version": "3.7.6"
21 | },
22 | "colab": {
23 | "name": "furtherLearning.ipynb",
24 | "provenance": [],
25 | "include_colab_link": true
26 | }
27 | },
28 | "cells": [
29 | {
30 | "cell_type": "markdown",
31 | "metadata": {
32 | "id": "view-in-github",
33 | "colab_type": "text"
34 | },
35 | "source": [
36 | ""
37 | ]
38 | },
39 | {
40 | "cell_type": "markdown",
41 | "metadata": {
42 | "id": "XcDMVRzHUDj5",
43 | "colab_type": "text"
44 | },
45 | "source": [
46 | "Congrats! The Intro to AI course is now over. We really hoped that you guys enjoyed the last 8 weeks, because we really enjoyed teaching you all. \n",
47 | "\n",
48 | "You all have learned a lot so far, but there is obviously still a lot to learn. We recommend that you guys rewatch any videos and re-read any notebooks that you missed or that you want to brush up on.\n",
49 | "\n",
50 | "We recommend that you guys put your coding skills to the test now. We recommend hackathons, as its a great way to put your coding skills to the test in a fun way. \n",
51 | "\n",
52 | "Here are some places to find hackathons: \n",
53 | "Devpost: https://devpost.com/\n",
54 | "Hackclub Hackathon Listing: https://hackathons.hackclub.com/\n",
55 | "\n",
56 | "- In addition, we will be starting a hackathon club at Saratoga High School. For those of you interested in hackathons and entering SHS next year, be sure to join! We'll teach you guys more about hackathons and strategies to consistently win at them. \n",
57 | "\n",
58 | "For more courses, go check out these free or cheap courses online: \n",
59 | "Machine Learning on Coursera: \n",
60 | "- https://www.coursera.org/learn/machine-learning/home/welcome\n",
61 | "- [Extremely in-depth course by renowned Stanford professor Andrew Ng](https://www.coursera.org/learn/machine-learning?utm_source=gg&utm_medium=sem&utm_content=07-StanfordML-US&campaignid=685340575&adgroupid=52515609594&device=c&keyword=machine%20learning%20mooc&matchtype=b&network=g&devicemodel=&adpostion=&creativeid=243289762946&hide_mobile_promo&gclid=EAIaIQobChMI9ea9ndyM6wIV4D6tBh1CzQIMEAAYAiAAEgKzKPD_BwE)\n",
62 | "\n",
63 | "\n",
64 | "If you guys have any questions during the school year, email us!\n",
65 | "- Ayaan: ayaanzhaque@gmail.com\n",
66 | "- Viraaj: viraajreddi@gmail.com"
67 | ]
68 | }
69 | ]
70 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Intro to AI Course
2 |
3 | Open Sourced Materials for the Intro to AI Course
4 |
5 | Medium Article on the course: https://medium.com/better-programming/how-to-teach-ai-and-ml-to-middle-schoolers-34bf59262ea8
6 |
7 | This is a detailed repository for an introductory AI and Machine Learning course for complete beginners. The course begins by covering the basics of AI and Machine Learning, and has lots of code and notebook examples. The course covers standard machine learning algorithms and progresses to building full-scale deep neural networks. By the end of the course, you will be able to build your own machine learning algorithms and deep neural networks and complete many different types of projects. At the end of the course, we have a variety of to explore, ranging from topics of image classification, time series analysis, and natural langauge processing.
8 |
9 | To use this repository, follow the order of notebooks/presentations. This course can be completed over any period of time, but it is recommended that the notebooks are completed in order. The examples are coded primarly with Sci-kit (traditional machine learning algorithms) and Keras (Deep Learning/Neural Networks). A background in coding and python is highly recommended, but not entirely necessary.
10 |
11 | **Please star this repo if you found it helpful! If you want to use this repository, please fork it to get the materials.** This will help us with exposure and growing our course. If you would like to join the organization to add your own repository with code, please email us! (ayaanzhaque@gmail.com, viraajreddi@gmail.com)
12 |
13 | ## Lesson Videos
14 |
15 | Here are pre-recorded lectures for each of the 6 lessons. Watch them in order, and whenever there are code examples, just open up the notebook and follow along.
16 |
17 | The entire playlist is here: https://www.youtube.com/playlist?list=PLWj-3LXfs4r0pD_fzYXUa2PFJ5JHKwaaW
18 |
19 | Overview of AI/ML (Lesson 1): https://youtu.be/pWXR7kh_65g
20 |
21 | Machine Learning Theory (Lesson 2): https://youtu.be/RHcKxr0cbj4
22 |
23 | Deep Learning Theory and Concepts (Lesson 3): https://youtu.be/8oROUOisDzI
24 |
25 | CNN Theory (Lesson 4): https://youtu.be/0RFPyCBoa20
26 |
27 | CNN and NN Examples in Keras (Lesson 5): https://youtu.be/pGWwDAiB3Ic
28 |
29 | Natural Language Processing Theory and Examples (Lesson 6): https://youtu.be/y6swv4_Gh_U
30 |
31 | ## Intro to AI Course Summer 2020
32 |
33 | Summer 2020, June 23 - August 11, 8 classes once every week on Tuesdays 5 PM.
34 |
35 | The Intro to AI course is a free course for middle school students to gain a basic understanding of Artificial Intelligence and Machine Learning. Throughout 8 weeks, Ayaan Haque and Viraaj Reddi covered various machine learning topics, from the mathematical theory to neural networks to NLP. By open sourcing these materials, we hope that others can begin guiding young students into the field of AI/ML.
36 |
37 | To use the lessons, follow the presentations/notebooks in order, and watch the video associated with the lesson.
38 |
39 | **Note:** Weeks 7 and 8 were for individual projects, so the videos aren't provided.
40 |
41 | Week 1: https://www.youtube.com/watch?v=3O0umGVjwW8&feature=youtu.be (Introduction)
42 |
43 | Week 2: Currently Unavailable (Linear Regression)
44 |
45 | Week 3: https://www.youtube.com/watch?v=kwzVjyIwcwU&feature=youtu.be (Deep Learning Introduction)
46 |
47 | Week 4: https://www.youtube.com/watch?v=3e3v1MXOTo4&feature=youtu.be (CNN Theory and Explanation)
48 |
49 | Week 5: https://www.youtube.com/watch?v=UvsA06Bz7mo&feature=youtu.be (Building a Neural Network with Keras)
50 |
51 | Week 6: Currently Unavailable (Introduction to Natural Language Processing)
52 |
53 | Week 7-8: Worked on Projects(No Video)
54 |
55 | ## Intro to AI Course Summer 2021
56 |
57 | Summer 2021, June 20 - August 15, 8 classes once every week on Sundays 4 PM.
58 |
59 | Week 1: Introduction to Artificial Intelligence (AI) and Machine Learning (ML)
60 |
61 | Week 2: Overview of Machine Learning Concepts
62 |
63 | Week 3: Machine Learning Code
64 |
65 | Week 4: Overview of Deep Learning
66 |
67 | Week 5: Convolutional Neural Networks
68 |
69 | Week 6: Keras CNN Walkthrough
70 |
71 | Weeks 7-8: Projects
72 |
73 | ## Contact
74 |
75 | Email us at:
76 | - ayaanzhaque@gmail.com
77 | - viraajreddi@gmail.com
78 |
--------------------------------------------------------------------------------
/images/ANN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/ANN.png
--------------------------------------------------------------------------------
/images/MSE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/MSE.png
--------------------------------------------------------------------------------
/images/SGD.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/SGD.jpeg
--------------------------------------------------------------------------------
/images/Test-vs-TrainAcc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/Test-vs-TrainAcc.png
--------------------------------------------------------------------------------
/images/adamOpt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/adamOpt.png
--------------------------------------------------------------------------------
/images/deepLearning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/deepLearning.png
--------------------------------------------------------------------------------
/images/differentSets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/differentSets.png
--------------------------------------------------------------------------------
/images/focusingCostFunction.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/focusingCostFunction.png
--------------------------------------------------------------------------------
/images/generalGraph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/generalGraph.png
--------------------------------------------------------------------------------
/images/gradientGraph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/gradientGraph.png
--------------------------------------------------------------------------------
/images/h5image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/h5image.png
--------------------------------------------------------------------------------
/images/learningTypes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/learningTypes.png
--------------------------------------------------------------------------------
/images/modelTraining.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/modelTraining.png
--------------------------------------------------------------------------------
/images/numpy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/numpy.png
--------------------------------------------------------------------------------
/images/pandasImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/pandasImage.png
--------------------------------------------------------------------------------
/images/relu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/relu.png
--------------------------------------------------------------------------------
/images/sigmoid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/sigmoid.png
--------------------------------------------------------------------------------
/images/sklearn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/sklearn.png
--------------------------------------------------------------------------------
/images/sparse_categorical_entropy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/sparse_categorical_entropy.png
--------------------------------------------------------------------------------
/images/weights.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/weights.png
--------------------------------------------------------------------------------
/images/weightsImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/images/weightsImage.png
--------------------------------------------------------------------------------
/project_data/Salary_Data.csv:
--------------------------------------------------------------------------------
1 | YearsExperience,Salary
2 | 1.1,39343.00
3 | 1.3,46205.00
4 | 1.5,37731.00
5 | 2.0,43525.00
6 | 2.2,39891.00
7 | 2.9,56642.00
8 | 3.0,60150.00
9 | 3.2,54445.00
10 | 3.2,64445.00
11 | 3.7,57189.00
12 | 3.9,63218.00
13 | 4.0,55794.00
14 | 4.0,56957.00
15 | 4.1,57081.00
16 | 4.5,61111.00
17 | 4.9,67938.00
18 | 5.1,66029.00
19 | 5.3,83088.00
20 | 5.9,81363.00
21 | 6.0,93940.00
22 | 6.8,91738.00
23 | 7.1,98273.00
24 | 7.9,101302.00
25 | 8.2,113812.00
26 | 8.7,109431.00
27 | 9.0,105582.00
28 | 9.5,116969.00
29 | 9.6,112635.00
30 | 10.3,122391.00
31 | 10.5,121872.00
32 |
--------------------------------------------------------------------------------
/project_data/data_description.txt:
--------------------------------------------------------------------------------
1 | MSSubClass: Identifies the type of dwelling involved in the sale.
2 |
3 | 20 1-STORY 1946 & NEWER ALL STYLES
4 | 30 1-STORY 1945 & OLDER
5 | 40 1-STORY W/FINISHED ATTIC ALL AGES
6 | 45 1-1/2 STORY - UNFINISHED ALL AGES
7 | 50 1-1/2 STORY FINISHED ALL AGES
8 | 60 2-STORY 1946 & NEWER
9 | 70 2-STORY 1945 & OLDER
10 | 75 2-1/2 STORY ALL AGES
11 | 80 SPLIT OR MULTI-LEVEL
12 | 85 SPLIT FOYER
13 | 90 DUPLEX - ALL STYLES AND AGES
14 | 120 1-STORY PUD (Planned Unit Development) - 1946 & NEWER
15 | 150 1-1/2 STORY PUD - ALL AGES
16 | 160 2-STORY PUD - 1946 & NEWER
17 | 180 PUD - MULTILEVEL - INCL SPLIT LEV/FOYER
18 | 190 2 FAMILY CONVERSION - ALL STYLES AND AGES
19 |
20 | MSZoning: Identifies the general zoning classification of the sale.
21 |
22 | A Agriculture
23 | C Commercial
24 | FV Floating Village Residential
25 | I Industrial
26 | RH Residential High Density
27 | RL Residential Low Density
28 | RP Residential Low Density Park
29 | RM Residential Medium Density
30 |
31 | LotFrontage: Linear feet of street connected to property
32 |
33 | LotArea: Lot size in square feet
34 |
35 | Street: Type of road access to property
36 |
37 | Grvl Gravel
38 | Pave Paved
39 |
40 | Alley: Type of alley access to property
41 |
42 | Grvl Gravel
43 | Pave Paved
44 | NA No alley access
45 |
46 | LotShape: General shape of property
47 |
48 | Reg Regular
49 | IR1 Slightly irregular
50 | IR2 Moderately Irregular
51 | IR3 Irregular
52 |
53 | LandContour: Flatness of the property
54 |
55 | Lvl Near Flat/Level
56 | Bnk Banked - Quick and significant rise from street grade to building
57 | HLS Hillside - Significant slope from side to side
58 | Low Depression
59 |
60 | Utilities: Type of utilities available
61 |
62 | AllPub All public Utilities (E,G,W,& S)
63 | NoSewr Electricity, Gas, and Water (Septic Tank)
64 | NoSeWa Electricity and Gas Only
65 | ELO Electricity only
66 |
67 | LotConfig: Lot configuration
68 |
69 | Inside Inside lot
70 | Corner Corner lot
71 | CulDSac Cul-de-sac
72 | FR2 Frontage on 2 sides of property
73 | FR3 Frontage on 3 sides of property
74 |
75 | LandSlope: Slope of property
76 |
77 | Gtl Gentle slope
78 | Mod Moderate Slope
79 | Sev Severe Slope
80 |
81 | Neighborhood: Physical locations within Ames city limits
82 |
83 | Blmngtn Bloomington Heights
84 | Blueste Bluestem
85 | BrDale Briardale
86 | BrkSide Brookside
87 | ClearCr Clear Creek
88 | CollgCr College Creek
89 | Crawfor Crawford
90 | Edwards Edwards
91 | Gilbert Gilbert
92 | IDOTRR Iowa DOT and Rail Road
93 | MeadowV Meadow Village
94 | Mitchel Mitchell
95 | Names North Ames
96 | NoRidge Northridge
97 | NPkVill Northpark Villa
98 | NridgHt Northridge Heights
99 | NWAmes Northwest Ames
100 | OldTown Old Town
101 | SWISU South & West of Iowa State University
102 | Sawyer Sawyer
103 | SawyerW Sawyer West
104 | Somerst Somerset
105 | StoneBr Stone Brook
106 | Timber Timberland
107 | Veenker Veenker
108 |
109 | Condition1: Proximity to various conditions
110 |
111 | Artery Adjacent to arterial street
112 | Feedr Adjacent to feeder street
113 | Norm Normal
114 | RRNn Within 200' of North-South Railroad
115 | RRAn Adjacent to North-South Railroad
116 | PosN Near positive off-site feature--park, greenbelt, etc.
117 | PosA Adjacent to postive off-site feature
118 | RRNe Within 200' of East-West Railroad
119 | RRAe Adjacent to East-West Railroad
120 |
121 | Condition2: Proximity to various conditions (if more than one is present)
122 |
123 | Artery Adjacent to arterial street
124 | Feedr Adjacent to feeder street
125 | Norm Normal
126 | RRNn Within 200' of North-South Railroad
127 | RRAn Adjacent to North-South Railroad
128 | PosN Near positive off-site feature--park, greenbelt, etc.
129 | PosA Adjacent to postive off-site feature
130 | RRNe Within 200' of East-West Railroad
131 | RRAe Adjacent to East-West Railroad
132 |
133 | BldgType: Type of dwelling
134 |
135 | 1Fam Single-family Detached
136 | 2FmCon Two-family Conversion; originally built as one-family dwelling
137 | Duplx Duplex
138 | TwnhsE Townhouse End Unit
139 | TwnhsI Townhouse Inside Unit
140 |
141 | HouseStyle: Style of dwelling
142 |
143 | 1Story One story
144 | 1.5Fin One and one-half story: 2nd level finished
145 | 1.5Unf One and one-half story: 2nd level unfinished
146 | 2Story Two story
147 | 2.5Fin Two and one-half story: 2nd level finished
148 | 2.5Unf Two and one-half story: 2nd level unfinished
149 | SFoyer Split Foyer
150 | SLvl Split Level
151 |
152 | OverallQual: Rates the overall material and finish of the house
153 |
154 | 10 Very Excellent
155 | 9 Excellent
156 | 8 Very Good
157 | 7 Good
158 | 6 Above Average
159 | 5 Average
160 | 4 Below Average
161 | 3 Fair
162 | 2 Poor
163 | 1 Very Poor
164 |
165 | OverallCond: Rates the overall condition of the house
166 |
167 | 10 Very Excellent
168 | 9 Excellent
169 | 8 Very Good
170 | 7 Good
171 | 6 Above Average
172 | 5 Average
173 | 4 Below Average
174 | 3 Fair
175 | 2 Poor
176 | 1 Very Poor
177 |
178 | YearBuilt: Original construction date
179 |
180 | YearRemodAdd: Remodel date (same as construction date if no remodeling or additions)
181 |
182 | RoofStyle: Type of roof
183 |
184 | Flat Flat
185 | Gable Gable
186 | Gambrel Gabrel (Barn)
187 | Hip Hip
188 | Mansard Mansard
189 | Shed Shed
190 |
191 | RoofMatl: Roof material
192 |
193 | ClyTile Clay or Tile
194 | CompShg Standard (Composite) Shingle
195 | Membran Membrane
196 | Metal Metal
197 | Roll Roll
198 | Tar&Grv Gravel & Tar
199 | WdShake Wood Shakes
200 | WdShngl Wood Shingles
201 |
202 | Exterior1st: Exterior covering on house
203 |
204 | AsbShng Asbestos Shingles
205 | AsphShn Asphalt Shingles
206 | BrkComm Brick Common
207 | BrkFace Brick Face
208 | CBlock Cinder Block
209 | CemntBd Cement Board
210 | HdBoard Hard Board
211 | ImStucc Imitation Stucco
212 | MetalSd Metal Siding
213 | Other Other
214 | Plywood Plywood
215 | PreCast PreCast
216 | Stone Stone
217 | Stucco Stucco
218 | VinylSd Vinyl Siding
219 | Wd Sdng Wood Siding
220 | WdShing Wood Shingles
221 |
222 | Exterior2nd: Exterior covering on house (if more than one material)
223 |
224 | AsbShng Asbestos Shingles
225 | AsphShn Asphalt Shingles
226 | BrkComm Brick Common
227 | BrkFace Brick Face
228 | CBlock Cinder Block
229 | CemntBd Cement Board
230 | HdBoard Hard Board
231 | ImStucc Imitation Stucco
232 | MetalSd Metal Siding
233 | Other Other
234 | Plywood Plywood
235 | PreCast PreCast
236 | Stone Stone
237 | Stucco Stucco
238 | VinylSd Vinyl Siding
239 | Wd Sdng Wood Siding
240 | WdShing Wood Shingles
241 |
242 | MasVnrType: Masonry veneer type
243 |
244 | BrkCmn Brick Common
245 | BrkFace Brick Face
246 | CBlock Cinder Block
247 | None None
248 | Stone Stone
249 |
250 | MasVnrArea: Masonry veneer area in square feet
251 |
252 | ExterQual: Evaluates the quality of the material on the exterior
253 |
254 | Ex Excellent
255 | Gd Good
256 | TA Average/Typical
257 | Fa Fair
258 | Po Poor
259 |
260 | ExterCond: Evaluates the present condition of the material on the exterior
261 |
262 | Ex Excellent
263 | Gd Good
264 | TA Average/Typical
265 | Fa Fair
266 | Po Poor
267 |
268 | Foundation: Type of foundation
269 |
270 | BrkTil Brick & Tile
271 | CBlock Cinder Block
272 | PConc Poured Contrete
273 | Slab Slab
274 | Stone Stone
275 | Wood Wood
276 |
277 | BsmtQual: Evaluates the height of the basement
278 |
279 | Ex Excellent (100+ inches)
280 | Gd Good (90-99 inches)
281 | TA Typical (80-89 inches)
282 | Fa Fair (70-79 inches)
283 | Po Poor (<70 inches
284 | NA No Basement
285 |
286 | BsmtCond: Evaluates the general condition of the basement
287 |
288 | Ex Excellent
289 | Gd Good
290 | TA Typical - slight dampness allowed
291 | Fa Fair - dampness or some cracking or settling
292 | Po Poor - Severe cracking, settling, or wetness
293 | NA No Basement
294 |
295 | BsmtExposure: Refers to walkout or garden level walls
296 |
297 | Gd Good Exposure
298 | Av Average Exposure (split levels or foyers typically score average or above)
299 | Mn Mimimum Exposure
300 | No No Exposure
301 | NA No Basement
302 |
303 | BsmtFinType1: Rating of basement finished area
304 |
305 | GLQ Good Living Quarters
306 | ALQ Average Living Quarters
307 | BLQ Below Average Living Quarters
308 | Rec Average Rec Room
309 | LwQ Low Quality
310 | Unf Unfinshed
311 | NA No Basement
312 |
313 | BsmtFinSF1: Type 1 finished square feet
314 |
315 | BsmtFinType2: Rating of basement finished area (if multiple types)
316 |
317 | GLQ Good Living Quarters
318 | ALQ Average Living Quarters
319 | BLQ Below Average Living Quarters
320 | Rec Average Rec Room
321 | LwQ Low Quality
322 | Unf Unfinshed
323 | NA No Basement
324 |
325 | BsmtFinSF2: Type 2 finished square feet
326 |
327 | BsmtUnfSF: Unfinished square feet of basement area
328 |
329 | TotalBsmtSF: Total square feet of basement area
330 |
331 | Heating: Type of heating
332 |
333 | Floor Floor Furnace
334 | GasA Gas forced warm air furnace
335 | GasW Gas hot water or steam heat
336 | Grav Gravity furnace
337 | OthW Hot water or steam heat other than gas
338 | Wall Wall furnace
339 |
340 | HeatingQC: Heating quality and condition
341 |
342 | Ex Excellent
343 | Gd Good
344 | TA Average/Typical
345 | Fa Fair
346 | Po Poor
347 |
348 | CentralAir: Central air conditioning
349 |
350 | N No
351 | Y Yes
352 |
353 | Electrical: Electrical system
354 |
355 | SBrkr Standard Circuit Breakers & Romex
356 | FuseA Fuse Box over 60 AMP and all Romex wiring (Average)
357 | FuseF 60 AMP Fuse Box and mostly Romex wiring (Fair)
358 | FuseP 60 AMP Fuse Box and mostly knob & tube wiring (poor)
359 | Mix Mixed
360 |
361 | 1stFlrSF: First Floor square feet
362 |
363 | 2ndFlrSF: Second floor square feet
364 |
365 | LowQualFinSF: Low quality finished square feet (all floors)
366 |
367 | GrLivArea: Above grade (ground) living area square feet
368 |
369 | BsmtFullBath: Basement full bathrooms
370 |
371 | BsmtHalfBath: Basement half bathrooms
372 |
373 | FullBath: Full bathrooms above grade
374 |
375 | HalfBath: Half baths above grade
376 |
377 | Bedroom: Bedrooms above grade (does NOT include basement bedrooms)
378 |
379 | Kitchen: Kitchens above grade
380 |
381 | KitchenQual: Kitchen quality
382 |
383 | Ex Excellent
384 | Gd Good
385 | TA Typical/Average
386 | Fa Fair
387 | Po Poor
388 |
389 | TotRmsAbvGrd: Total rooms above grade (does not include bathrooms)
390 |
391 | Functional: Home functionality (Assume typical unless deductions are warranted)
392 |
393 | Typ Typical Functionality
394 | Min1 Minor Deductions 1
395 | Min2 Minor Deductions 2
396 | Mod Moderate Deductions
397 | Maj1 Major Deductions 1
398 | Maj2 Major Deductions 2
399 | Sev Severely Damaged
400 | Sal Salvage only
401 |
402 | Fireplaces: Number of fireplaces
403 |
404 | FireplaceQu: Fireplace quality
405 |
406 | Ex Excellent - Exceptional Masonry Fireplace
407 | Gd Good - Masonry Fireplace in main level
408 | TA Average - Prefabricated Fireplace in main living area or Masonry Fireplace in basement
409 | Fa Fair - Prefabricated Fireplace in basement
410 | Po Poor - Ben Franklin Stove
411 | NA No Fireplace
412 |
413 | GarageType: Garage location
414 |
415 | 2Types More than one type of garage
416 | Attchd Attached to home
417 | Basment Basement Garage
418 | BuiltIn Built-In (Garage part of house - typically has room above garage)
419 | CarPort Car Port
420 | Detchd Detached from home
421 | NA No Garage
422 |
423 | GarageYrBlt: Year garage was built
424 |
425 | GarageFinish: Interior finish of the garage
426 |
427 | Fin Finished
428 | RFn Rough Finished
429 | Unf Unfinished
430 | NA No Garage
431 |
432 | GarageCars: Size of garage in car capacity
433 |
434 | GarageArea: Size of garage in square feet
435 |
436 | GarageQual: Garage quality
437 |
438 | Ex Excellent
439 | Gd Good
440 | TA Typical/Average
441 | Fa Fair
442 | Po Poor
443 | NA No Garage
444 |
445 | GarageCond: Garage condition
446 |
447 | Ex Excellent
448 | Gd Good
449 | TA Typical/Average
450 | Fa Fair
451 | Po Poor
452 | NA No Garage
453 |
454 | PavedDrive: Paved driveway
455 |
456 | Y Paved
457 | P Partial Pavement
458 | N Dirt/Gravel
459 |
460 | WoodDeckSF: Wood deck area in square feet
461 |
462 | OpenPorchSF: Open porch area in square feet
463 |
464 | EnclosedPorch: Enclosed porch area in square feet
465 |
466 | 3SsnPorch: Three season porch area in square feet
467 |
468 | ScreenPorch: Screen porch area in square feet
469 |
470 | PoolArea: Pool area in square feet
471 |
472 | PoolQC: Pool quality
473 |
474 | Ex Excellent
475 | Gd Good
476 | TA Average/Typical
477 | Fa Fair
478 | NA No Pool
479 |
480 | Fence: Fence quality
481 |
482 | GdPrv Good Privacy
483 | MnPrv Minimum Privacy
484 | GdWo Good Wood
485 | MnWw Minimum Wood/Wire
486 | NA No Fence
487 |
488 | MiscFeature: Miscellaneous feature not covered in other categories
489 |
490 | Elev Elevator
491 | Gar2 2nd Garage (if not described in garage section)
492 | Othr Other
493 | Shed Shed (over 100 SF)
494 | TenC Tennis Court
495 | NA None
496 |
497 | MiscVal: $Value of miscellaneous feature
498 |
499 | MoSold: Month Sold (MM)
500 |
501 | YrSold: Year Sold (YYYY)
502 |
503 | SaleType: Type of sale
504 |
505 | WD Warranty Deed - Conventional
506 | CWD Warranty Deed - Cash
507 | VWD Warranty Deed - VA Loan
508 | New Home just constructed and sold
509 | COD Court Officer Deed/Estate
510 | Con Contract 15% Down payment regular terms
511 | ConLw Contract Low Down payment and low interest
512 | ConLI Contract Low Interest
513 | ConLD Contract Low Down
514 | Oth Other
515 |
516 | SaleCondition: Condition of sale
517 |
518 | Normal Normal Sale
519 | Abnorml Abnormal Sale - trade, foreclosure, short sale
520 | AdjLand Adjoining Land Purchase
521 | Alloca Allocation - two linked properties with separate deeds, typically condo with a garage unit
522 | Family Sale between family members
523 | Partial Home was not completed when last assessed (associated with New Homes)
524 |
--------------------------------------------------------------------------------
/project_data/pima-indians-diabetes.csv:
--------------------------------------------------------------------------------
1 | 6,148,72,35,0,33.6,0.627,50,1
2 | 1,85,66,29,0,26.6,0.351,31,0
3 | 8,183,64,0,0,23.3,0.672,32,1
4 | 1,89,66,23,94,28.1,0.167,21,0
5 | 0,137,40,35,168,43.1,2.288,33,1
6 | 5,116,74,0,0,25.6,0.201,30,0
7 | 3,78,50,32,88,31.0,0.248,26,1
8 | 10,115,0,0,0,35.3,0.134,29,0
9 | 2,197,70,45,543,30.5,0.158,53,1
10 | 8,125,96,0,0,0.0,0.232,54,1
11 | 4,110,92,0,0,37.6,0.191,30,0
12 | 10,168,74,0,0,38.0,0.537,34,1
13 | 10,139,80,0,0,27.1,1.441,57,0
14 | 1,189,60,23,846,30.1,0.398,59,1
15 | 5,166,72,19,175,25.8,0.587,51,1
16 | 7,100,0,0,0,30.0,0.484,32,1
17 | 0,118,84,47,230,45.8,0.551,31,1
18 | 7,107,74,0,0,29.6,0.254,31,1
19 | 1,103,30,38,83,43.3,0.183,33,0
20 | 1,115,70,30,96,34.6,0.529,32,1
21 | 3,126,88,41,235,39.3,0.704,27,0
22 | 8,99,84,0,0,35.4,0.388,50,0
23 | 7,196,90,0,0,39.8,0.451,41,1
24 | 9,119,80,35,0,29.0,0.263,29,1
25 | 11,143,94,33,146,36.6,0.254,51,1
26 | 10,125,70,26,115,31.1,0.205,41,1
27 | 7,147,76,0,0,39.4,0.257,43,1
28 | 1,97,66,15,140,23.2,0.487,22,0
29 | 13,145,82,19,110,22.2,0.245,57,0
30 | 5,117,92,0,0,34.1,0.337,38,0
31 | 5,109,75,26,0,36.0,0.546,60,0
32 | 3,158,76,36,245,31.6,0.851,28,1
33 | 3,88,58,11,54,24.8,0.267,22,0
34 | 6,92,92,0,0,19.9,0.188,28,0
35 | 10,122,78,31,0,27.6,0.512,45,0
36 | 4,103,60,33,192,24.0,0.966,33,0
37 | 11,138,76,0,0,33.2,0.420,35,0
38 | 9,102,76,37,0,32.9,0.665,46,1
39 | 2,90,68,42,0,38.2,0.503,27,1
40 | 4,111,72,47,207,37.1,1.390,56,1
41 | 3,180,64,25,70,34.0,0.271,26,0
42 | 7,133,84,0,0,40.2,0.696,37,0
43 | 7,106,92,18,0,22.7,0.235,48,0
44 | 9,171,110,24,240,45.4,0.721,54,1
45 | 7,159,64,0,0,27.4,0.294,40,0
46 | 0,180,66,39,0,42.0,1.893,25,1
47 | 1,146,56,0,0,29.7,0.564,29,0
48 | 2,71,70,27,0,28.0,0.586,22,0
49 | 7,103,66,32,0,39.1,0.344,31,1
50 | 7,105,0,0,0,0.0,0.305,24,0
51 | 1,103,80,11,82,19.4,0.491,22,0
52 | 1,101,50,15,36,24.2,0.526,26,0
53 | 5,88,66,21,23,24.4,0.342,30,0
54 | 8,176,90,34,300,33.7,0.467,58,1
55 | 7,150,66,42,342,34.7,0.718,42,0
56 | 1,73,50,10,0,23.0,0.248,21,0
57 | 7,187,68,39,304,37.7,0.254,41,1
58 | 0,100,88,60,110,46.8,0.962,31,0
59 | 0,146,82,0,0,40.5,1.781,44,0
60 | 0,105,64,41,142,41.5,0.173,22,0
61 | 2,84,0,0,0,0.0,0.304,21,0
62 | 8,133,72,0,0,32.9,0.270,39,1
63 | 5,44,62,0,0,25.0,0.587,36,0
64 | 2,141,58,34,128,25.4,0.699,24,0
65 | 7,114,66,0,0,32.8,0.258,42,1
66 | 5,99,74,27,0,29.0,0.203,32,0
67 | 0,109,88,30,0,32.5,0.855,38,1
68 | 2,109,92,0,0,42.7,0.845,54,0
69 | 1,95,66,13,38,19.6,0.334,25,0
70 | 4,146,85,27,100,28.9,0.189,27,0
71 | 2,100,66,20,90,32.9,0.867,28,1
72 | 5,139,64,35,140,28.6,0.411,26,0
73 | 13,126,90,0,0,43.4,0.583,42,1
74 | 4,129,86,20,270,35.1,0.231,23,0
75 | 1,79,75,30,0,32.0,0.396,22,0
76 | 1,0,48,20,0,24.7,0.140,22,0
77 | 7,62,78,0,0,32.6,0.391,41,0
78 | 5,95,72,33,0,37.7,0.370,27,0
79 | 0,131,0,0,0,43.2,0.270,26,1
80 | 2,112,66,22,0,25.0,0.307,24,0
81 | 3,113,44,13,0,22.4,0.140,22,0
82 | 2,74,0,0,0,0.0,0.102,22,0
83 | 7,83,78,26,71,29.3,0.767,36,0
84 | 0,101,65,28,0,24.6,0.237,22,0
85 | 5,137,108,0,0,48.8,0.227,37,1
86 | 2,110,74,29,125,32.4,0.698,27,0
87 | 13,106,72,54,0,36.6,0.178,45,0
88 | 2,100,68,25,71,38.5,0.324,26,0
89 | 15,136,70,32,110,37.1,0.153,43,1
90 | 1,107,68,19,0,26.5,0.165,24,0
91 | 1,80,55,0,0,19.1,0.258,21,0
92 | 4,123,80,15,176,32.0,0.443,34,0
93 | 7,81,78,40,48,46.7,0.261,42,0
94 | 4,134,72,0,0,23.8,0.277,60,1
95 | 2,142,82,18,64,24.7,0.761,21,0
96 | 6,144,72,27,228,33.9,0.255,40,0
97 | 2,92,62,28,0,31.6,0.130,24,0
98 | 1,71,48,18,76,20.4,0.323,22,0
99 | 6,93,50,30,64,28.7,0.356,23,0
100 | 1,122,90,51,220,49.7,0.325,31,1
101 | 1,163,72,0,0,39.0,1.222,33,1
102 | 1,151,60,0,0,26.1,0.179,22,0
103 | 0,125,96,0,0,22.5,0.262,21,0
104 | 1,81,72,18,40,26.6,0.283,24,0
105 | 2,85,65,0,0,39.6,0.930,27,0
106 | 1,126,56,29,152,28.7,0.801,21,0
107 | 1,96,122,0,0,22.4,0.207,27,0
108 | 4,144,58,28,140,29.5,0.287,37,0
109 | 3,83,58,31,18,34.3,0.336,25,0
110 | 0,95,85,25,36,37.4,0.247,24,1
111 | 3,171,72,33,135,33.3,0.199,24,1
112 | 8,155,62,26,495,34.0,0.543,46,1
113 | 1,89,76,34,37,31.2,0.192,23,0
114 | 4,76,62,0,0,34.0,0.391,25,0
115 | 7,160,54,32,175,30.5,0.588,39,1
116 | 4,146,92,0,0,31.2,0.539,61,1
117 | 5,124,74,0,0,34.0,0.220,38,1
118 | 5,78,48,0,0,33.7,0.654,25,0
119 | 4,97,60,23,0,28.2,0.443,22,0
120 | 4,99,76,15,51,23.2,0.223,21,0
121 | 0,162,76,56,100,53.2,0.759,25,1
122 | 6,111,64,39,0,34.2,0.260,24,0
123 | 2,107,74,30,100,33.6,0.404,23,0
124 | 5,132,80,0,0,26.8,0.186,69,0
125 | 0,113,76,0,0,33.3,0.278,23,1
126 | 1,88,30,42,99,55.0,0.496,26,1
127 | 3,120,70,30,135,42.9,0.452,30,0
128 | 1,118,58,36,94,33.3,0.261,23,0
129 | 1,117,88,24,145,34.5,0.403,40,1
130 | 0,105,84,0,0,27.9,0.741,62,1
131 | 4,173,70,14,168,29.7,0.361,33,1
132 | 9,122,56,0,0,33.3,1.114,33,1
133 | 3,170,64,37,225,34.5,0.356,30,1
134 | 8,84,74,31,0,38.3,0.457,39,0
135 | 2,96,68,13,49,21.1,0.647,26,0
136 | 2,125,60,20,140,33.8,0.088,31,0
137 | 0,100,70,26,50,30.8,0.597,21,0
138 | 0,93,60,25,92,28.7,0.532,22,0
139 | 0,129,80,0,0,31.2,0.703,29,0
140 | 5,105,72,29,325,36.9,0.159,28,0
141 | 3,128,78,0,0,21.1,0.268,55,0
142 | 5,106,82,30,0,39.5,0.286,38,0
143 | 2,108,52,26,63,32.5,0.318,22,0
144 | 10,108,66,0,0,32.4,0.272,42,1
145 | 4,154,62,31,284,32.8,0.237,23,0
146 | 0,102,75,23,0,0.0,0.572,21,0
147 | 9,57,80,37,0,32.8,0.096,41,0
148 | 2,106,64,35,119,30.5,1.400,34,0
149 | 5,147,78,0,0,33.7,0.218,65,0
150 | 2,90,70,17,0,27.3,0.085,22,0
151 | 1,136,74,50,204,37.4,0.399,24,0
152 | 4,114,65,0,0,21.9,0.432,37,0
153 | 9,156,86,28,155,34.3,1.189,42,1
154 | 1,153,82,42,485,40.6,0.687,23,0
155 | 8,188,78,0,0,47.9,0.137,43,1
156 | 7,152,88,44,0,50.0,0.337,36,1
157 | 2,99,52,15,94,24.6,0.637,21,0
158 | 1,109,56,21,135,25.2,0.833,23,0
159 | 2,88,74,19,53,29.0,0.229,22,0
160 | 17,163,72,41,114,40.9,0.817,47,1
161 | 4,151,90,38,0,29.7,0.294,36,0
162 | 7,102,74,40,105,37.2,0.204,45,0
163 | 0,114,80,34,285,44.2,0.167,27,0
164 | 2,100,64,23,0,29.7,0.368,21,0
165 | 0,131,88,0,0,31.6,0.743,32,1
166 | 6,104,74,18,156,29.9,0.722,41,1
167 | 3,148,66,25,0,32.5,0.256,22,0
168 | 4,120,68,0,0,29.6,0.709,34,0
169 | 4,110,66,0,0,31.9,0.471,29,0
170 | 3,111,90,12,78,28.4,0.495,29,0
171 | 6,102,82,0,0,30.8,0.180,36,1
172 | 6,134,70,23,130,35.4,0.542,29,1
173 | 2,87,0,23,0,28.9,0.773,25,0
174 | 1,79,60,42,48,43.5,0.678,23,0
175 | 2,75,64,24,55,29.7,0.370,33,0
176 | 8,179,72,42,130,32.7,0.719,36,1
177 | 6,85,78,0,0,31.2,0.382,42,0
178 | 0,129,110,46,130,67.1,0.319,26,1
179 | 5,143,78,0,0,45.0,0.190,47,0
180 | 5,130,82,0,0,39.1,0.956,37,1
181 | 6,87,80,0,0,23.2,0.084,32,0
182 | 0,119,64,18,92,34.9,0.725,23,0
183 | 1,0,74,20,23,27.7,0.299,21,0
184 | 5,73,60,0,0,26.8,0.268,27,0
185 | 4,141,74,0,0,27.6,0.244,40,0
186 | 7,194,68,28,0,35.9,0.745,41,1
187 | 8,181,68,36,495,30.1,0.615,60,1
188 | 1,128,98,41,58,32.0,1.321,33,1
189 | 8,109,76,39,114,27.9,0.640,31,1
190 | 5,139,80,35,160,31.6,0.361,25,1
191 | 3,111,62,0,0,22.6,0.142,21,0
192 | 9,123,70,44,94,33.1,0.374,40,0
193 | 7,159,66,0,0,30.4,0.383,36,1
194 | 11,135,0,0,0,52.3,0.578,40,1
195 | 8,85,55,20,0,24.4,0.136,42,0
196 | 5,158,84,41,210,39.4,0.395,29,1
197 | 1,105,58,0,0,24.3,0.187,21,0
198 | 3,107,62,13,48,22.9,0.678,23,1
199 | 4,109,64,44,99,34.8,0.905,26,1
200 | 4,148,60,27,318,30.9,0.150,29,1
201 | 0,113,80,16,0,31.0,0.874,21,0
202 | 1,138,82,0,0,40.1,0.236,28,0
203 | 0,108,68,20,0,27.3,0.787,32,0
204 | 2,99,70,16,44,20.4,0.235,27,0
205 | 6,103,72,32,190,37.7,0.324,55,0
206 | 5,111,72,28,0,23.9,0.407,27,0
207 | 8,196,76,29,280,37.5,0.605,57,1
208 | 5,162,104,0,0,37.7,0.151,52,1
209 | 1,96,64,27,87,33.2,0.289,21,0
210 | 7,184,84,33,0,35.5,0.355,41,1
211 | 2,81,60,22,0,27.7,0.290,25,0
212 | 0,147,85,54,0,42.8,0.375,24,0
213 | 7,179,95,31,0,34.2,0.164,60,0
214 | 0,140,65,26,130,42.6,0.431,24,1
215 | 9,112,82,32,175,34.2,0.260,36,1
216 | 12,151,70,40,271,41.8,0.742,38,1
217 | 5,109,62,41,129,35.8,0.514,25,1
218 | 6,125,68,30,120,30.0,0.464,32,0
219 | 5,85,74,22,0,29.0,1.224,32,1
220 | 5,112,66,0,0,37.8,0.261,41,1
221 | 0,177,60,29,478,34.6,1.072,21,1
222 | 2,158,90,0,0,31.6,0.805,66,1
223 | 7,119,0,0,0,25.2,0.209,37,0
224 | 7,142,60,33,190,28.8,0.687,61,0
225 | 1,100,66,15,56,23.6,0.666,26,0
226 | 1,87,78,27,32,34.6,0.101,22,0
227 | 0,101,76,0,0,35.7,0.198,26,0
228 | 3,162,52,38,0,37.2,0.652,24,1
229 | 4,197,70,39,744,36.7,2.329,31,0
230 | 0,117,80,31,53,45.2,0.089,24,0
231 | 4,142,86,0,0,44.0,0.645,22,1
232 | 6,134,80,37,370,46.2,0.238,46,1
233 | 1,79,80,25,37,25.4,0.583,22,0
234 | 4,122,68,0,0,35.0,0.394,29,0
235 | 3,74,68,28,45,29.7,0.293,23,0
236 | 4,171,72,0,0,43.6,0.479,26,1
237 | 7,181,84,21,192,35.9,0.586,51,1
238 | 0,179,90,27,0,44.1,0.686,23,1
239 | 9,164,84,21,0,30.8,0.831,32,1
240 | 0,104,76,0,0,18.4,0.582,27,0
241 | 1,91,64,24,0,29.2,0.192,21,0
242 | 4,91,70,32,88,33.1,0.446,22,0
243 | 3,139,54,0,0,25.6,0.402,22,1
244 | 6,119,50,22,176,27.1,1.318,33,1
245 | 2,146,76,35,194,38.2,0.329,29,0
246 | 9,184,85,15,0,30.0,1.213,49,1
247 | 10,122,68,0,0,31.2,0.258,41,0
248 | 0,165,90,33,680,52.3,0.427,23,0
249 | 9,124,70,33,402,35.4,0.282,34,0
250 | 1,111,86,19,0,30.1,0.143,23,0
251 | 9,106,52,0,0,31.2,0.380,42,0
252 | 2,129,84,0,0,28.0,0.284,27,0
253 | 2,90,80,14,55,24.4,0.249,24,0
254 | 0,86,68,32,0,35.8,0.238,25,0
255 | 12,92,62,7,258,27.6,0.926,44,1
256 | 1,113,64,35,0,33.6,0.543,21,1
257 | 3,111,56,39,0,30.1,0.557,30,0
258 | 2,114,68,22,0,28.7,0.092,25,0
259 | 1,193,50,16,375,25.9,0.655,24,0
260 | 11,155,76,28,150,33.3,1.353,51,1
261 | 3,191,68,15,130,30.9,0.299,34,0
262 | 3,141,0,0,0,30.0,0.761,27,1
263 | 4,95,70,32,0,32.1,0.612,24,0
264 | 3,142,80,15,0,32.4,0.200,63,0
265 | 4,123,62,0,0,32.0,0.226,35,1
266 | 5,96,74,18,67,33.6,0.997,43,0
267 | 0,138,0,0,0,36.3,0.933,25,1
268 | 2,128,64,42,0,40.0,1.101,24,0
269 | 0,102,52,0,0,25.1,0.078,21,0
270 | 2,146,0,0,0,27.5,0.240,28,1
271 | 10,101,86,37,0,45.6,1.136,38,1
272 | 2,108,62,32,56,25.2,0.128,21,0
273 | 3,122,78,0,0,23.0,0.254,40,0
274 | 1,71,78,50,45,33.2,0.422,21,0
275 | 13,106,70,0,0,34.2,0.251,52,0
276 | 2,100,70,52,57,40.5,0.677,25,0
277 | 7,106,60,24,0,26.5,0.296,29,1
278 | 0,104,64,23,116,27.8,0.454,23,0
279 | 5,114,74,0,0,24.9,0.744,57,0
280 | 2,108,62,10,278,25.3,0.881,22,0
281 | 0,146,70,0,0,37.9,0.334,28,1
282 | 10,129,76,28,122,35.9,0.280,39,0
283 | 7,133,88,15,155,32.4,0.262,37,0
284 | 7,161,86,0,0,30.4,0.165,47,1
285 | 2,108,80,0,0,27.0,0.259,52,1
286 | 7,136,74,26,135,26.0,0.647,51,0
287 | 5,155,84,44,545,38.7,0.619,34,0
288 | 1,119,86,39,220,45.6,0.808,29,1
289 | 4,96,56,17,49,20.8,0.340,26,0
290 | 5,108,72,43,75,36.1,0.263,33,0
291 | 0,78,88,29,40,36.9,0.434,21,0
292 | 0,107,62,30,74,36.6,0.757,25,1
293 | 2,128,78,37,182,43.3,1.224,31,1
294 | 1,128,48,45,194,40.5,0.613,24,1
295 | 0,161,50,0,0,21.9,0.254,65,0
296 | 6,151,62,31,120,35.5,0.692,28,0
297 | 2,146,70,38,360,28.0,0.337,29,1
298 | 0,126,84,29,215,30.7,0.520,24,0
299 | 14,100,78,25,184,36.6,0.412,46,1
300 | 8,112,72,0,0,23.6,0.840,58,0
301 | 0,167,0,0,0,32.3,0.839,30,1
302 | 2,144,58,33,135,31.6,0.422,25,1
303 | 5,77,82,41,42,35.8,0.156,35,0
304 | 5,115,98,0,0,52.9,0.209,28,1
305 | 3,150,76,0,0,21.0,0.207,37,0
306 | 2,120,76,37,105,39.7,0.215,29,0
307 | 10,161,68,23,132,25.5,0.326,47,1
308 | 0,137,68,14,148,24.8,0.143,21,0
309 | 0,128,68,19,180,30.5,1.391,25,1
310 | 2,124,68,28,205,32.9,0.875,30,1
311 | 6,80,66,30,0,26.2,0.313,41,0
312 | 0,106,70,37,148,39.4,0.605,22,0
313 | 2,155,74,17,96,26.6,0.433,27,1
314 | 3,113,50,10,85,29.5,0.626,25,0
315 | 7,109,80,31,0,35.9,1.127,43,1
316 | 2,112,68,22,94,34.1,0.315,26,0
317 | 3,99,80,11,64,19.3,0.284,30,0
318 | 3,182,74,0,0,30.5,0.345,29,1
319 | 3,115,66,39,140,38.1,0.150,28,0
320 | 6,194,78,0,0,23.5,0.129,59,1
321 | 4,129,60,12,231,27.5,0.527,31,0
322 | 3,112,74,30,0,31.6,0.197,25,1
323 | 0,124,70,20,0,27.4,0.254,36,1
324 | 13,152,90,33,29,26.8,0.731,43,1
325 | 2,112,75,32,0,35.7,0.148,21,0
326 | 1,157,72,21,168,25.6,0.123,24,0
327 | 1,122,64,32,156,35.1,0.692,30,1
328 | 10,179,70,0,0,35.1,0.200,37,0
329 | 2,102,86,36,120,45.5,0.127,23,1
330 | 6,105,70,32,68,30.8,0.122,37,0
331 | 8,118,72,19,0,23.1,1.476,46,0
332 | 2,87,58,16,52,32.7,0.166,25,0
333 | 1,180,0,0,0,43.3,0.282,41,1
334 | 12,106,80,0,0,23.6,0.137,44,0
335 | 1,95,60,18,58,23.9,0.260,22,0
336 | 0,165,76,43,255,47.9,0.259,26,0
337 | 0,117,0,0,0,33.8,0.932,44,0
338 | 5,115,76,0,0,31.2,0.343,44,1
339 | 9,152,78,34,171,34.2,0.893,33,1
340 | 7,178,84,0,0,39.9,0.331,41,1
341 | 1,130,70,13,105,25.9,0.472,22,0
342 | 1,95,74,21,73,25.9,0.673,36,0
343 | 1,0,68,35,0,32.0,0.389,22,0
344 | 5,122,86,0,0,34.7,0.290,33,0
345 | 8,95,72,0,0,36.8,0.485,57,0
346 | 8,126,88,36,108,38.5,0.349,49,0
347 | 1,139,46,19,83,28.7,0.654,22,0
348 | 3,116,0,0,0,23.5,0.187,23,0
349 | 3,99,62,19,74,21.8,0.279,26,0
350 | 5,0,80,32,0,41.0,0.346,37,1
351 | 4,92,80,0,0,42.2,0.237,29,0
352 | 4,137,84,0,0,31.2,0.252,30,0
353 | 3,61,82,28,0,34.4,0.243,46,0
354 | 1,90,62,12,43,27.2,0.580,24,0
355 | 3,90,78,0,0,42.7,0.559,21,0
356 | 9,165,88,0,0,30.4,0.302,49,1
357 | 1,125,50,40,167,33.3,0.962,28,1
358 | 13,129,0,30,0,39.9,0.569,44,1
359 | 12,88,74,40,54,35.3,0.378,48,0
360 | 1,196,76,36,249,36.5,0.875,29,1
361 | 5,189,64,33,325,31.2,0.583,29,1
362 | 5,158,70,0,0,29.8,0.207,63,0
363 | 5,103,108,37,0,39.2,0.305,65,0
364 | 4,146,78,0,0,38.5,0.520,67,1
365 | 4,147,74,25,293,34.9,0.385,30,0
366 | 5,99,54,28,83,34.0,0.499,30,0
367 | 6,124,72,0,0,27.6,0.368,29,1
368 | 0,101,64,17,0,21.0,0.252,21,0
369 | 3,81,86,16,66,27.5,0.306,22,0
370 | 1,133,102,28,140,32.8,0.234,45,1
371 | 3,173,82,48,465,38.4,2.137,25,1
372 | 0,118,64,23,89,0.0,1.731,21,0
373 | 0,84,64,22,66,35.8,0.545,21,0
374 | 2,105,58,40,94,34.9,0.225,25,0
375 | 2,122,52,43,158,36.2,0.816,28,0
376 | 12,140,82,43,325,39.2,0.528,58,1
377 | 0,98,82,15,84,25.2,0.299,22,0
378 | 1,87,60,37,75,37.2,0.509,22,0
379 | 4,156,75,0,0,48.3,0.238,32,1
380 | 0,93,100,39,72,43.4,1.021,35,0
381 | 1,107,72,30,82,30.8,0.821,24,0
382 | 0,105,68,22,0,20.0,0.236,22,0
383 | 1,109,60,8,182,25.4,0.947,21,0
384 | 1,90,62,18,59,25.1,1.268,25,0
385 | 1,125,70,24,110,24.3,0.221,25,0
386 | 1,119,54,13,50,22.3,0.205,24,0
387 | 5,116,74,29,0,32.3,0.660,35,1
388 | 8,105,100,36,0,43.3,0.239,45,1
389 | 5,144,82,26,285,32.0,0.452,58,1
390 | 3,100,68,23,81,31.6,0.949,28,0
391 | 1,100,66,29,196,32.0,0.444,42,0
392 | 5,166,76,0,0,45.7,0.340,27,1
393 | 1,131,64,14,415,23.7,0.389,21,0
394 | 4,116,72,12,87,22.1,0.463,37,0
395 | 4,158,78,0,0,32.9,0.803,31,1
396 | 2,127,58,24,275,27.7,1.600,25,0
397 | 3,96,56,34,115,24.7,0.944,39,0
398 | 0,131,66,40,0,34.3,0.196,22,1
399 | 3,82,70,0,0,21.1,0.389,25,0
400 | 3,193,70,31,0,34.9,0.241,25,1
401 | 4,95,64,0,0,32.0,0.161,31,1
402 | 6,137,61,0,0,24.2,0.151,55,0
403 | 5,136,84,41,88,35.0,0.286,35,1
404 | 9,72,78,25,0,31.6,0.280,38,0
405 | 5,168,64,0,0,32.9,0.135,41,1
406 | 2,123,48,32,165,42.1,0.520,26,0
407 | 4,115,72,0,0,28.9,0.376,46,1
408 | 0,101,62,0,0,21.9,0.336,25,0
409 | 8,197,74,0,0,25.9,1.191,39,1
410 | 1,172,68,49,579,42.4,0.702,28,1
411 | 6,102,90,39,0,35.7,0.674,28,0
412 | 1,112,72,30,176,34.4,0.528,25,0
413 | 1,143,84,23,310,42.4,1.076,22,0
414 | 1,143,74,22,61,26.2,0.256,21,0
415 | 0,138,60,35,167,34.6,0.534,21,1
416 | 3,173,84,33,474,35.7,0.258,22,1
417 | 1,97,68,21,0,27.2,1.095,22,0
418 | 4,144,82,32,0,38.5,0.554,37,1
419 | 1,83,68,0,0,18.2,0.624,27,0
420 | 3,129,64,29,115,26.4,0.219,28,1
421 | 1,119,88,41,170,45.3,0.507,26,0
422 | 2,94,68,18,76,26.0,0.561,21,0
423 | 0,102,64,46,78,40.6,0.496,21,0
424 | 2,115,64,22,0,30.8,0.421,21,0
425 | 8,151,78,32,210,42.9,0.516,36,1
426 | 4,184,78,39,277,37.0,0.264,31,1
427 | 0,94,0,0,0,0.0,0.256,25,0
428 | 1,181,64,30,180,34.1,0.328,38,1
429 | 0,135,94,46,145,40.6,0.284,26,0
430 | 1,95,82,25,180,35.0,0.233,43,1
431 | 2,99,0,0,0,22.2,0.108,23,0
432 | 3,89,74,16,85,30.4,0.551,38,0
433 | 1,80,74,11,60,30.0,0.527,22,0
434 | 2,139,75,0,0,25.6,0.167,29,0
435 | 1,90,68,8,0,24.5,1.138,36,0
436 | 0,141,0,0,0,42.4,0.205,29,1
437 | 12,140,85,33,0,37.4,0.244,41,0
438 | 5,147,75,0,0,29.9,0.434,28,0
439 | 1,97,70,15,0,18.2,0.147,21,0
440 | 6,107,88,0,0,36.8,0.727,31,0
441 | 0,189,104,25,0,34.3,0.435,41,1
442 | 2,83,66,23,50,32.2,0.497,22,0
443 | 4,117,64,27,120,33.2,0.230,24,0
444 | 8,108,70,0,0,30.5,0.955,33,1
445 | 4,117,62,12,0,29.7,0.380,30,1
446 | 0,180,78,63,14,59.4,2.420,25,1
447 | 1,100,72,12,70,25.3,0.658,28,0
448 | 0,95,80,45,92,36.5,0.330,26,0
449 | 0,104,64,37,64,33.6,0.510,22,1
450 | 0,120,74,18,63,30.5,0.285,26,0
451 | 1,82,64,13,95,21.2,0.415,23,0
452 | 2,134,70,0,0,28.9,0.542,23,1
453 | 0,91,68,32,210,39.9,0.381,25,0
454 | 2,119,0,0,0,19.6,0.832,72,0
455 | 2,100,54,28,105,37.8,0.498,24,0
456 | 14,175,62,30,0,33.6,0.212,38,1
457 | 1,135,54,0,0,26.7,0.687,62,0
458 | 5,86,68,28,71,30.2,0.364,24,0
459 | 10,148,84,48,237,37.6,1.001,51,1
460 | 9,134,74,33,60,25.9,0.460,81,0
461 | 9,120,72,22,56,20.8,0.733,48,0
462 | 1,71,62,0,0,21.8,0.416,26,0
463 | 8,74,70,40,49,35.3,0.705,39,0
464 | 5,88,78,30,0,27.6,0.258,37,0
465 | 10,115,98,0,0,24.0,1.022,34,0
466 | 0,124,56,13,105,21.8,0.452,21,0
467 | 0,74,52,10,36,27.8,0.269,22,0
468 | 0,97,64,36,100,36.8,0.600,25,0
469 | 8,120,0,0,0,30.0,0.183,38,1
470 | 6,154,78,41,140,46.1,0.571,27,0
471 | 1,144,82,40,0,41.3,0.607,28,0
472 | 0,137,70,38,0,33.2,0.170,22,0
473 | 0,119,66,27,0,38.8,0.259,22,0
474 | 7,136,90,0,0,29.9,0.210,50,0
475 | 4,114,64,0,0,28.9,0.126,24,0
476 | 0,137,84,27,0,27.3,0.231,59,0
477 | 2,105,80,45,191,33.7,0.711,29,1
478 | 7,114,76,17,110,23.8,0.466,31,0
479 | 8,126,74,38,75,25.9,0.162,39,0
480 | 4,132,86,31,0,28.0,0.419,63,0
481 | 3,158,70,30,328,35.5,0.344,35,1
482 | 0,123,88,37,0,35.2,0.197,29,0
483 | 4,85,58,22,49,27.8,0.306,28,0
484 | 0,84,82,31,125,38.2,0.233,23,0
485 | 0,145,0,0,0,44.2,0.630,31,1
486 | 0,135,68,42,250,42.3,0.365,24,1
487 | 1,139,62,41,480,40.7,0.536,21,0
488 | 0,173,78,32,265,46.5,1.159,58,0
489 | 4,99,72,17,0,25.6,0.294,28,0
490 | 8,194,80,0,0,26.1,0.551,67,0
491 | 2,83,65,28,66,36.8,0.629,24,0
492 | 2,89,90,30,0,33.5,0.292,42,0
493 | 4,99,68,38,0,32.8,0.145,33,0
494 | 4,125,70,18,122,28.9,1.144,45,1
495 | 3,80,0,0,0,0.0,0.174,22,0
496 | 6,166,74,0,0,26.6,0.304,66,0
497 | 5,110,68,0,0,26.0,0.292,30,0
498 | 2,81,72,15,76,30.1,0.547,25,0
499 | 7,195,70,33,145,25.1,0.163,55,1
500 | 6,154,74,32,193,29.3,0.839,39,0
501 | 2,117,90,19,71,25.2,0.313,21,0
502 | 3,84,72,32,0,37.2,0.267,28,0
503 | 6,0,68,41,0,39.0,0.727,41,1
504 | 7,94,64,25,79,33.3,0.738,41,0
505 | 3,96,78,39,0,37.3,0.238,40,0
506 | 10,75,82,0,0,33.3,0.263,38,0
507 | 0,180,90,26,90,36.5,0.314,35,1
508 | 1,130,60,23,170,28.6,0.692,21,0
509 | 2,84,50,23,76,30.4,0.968,21,0
510 | 8,120,78,0,0,25.0,0.409,64,0
511 | 12,84,72,31,0,29.7,0.297,46,1
512 | 0,139,62,17,210,22.1,0.207,21,0
513 | 9,91,68,0,0,24.2,0.200,58,0
514 | 2,91,62,0,0,27.3,0.525,22,0
515 | 3,99,54,19,86,25.6,0.154,24,0
516 | 3,163,70,18,105,31.6,0.268,28,1
517 | 9,145,88,34,165,30.3,0.771,53,1
518 | 7,125,86,0,0,37.6,0.304,51,0
519 | 13,76,60,0,0,32.8,0.180,41,0
520 | 6,129,90,7,326,19.6,0.582,60,0
521 | 2,68,70,32,66,25.0,0.187,25,0
522 | 3,124,80,33,130,33.2,0.305,26,0
523 | 6,114,0,0,0,0.0,0.189,26,0
524 | 9,130,70,0,0,34.2,0.652,45,1
525 | 3,125,58,0,0,31.6,0.151,24,0
526 | 3,87,60,18,0,21.8,0.444,21,0
527 | 1,97,64,19,82,18.2,0.299,21,0
528 | 3,116,74,15,105,26.3,0.107,24,0
529 | 0,117,66,31,188,30.8,0.493,22,0
530 | 0,111,65,0,0,24.6,0.660,31,0
531 | 2,122,60,18,106,29.8,0.717,22,0
532 | 0,107,76,0,0,45.3,0.686,24,0
533 | 1,86,66,52,65,41.3,0.917,29,0
534 | 6,91,0,0,0,29.8,0.501,31,0
535 | 1,77,56,30,56,33.3,1.251,24,0
536 | 4,132,0,0,0,32.9,0.302,23,1
537 | 0,105,90,0,0,29.6,0.197,46,0
538 | 0,57,60,0,0,21.7,0.735,67,0
539 | 0,127,80,37,210,36.3,0.804,23,0
540 | 3,129,92,49,155,36.4,0.968,32,1
541 | 8,100,74,40,215,39.4,0.661,43,1
542 | 3,128,72,25,190,32.4,0.549,27,1
543 | 10,90,85,32,0,34.9,0.825,56,1
544 | 4,84,90,23,56,39.5,0.159,25,0
545 | 1,88,78,29,76,32.0,0.365,29,0
546 | 8,186,90,35,225,34.5,0.423,37,1
547 | 5,187,76,27,207,43.6,1.034,53,1
548 | 4,131,68,21,166,33.1,0.160,28,0
549 | 1,164,82,43,67,32.8,0.341,50,0
550 | 4,189,110,31,0,28.5,0.680,37,0
551 | 1,116,70,28,0,27.4,0.204,21,0
552 | 3,84,68,30,106,31.9,0.591,25,0
553 | 6,114,88,0,0,27.8,0.247,66,0
554 | 1,88,62,24,44,29.9,0.422,23,0
555 | 1,84,64,23,115,36.9,0.471,28,0
556 | 7,124,70,33,215,25.5,0.161,37,0
557 | 1,97,70,40,0,38.1,0.218,30,0
558 | 8,110,76,0,0,27.8,0.237,58,0
559 | 11,103,68,40,0,46.2,0.126,42,0
560 | 11,85,74,0,0,30.1,0.300,35,0
561 | 6,125,76,0,0,33.8,0.121,54,1
562 | 0,198,66,32,274,41.3,0.502,28,1
563 | 1,87,68,34,77,37.6,0.401,24,0
564 | 6,99,60,19,54,26.9,0.497,32,0
565 | 0,91,80,0,0,32.4,0.601,27,0
566 | 2,95,54,14,88,26.1,0.748,22,0
567 | 1,99,72,30,18,38.6,0.412,21,0
568 | 6,92,62,32,126,32.0,0.085,46,0
569 | 4,154,72,29,126,31.3,0.338,37,0
570 | 0,121,66,30,165,34.3,0.203,33,1
571 | 3,78,70,0,0,32.5,0.270,39,0
572 | 2,130,96,0,0,22.6,0.268,21,0
573 | 3,111,58,31,44,29.5,0.430,22,0
574 | 2,98,60,17,120,34.7,0.198,22,0
575 | 1,143,86,30,330,30.1,0.892,23,0
576 | 1,119,44,47,63,35.5,0.280,25,0
577 | 6,108,44,20,130,24.0,0.813,35,0
578 | 2,118,80,0,0,42.9,0.693,21,1
579 | 10,133,68,0,0,27.0,0.245,36,0
580 | 2,197,70,99,0,34.7,0.575,62,1
581 | 0,151,90,46,0,42.1,0.371,21,1
582 | 6,109,60,27,0,25.0,0.206,27,0
583 | 12,121,78,17,0,26.5,0.259,62,0
584 | 8,100,76,0,0,38.7,0.190,42,0
585 | 8,124,76,24,600,28.7,0.687,52,1
586 | 1,93,56,11,0,22.5,0.417,22,0
587 | 8,143,66,0,0,34.9,0.129,41,1
588 | 6,103,66,0,0,24.3,0.249,29,0
589 | 3,176,86,27,156,33.3,1.154,52,1
590 | 0,73,0,0,0,21.1,0.342,25,0
591 | 11,111,84,40,0,46.8,0.925,45,1
592 | 2,112,78,50,140,39.4,0.175,24,0
593 | 3,132,80,0,0,34.4,0.402,44,1
594 | 2,82,52,22,115,28.5,1.699,25,0
595 | 6,123,72,45,230,33.6,0.733,34,0
596 | 0,188,82,14,185,32.0,0.682,22,1
597 | 0,67,76,0,0,45.3,0.194,46,0
598 | 1,89,24,19,25,27.8,0.559,21,0
599 | 1,173,74,0,0,36.8,0.088,38,1
600 | 1,109,38,18,120,23.1,0.407,26,0
601 | 1,108,88,19,0,27.1,0.400,24,0
602 | 6,96,0,0,0,23.7,0.190,28,0
603 | 1,124,74,36,0,27.8,0.100,30,0
604 | 7,150,78,29,126,35.2,0.692,54,1
605 | 4,183,0,0,0,28.4,0.212,36,1
606 | 1,124,60,32,0,35.8,0.514,21,0
607 | 1,181,78,42,293,40.0,1.258,22,1
608 | 1,92,62,25,41,19.5,0.482,25,0
609 | 0,152,82,39,272,41.5,0.270,27,0
610 | 1,111,62,13,182,24.0,0.138,23,0
611 | 3,106,54,21,158,30.9,0.292,24,0
612 | 3,174,58,22,194,32.9,0.593,36,1
613 | 7,168,88,42,321,38.2,0.787,40,1
614 | 6,105,80,28,0,32.5,0.878,26,0
615 | 11,138,74,26,144,36.1,0.557,50,1
616 | 3,106,72,0,0,25.8,0.207,27,0
617 | 6,117,96,0,0,28.7,0.157,30,0
618 | 2,68,62,13,15,20.1,0.257,23,0
619 | 9,112,82,24,0,28.2,1.282,50,1
620 | 0,119,0,0,0,32.4,0.141,24,1
621 | 2,112,86,42,160,38.4,0.246,28,0
622 | 2,92,76,20,0,24.2,1.698,28,0
623 | 6,183,94,0,0,40.8,1.461,45,0
624 | 0,94,70,27,115,43.5,0.347,21,0
625 | 2,108,64,0,0,30.8,0.158,21,0
626 | 4,90,88,47,54,37.7,0.362,29,0
627 | 0,125,68,0,0,24.7,0.206,21,0
628 | 0,132,78,0,0,32.4,0.393,21,0
629 | 5,128,80,0,0,34.6,0.144,45,0
630 | 4,94,65,22,0,24.7,0.148,21,0
631 | 7,114,64,0,0,27.4,0.732,34,1
632 | 0,102,78,40,90,34.5,0.238,24,0
633 | 2,111,60,0,0,26.2,0.343,23,0
634 | 1,128,82,17,183,27.5,0.115,22,0
635 | 10,92,62,0,0,25.9,0.167,31,0
636 | 13,104,72,0,0,31.2,0.465,38,1
637 | 5,104,74,0,0,28.8,0.153,48,0
638 | 2,94,76,18,66,31.6,0.649,23,0
639 | 7,97,76,32,91,40.9,0.871,32,1
640 | 1,100,74,12,46,19.5,0.149,28,0
641 | 0,102,86,17,105,29.3,0.695,27,0
642 | 4,128,70,0,0,34.3,0.303,24,0
643 | 6,147,80,0,0,29.5,0.178,50,1
644 | 4,90,0,0,0,28.0,0.610,31,0
645 | 3,103,72,30,152,27.6,0.730,27,0
646 | 2,157,74,35,440,39.4,0.134,30,0
647 | 1,167,74,17,144,23.4,0.447,33,1
648 | 0,179,50,36,159,37.8,0.455,22,1
649 | 11,136,84,35,130,28.3,0.260,42,1
650 | 0,107,60,25,0,26.4,0.133,23,0
651 | 1,91,54,25,100,25.2,0.234,23,0
652 | 1,117,60,23,106,33.8,0.466,27,0
653 | 5,123,74,40,77,34.1,0.269,28,0
654 | 2,120,54,0,0,26.8,0.455,27,0
655 | 1,106,70,28,135,34.2,0.142,22,0
656 | 2,155,52,27,540,38.7,0.240,25,1
657 | 2,101,58,35,90,21.8,0.155,22,0
658 | 1,120,80,48,200,38.9,1.162,41,0
659 | 11,127,106,0,0,39.0,0.190,51,0
660 | 3,80,82,31,70,34.2,1.292,27,1
661 | 10,162,84,0,0,27.7,0.182,54,0
662 | 1,199,76,43,0,42.9,1.394,22,1
663 | 8,167,106,46,231,37.6,0.165,43,1
664 | 9,145,80,46,130,37.9,0.637,40,1
665 | 6,115,60,39,0,33.7,0.245,40,1
666 | 1,112,80,45,132,34.8,0.217,24,0
667 | 4,145,82,18,0,32.5,0.235,70,1
668 | 10,111,70,27,0,27.5,0.141,40,1
669 | 6,98,58,33,190,34.0,0.430,43,0
670 | 9,154,78,30,100,30.9,0.164,45,0
671 | 6,165,68,26,168,33.6,0.631,49,0
672 | 1,99,58,10,0,25.4,0.551,21,0
673 | 10,68,106,23,49,35.5,0.285,47,0
674 | 3,123,100,35,240,57.3,0.880,22,0
675 | 8,91,82,0,0,35.6,0.587,68,0
676 | 6,195,70,0,0,30.9,0.328,31,1
677 | 9,156,86,0,0,24.8,0.230,53,1
678 | 0,93,60,0,0,35.3,0.263,25,0
679 | 3,121,52,0,0,36.0,0.127,25,1
680 | 2,101,58,17,265,24.2,0.614,23,0
681 | 2,56,56,28,45,24.2,0.332,22,0
682 | 0,162,76,36,0,49.6,0.364,26,1
683 | 0,95,64,39,105,44.6,0.366,22,0
684 | 4,125,80,0,0,32.3,0.536,27,1
685 | 5,136,82,0,0,0.0,0.640,69,0
686 | 2,129,74,26,205,33.2,0.591,25,0
687 | 3,130,64,0,0,23.1,0.314,22,0
688 | 1,107,50,19,0,28.3,0.181,29,0
689 | 1,140,74,26,180,24.1,0.828,23,0
690 | 1,144,82,46,180,46.1,0.335,46,1
691 | 8,107,80,0,0,24.6,0.856,34,0
692 | 13,158,114,0,0,42.3,0.257,44,1
693 | 2,121,70,32,95,39.1,0.886,23,0
694 | 7,129,68,49,125,38.5,0.439,43,1
695 | 2,90,60,0,0,23.5,0.191,25,0
696 | 7,142,90,24,480,30.4,0.128,43,1
697 | 3,169,74,19,125,29.9,0.268,31,1
698 | 0,99,0,0,0,25.0,0.253,22,0
699 | 4,127,88,11,155,34.5,0.598,28,0
700 | 4,118,70,0,0,44.5,0.904,26,0
701 | 2,122,76,27,200,35.9,0.483,26,0
702 | 6,125,78,31,0,27.6,0.565,49,1
703 | 1,168,88,29,0,35.0,0.905,52,1
704 | 2,129,0,0,0,38.5,0.304,41,0
705 | 4,110,76,20,100,28.4,0.118,27,0
706 | 6,80,80,36,0,39.8,0.177,28,0
707 | 10,115,0,0,0,0.0,0.261,30,1
708 | 2,127,46,21,335,34.4,0.176,22,0
709 | 9,164,78,0,0,32.8,0.148,45,1
710 | 2,93,64,32,160,38.0,0.674,23,1
711 | 3,158,64,13,387,31.2,0.295,24,0
712 | 5,126,78,27,22,29.6,0.439,40,0
713 | 10,129,62,36,0,41.2,0.441,38,1
714 | 0,134,58,20,291,26.4,0.352,21,0
715 | 3,102,74,0,0,29.5,0.121,32,0
716 | 7,187,50,33,392,33.9,0.826,34,1
717 | 3,173,78,39,185,33.8,0.970,31,1
718 | 10,94,72,18,0,23.1,0.595,56,0
719 | 1,108,60,46,178,35.5,0.415,24,0
720 | 5,97,76,27,0,35.6,0.378,52,1
721 | 4,83,86,19,0,29.3,0.317,34,0
722 | 1,114,66,36,200,38.1,0.289,21,0
723 | 1,149,68,29,127,29.3,0.349,42,1
724 | 5,117,86,30,105,39.1,0.251,42,0
725 | 1,111,94,0,0,32.8,0.265,45,0
726 | 4,112,78,40,0,39.4,0.236,38,0
727 | 1,116,78,29,180,36.1,0.496,25,0
728 | 0,141,84,26,0,32.4,0.433,22,0
729 | 2,175,88,0,0,22.9,0.326,22,0
730 | 2,92,52,0,0,30.1,0.141,22,0
731 | 3,130,78,23,79,28.4,0.323,34,1
732 | 8,120,86,0,0,28.4,0.259,22,1
733 | 2,174,88,37,120,44.5,0.646,24,1
734 | 2,106,56,27,165,29.0,0.426,22,0
735 | 2,105,75,0,0,23.3,0.560,53,0
736 | 4,95,60,32,0,35.4,0.284,28,0
737 | 0,126,86,27,120,27.4,0.515,21,0
738 | 8,65,72,23,0,32.0,0.600,42,0
739 | 2,99,60,17,160,36.6,0.453,21,0
740 | 1,102,74,0,0,39.5,0.293,42,1
741 | 11,120,80,37,150,42.3,0.785,48,1
742 | 3,102,44,20,94,30.8,0.400,26,0
743 | 1,109,58,18,116,28.5,0.219,22,0
744 | 9,140,94,0,0,32.7,0.734,45,1
745 | 13,153,88,37,140,40.6,1.174,39,0
746 | 12,100,84,33,105,30.0,0.488,46,0
747 | 1,147,94,41,0,49.3,0.358,27,1
748 | 1,81,74,41,57,46.3,1.096,32,0
749 | 3,187,70,22,200,36.4,0.408,36,1
750 | 6,162,62,0,0,24.3,0.178,50,1
751 | 4,136,70,0,0,31.2,1.182,22,1
752 | 1,121,78,39,74,39.0,0.261,28,0
753 | 3,108,62,24,0,26.0,0.223,25,0
754 | 0,181,88,44,510,43.3,0.222,26,1
755 | 8,154,78,32,0,32.4,0.443,45,1
756 | 1,128,88,39,110,36.5,1.057,37,1
757 | 7,137,90,41,0,32.0,0.391,39,0
758 | 0,123,72,0,0,36.3,0.258,52,1
759 | 1,106,76,0,0,37.5,0.197,26,0
760 | 6,190,92,0,0,35.5,0.278,66,1
761 | 2,88,58,26,16,28.4,0.766,22,0
762 | 9,170,74,31,0,44.0,0.403,43,1
763 | 9,89,62,0,0,22.5,0.142,33,0
764 | 10,101,76,48,180,32.9,0.171,63,0
765 | 2,122,70,27,0,36.8,0.340,27,0
766 | 5,121,72,23,112,26.2,0.245,30,0
767 | 1,126,60,0,0,30.1,0.349,47,1
768 | 1,93,70,31,0,30.4,0.315,23,0
--------------------------------------------------------------------------------
/project_data/sales_data.csv:
--------------------------------------------------------------------------------
1 | 12.0,15.0
2 | 20.5,16.0
3 | 21.0,18.0
4 | 15.5,27.0
5 | 15.3,21.0
6 | 23.5,49.0
7 | 24.5,21
8 | 21.3,22
9 | 23.5,28
10 | 28.0,36
11 | 24.0,40
12 | 15.5,3
13 | 17.3,21
14 | 25.3,29
15 | 25.0,62
16 | 36.5,65
17 | 36.5,46
18 | 29.6,44
19 | 30.5,33
20 | 28.0,62
21 | 26.0,22
22 | 21.5,12
23 | 19.7,24
24 | 19.0,3
25 | 16.0,5.0
26 | 20.7,14.0
27 | 26.5,36.0
28 | 30.6,40.0
29 | 32.3,49.0
30 | 29.5,7.0
31 | 28.3,52.0
32 | 31.3,65.0
33 | 32.3,17.0
34 | 26.4,5.0
35 | 23.4,17.0
36 | 16.4,1.0
--------------------------------------------------------------------------------
/projects/1_LinearRegressionProject.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "LinearRegression.ipynb",
7 | "provenance": [],
8 | "collapsed_sections": [],
9 | "include_colab_link": true
10 | },
11 | "kernelspec": {
12 | "display_name": "Python 3",
13 | "language": "python",
14 | "name": "python3"
15 | },
16 | "language_info": {
17 | "codemirror_mode": {
18 | "name": "ipython",
19 | "version": 3
20 | },
21 | "file_extension": ".py",
22 | "mimetype": "text/x-python",
23 | "name": "python",
24 | "nbconvert_exporter": "python",
25 | "pygments_lexer": "ipython3",
26 | "version": "3.7.6"
27 | }
28 | },
29 | "cells": [
30 | {
31 | "cell_type": "markdown",
32 | "metadata": {
33 | "id": "view-in-github",
34 | "colab_type": "text"
35 | },
36 | "source": [
37 | ""
38 | ]
39 | },
40 | {
41 | "cell_type": "markdown",
42 | "metadata": {
43 | "id": "b2BUOcQ15hIS"
44 | },
45 | "source": [
46 | "# Linear Regression Project\n",
47 | "\n",
48 | "Using linear regression to predict the salary of an employee given how many years of experience they have. \n"
49 | ]
50 | },
51 | {
52 | "cell_type": "markdown",
53 | "metadata": {
54 | "id": "pd-dhbiY5hIl"
55 | },
56 | "source": [
57 | "### Introduction"
58 | ]
59 | },
60 | {
61 | "cell_type": "markdown",
62 | "metadata": {
63 | "id": "isnvtdfOlvEf"
64 | },
65 | "source": [
66 | "For our first project, we will use linear regression to predict the salary of an employee given how many years of experience they have. Theoretically, this relationship should be linear; if you have more experience, you make more money. \n",
67 | "\n",
68 | "The dataset we are using to train and test our model is titled Salary_data.csv and has two columns -- \"Years of Experience\" and \"Salary\" for 30 employees. X will be our independent variable and represent the years of experience. Y will be our dependent variable and represent their salary. Using the code below, we can import Pandas, our dataset, and initialize these variables. \n",
69 | "\n",
70 | "Whenever coding any type of application, the first step is always to import any relevant libraries. Usually, we will import them all together at the beginning to save time. However, for the purposes of this course, we will import the libraries as they are being used to show their application. \n",
71 | "\n",
72 | "Below, we are importing Pandas, an essential Python library. The graphic below demonstrates some of the functionality of Pandas. We use Pandas to read, write, and generally interact with our data. Below, we use pandas to import our dataset and initialize our variables X and Y. \n",
73 | "\n",
74 | ""
75 | ]
76 | },
77 | {
78 | "cell_type": "code",
79 | "metadata": {
80 | "id": "KEH6RwGdlspa"
81 | },
82 | "source": [
83 | "import pandas as pd\n",
84 | "dataset = pd.read_csv('https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/master/project_data/Salary_Data.csv')\n",
85 | "X = dataset.iloc[:, :-1].values\n",
86 | "y = dataset.iloc[:,1].values"
87 | ],
88 | "execution_count": 1,
89 | "outputs": []
90 | },
91 | {
92 | "cell_type": "markdown",
93 | "metadata": {
94 | "id": "fgsfI0PEtnsk"
95 | },
96 | "source": [
97 | "### Splitting our dataset"
98 | ]
99 | },
100 | {
101 | "cell_type": "markdown",
102 | "metadata": {
103 | "id": "xWD4e8A1oyEw"
104 | },
105 | "source": [
106 | "While coding a model, we need to 1) train it and improve its accuracy, and 2) test how well the model works on general, unknown data. To do this, we will split our dataset into training and testing sections. You can pick any divide you want as a fraction, and for our purposes we will split it into 2/3 training data and 1/3 testing data. "
107 | ]
108 | },
109 | {
110 | "cell_type": "code",
111 | "metadata": {
112 | "id": "reKuHByKpB62"
113 | },
114 | "source": [
115 | "from sklearn.model_selection import train_test_split\n",
116 | "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=1/3, random_state=0)"
117 | ],
118 | "execution_count": 2,
119 | "outputs": []
120 | },
121 | {
122 | "cell_type": "markdown",
123 | "metadata": {
124 | "id": "HKh9QRV0tnso"
125 | },
126 | "source": [
127 | "### Fitting linear regression to our training data"
128 | ]
129 | },
130 | {
131 | "cell_type": "markdown",
132 | "metadata": {
133 | "id": "YxLRlY2KpDht"
134 | },
135 | "source": [
136 | "Next, we will initilize sklearn, a useful Python library that contains various machine learning classes, including methods for linear regression. The graphic below explains the full capabilities of sklearn. By importing this library, we have a quick reference to all types of machine learning algorithms instead of replicating the entire mathematical process again and again. As the stereotype goes, programmers are lazy, and using these methods is far more efficient. \n",
137 | "\n",
138 | "\n",
139 | "\n",
140 | "We now have the facilities to train our model -- we have training-specific data and the algorithm to analyze this data. Using these two features, we will train our dataset using Linear Regression. To do this, we initialize a variable as LinearRegression(), then call the fit command, which fits the data provided to the linear regression template. When this concludes, we will have trained our model. "
141 | ]
142 | },
143 | {
144 | "cell_type": "code",
145 | "metadata": {
146 | "colab": {
147 | "base_uri": "https://localhost:8080/"
148 | },
149 | "id": "YSP6hKabpYER",
150 | "outputId": "89be71c0-58ea-4f36-c749-656cd083704c"
151 | },
152 | "source": [
153 | "from sklearn.linear_model import LinearRegression\n",
154 | "regressor = LinearRegression()\n",
155 | "regressor.fit(X_train, y_train)"
156 | ],
157 | "execution_count": 3,
158 | "outputs": [
159 | {
160 | "output_type": "execute_result",
161 | "data": {
162 | "text/plain": [
163 | "LinearRegression(copy_X=True, fit_intercept=True, n_jobs=None, normalize=False)"
164 | ]
165 | },
166 | "metadata": {
167 | "tags": []
168 | },
169 | "execution_count": 3
170 | }
171 | ]
172 | },
173 | {
174 | "cell_type": "markdown",
175 | "metadata": {
176 | "id": "N60wXxm5tnsz"
177 | },
178 | "source": [
179 | "### Making predictions"
180 | ]
181 | },
182 | {
183 | "cell_type": "markdown",
184 | "metadata": {
185 | "id": "b1AIZxr5pZyu"
186 | },
187 | "source": [
188 | "Now that we have a linear regression model fitted and trained on our data, we need to assess how well it can predict unknown data, which is the entire purpose of machine learning. To do so, we will now refer to the other section of our dataset, the testing section. We call the predict function to do so. "
189 | ]
190 | },
191 | {
192 | "cell_type": "code",
193 | "metadata": {
194 | "id": "4YWwrwuApi99"
195 | },
196 | "source": [
197 | "y_pred = regressor.predict(X_test)"
198 | ],
199 | "execution_count": 4,
200 | "outputs": []
201 | },
202 | {
203 | "cell_type": "code",
204 | "metadata": {
205 | "id": "-KMhXzO_5IjG",
206 | "outputId": "b9341dac-e115-4ac1-dc74-d902a158a5d7",
207 | "colab": {
208 | "base_uri": "https://localhost:8080/"
209 | }
210 | },
211 | "source": [
212 | "X_test"
213 | ],
214 | "execution_count": 6,
215 | "outputs": [
216 | {
217 | "output_type": "execute_result",
218 | "data": {
219 | "text/plain": [
220 | "array([[ 1.5],\n",
221 | " [10.3],\n",
222 | " [ 4.1],\n",
223 | " [ 3.9],\n",
224 | " [ 9.5],\n",
225 | " [ 8.7],\n",
226 | " [ 9.6],\n",
227 | " [ 4. ],\n",
228 | " [ 5.3],\n",
229 | " [ 7.9]])"
230 | ]
231 | },
232 | "metadata": {
233 | "tags": []
234 | },
235 | "execution_count": 6
236 | }
237 | ]
238 | },
239 | {
240 | "cell_type": "code",
241 | "metadata": {
242 | "id": "svjvEav-Sp0U",
243 | "colab": {
244 | "base_uri": "https://localhost:8080/"
245 | },
246 | "outputId": "2752f441-aa2e-4365-a892-1c92b9ca569e"
247 | },
248 | "source": [
249 | "y_pred"
250 | ],
251 | "execution_count": 5,
252 | "outputs": [
253 | {
254 | "output_type": "execute_result",
255 | "data": {
256 | "text/plain": [
257 | "array([ 40835.10590871, 123079.39940819, 65134.55626083, 63265.36777221,\n",
258 | " 115602.64545369, 108125.8914992 , 116537.23969801, 64199.96201652,\n",
259 | " 76349.68719258, 100649.1375447 ])"
260 | ]
261 | },
262 | "metadata": {
263 | "tags": []
264 | },
265 | "execution_count": 5
266 | }
267 | ]
268 | },
269 | {
270 | "cell_type": "markdown",
271 | "metadata": {
272 | "id": "iSiboIdktns3"
273 | },
274 | "source": [
275 | "### Visualizing our training set results"
276 | ]
277 | },
278 | {
279 | "cell_type": "markdown",
280 | "metadata": {
281 | "id": "TwWHN7L_pkyr"
282 | },
283 | "source": [
284 | "Right now, all this is taking place in the background, meaning we can't see for ourselves how well it is doing. We want to visualize the results, and to do so, we will use another useful Python library called MatPlot. This allows us to plot the data on a graph, which is incredibly helpful. "
285 | ]
286 | },
287 | {
288 | "cell_type": "code",
289 | "metadata": {
290 | "colab": {
291 | "base_uri": "https://localhost:8080/",
292 | "height": 295
293 | },
294 | "id": "wMT50smGpznq",
295 | "outputId": "79e6dc93-ada8-4e52-c590-38814dad9977"
296 | },
297 | "source": [
298 | "import matplotlib.pyplot as plt\n",
299 | "# plot the actual data points of training set\n",
300 | "plt.scatter(X_train, y_train, color = 'red')\n",
301 | "# plot the regression line\n",
302 | "plt.plot(X_train, regressor.predict(X_train), color='blue')\n",
303 | "plt.title('Salary vs Experience (Training set)')\n",
304 | "plt.xlabel('Years of Experience')\n",
305 | "plt.ylabel('Salary')\n",
306 | "plt.show()"
307 | ],
308 | "execution_count": 7,
309 | "outputs": [
310 | {
311 | "output_type": "display_data",
312 | "data": {
313 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZcAAAEWCAYAAACqitpwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQV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Di5mZlZ3/x/Ehwog+kGYlQAAAABJRU5ErkJggg==\n",
314 | "text/plain": [
315 | ""
316 | ]
317 | },
318 | "metadata": {
319 | "tags": [],
320 | "needs_background": "light"
321 | }
322 | }
323 | ]
324 | },
325 | {
326 | "cell_type": "markdown",
327 | "metadata": {
328 | "id": "KmYBDmqdtns8"
329 | },
330 | "source": [
331 | "### Visualizing our test set results\n",
332 | "\n"
333 | ]
334 | },
335 | {
336 | "cell_type": "markdown",
337 | "metadata": {
338 | "id": "-7tF4ZElqWgZ"
339 | },
340 | "source": [
341 | "We have now visualized how well our training data matched with our model, but we still haven't seen how accurate its predictions were. To do so, we will first plot the actual data in the testing set, and we will then plot our model's regression line (the same line as before) to see how well they match. "
342 | ]
343 | },
344 | {
345 | "cell_type": "code",
346 | "metadata": {
347 | "colab": {
348 | "base_uri": "https://localhost:8080/",
349 | "height": 295
350 | },
351 | "id": "XMO0scOGqgtK",
352 | "outputId": "864beba2-fd2f-40fb-fe4d-6c6f6cb97e76"
353 | },
354 | "source": [
355 | "import matplotlib.pyplot as plt\n",
356 | "# plot the actual data points of test set\n",
357 | "plt.scatter(X_test, y_test, color = 'red')\n",
358 | "# plot the regression line (same as above)\n",
359 | "plt.plot(X_train, regressor.predict(X_train), color='blue')\n",
360 | "plt.title('Salary vs Experience (Test set)')\n",
361 | "plt.xlabel('Years of Experience')\n",
362 | "plt.ylabel('Salary')\n",
363 | "plt.show()"
364 | ],
365 | "execution_count": 8,
366 | "outputs": [
367 | {
368 | "output_type": "display_data",
369 | "data": {
370 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZcAAAEWCAYAAACqitpwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deZhcZZn38e8vCVvYl8hAtsYJooCDQsviwiAgCQ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4AXCvpdOBmev4r/9XAeZI2AS8CH6ywzkTgUknDya5ZfKCfsd0uaWOangd8jGyU22MiYomk7wPfpWuI9V2VjYy8HnhPajsHuDi1DwN+C/zfPo7b0zmpKCJWSpoEXJfWXwG8ZXP3Y63LtyKbNal63rpstrncLWZmZlXnysXMzKrOlYuZmVWdk4uZmVWdk4uZmVWdk4uZmVWdk4uZmVXd/wdPV3PxLZt0qAAAAABJRU5ErkJggg==\n",
371 | "text/plain": [
372 | ""
373 | ]
374 | },
375 | "metadata": {
376 | "tags": [],
377 | "needs_background": "light"
378 | }
379 | }
380 | ]
381 | },
382 | {
383 | "cell_type": "markdown",
384 | "metadata": {
385 | "id": "mev-Lo1atntA"
386 | },
387 | "source": [
388 | "### Practical application of our model"
389 | ]
390 | },
391 | {
392 | "cell_type": "markdown",
393 | "metadata": {
394 | "id": "MlEuyM2zqjZJ"
395 | },
396 | "source": [
397 | "At this point, we are completed with our model. As an example of how you could apply this model in the real world, the code below shows the predicted salary of a person given a certain years of experience. "
398 | ]
399 | },
400 | {
401 | "cell_type": "code",
402 | "metadata": {
403 | "colab": {
404 | "base_uri": "https://localhost:8080/"
405 | },
406 | "id": "P3F7RSXRqvSw",
407 | "outputId": "94e54fdc-2315-4a5c-fb7a-605a92632e4a"
408 | },
409 | "source": [
410 | "# Step 7 - Make new prediction\n",
411 | "new_salary_pred = regressor.predict([[10]])\n",
412 | "print('The predicted salary of a person with 10 years experience is ',new_salary_pred)"
413 | ],
414 | "execution_count": 12,
415 | "outputs": [
416 | {
417 | "output_type": "stream",
418 | "text": [
419 | "The predicted salary of a person with 10 years experience is [26816.19224403]\n"
420 | ],
421 | "name": "stdout"
422 | }
423 | ]
424 | }
425 | ]
426 | }
--------------------------------------------------------------------------------
/projects/2_KerasPrerequisites.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# Getting started with Keras"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "Keras is a high-level neural networks API, written in Python.\n",
15 | "\n",
16 | "Since it’s written in Python, it can run on all the major operating systems.\n",
17 | "\n",
18 | "We will be using Google Colab for everything."
19 | ]
20 | },
21 | {
22 | "cell_type": "markdown",
23 | "metadata": {},
24 | "source": [
25 | "## Prerequisites"
26 | ]
27 | },
28 | {
29 | "cell_type": "markdown",
30 | "metadata": {},
31 | "source": [
32 | "1.\tKeras is both CPU and GPU compatible. \n",
33 | " - If you plan to train on small or simple datasets, then you will most likely be fine solely using your CPU.\n",
34 | " - Otherwise, you will need a machine with a GPU, and you will need to install cuDNN (NVIDIA's Deep Neural Network library).\n",
35 | "2.\tInstall Python.\n",
36 | " - I personally recommend installing Anaconda, a Python distribution.\n",
37 | " - Currently, Keras is compatible with Python 2.7-3.5.\n",
38 | "3.\tInstall a backend engine.\n",
39 | " - Keras supports either Theano or Tensorflow or CNTK.\n",
40 | " - Keras uses TF by default, so if using Theano or CNTK, you will need to change Keras configuration afterwards. \n",
41 | " - I have another video in this playlist that explains how to change the backend from Tensorflow to Theano.\n",
42 | "4.\tInstall Keras.\n",
43 | "5.\tInstall a Python IDE. \n",
44 | " - I prefer working with Jupyter Notebook, a scientific notebook for Python.\n",
45 | " - I’ll be using this for working with Keras in subsequent videos.\n",
46 | "6.\tInstall HDF5 and h5py to have the ability to save Keras models to disk.\n"
47 | ]
48 | }
49 | ],
50 | "metadata": {
51 | "kernelspec": {
52 | "display_name": "Python 3",
53 | "language": "python",
54 | "name": "python3"
55 | },
56 | "language_info": {
57 | "codemirror_mode": {
58 | "name": "ipython",
59 | "version": 3
60 | },
61 | "file_extension": ".py",
62 | "mimetype": "text/x-python",
63 | "name": "python",
64 | "nbconvert_exporter": "python",
65 | "pygments_lexer": "ipython3",
66 | "version": "3.8.3"
67 | }
68 | },
69 | "nbformat": 4,
70 | "nbformat_minor": 2
71 | }
72 |
--------------------------------------------------------------------------------
/projects/6_LinearRegressionProject2.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "kernelspec": {
6 | "display_name": "Python 3",
7 | "language": "python",
8 | "name": "python3"
9 | },
10 | "language_info": {
11 | "codemirror_mode": {
12 | "name": "ipython",
13 | "version": 3
14 | },
15 | "file_extension": ".py",
16 | "mimetype": "text/x-python",
17 | "name": "python",
18 | "nbconvert_exporter": "python",
19 | "pygments_lexer": "ipython3",
20 | "version": "3.8.3"
21 | },
22 | "colab": {
23 | "name": "LinearRegressionProject2UNIFINISHED.ipynb",
24 | "provenance": []
25 | }
26 | },
27 | "cells": [
28 | {
29 | "cell_type": "markdown",
30 | "metadata": {
31 | "id": "oYFDiSAvPAeL",
32 | "colab_type": "text"
33 | },
34 | "source": [
35 | "# Linear Regression Project 2 \n",
36 | "\n",
37 | "We will do one more linear regression project to confirm that the class fully understands these concepts. This time, we do expect that all of you create your own colab notebook and write the code as we do. By doing it yourself, you must understand all the concepts of the code. \n",
38 | "\n",
39 | "This project will be predicting the advertising value of a product based on its sales value. \n",
40 | "\n",
41 | "There are five steps in coding a linear regession model that we will follow today. These steps are generally applicable along all types of machine learning. \n",
42 | "\n",
43 | "1. Data Collection: Getting the data to train your model with\n",
44 | "2. Data Processing: Manipulating the data to be custom and compatible with your project\n",
45 | "3. Training the model: Using the data to improve your machine learning hypothesis function\n",
46 | "4. Assessing model accuracy: Testing how accurate your model truly is\n",
47 | "5. Making predictions: Using your finished model to make predictions on completely new data you have"
48 | ]
49 | },
50 | {
51 | "cell_type": "markdown",
52 | "metadata": {
53 | "id": "fiOwBSMARw6h",
54 | "colab_type": "text"
55 | },
56 | "source": [
57 | "## Data Collection\n",
58 | "\n",
59 | "Our goal here is to prepare for actually training the model by acquiring all necessary materials. For now, that means we will access relevant libraries along with our dataset, which will be used together to train the model. "
60 | ]
61 | },
62 | {
63 | "cell_type": "markdown",
64 | "metadata": {
65 | "id": "EZOKPmIDOTCG",
66 | "colab_type": "text"
67 | },
68 | "source": [
69 | "We always start a project by importing our relevant libraries, which allows us to access pre-written commands that make our lives easier. Here, we import numpy, pandas, and matplot, which you should have learned about in the python class. "
70 | ]
71 | },
72 | {
73 | "cell_type": "code",
74 | "metadata": {
75 | "id": "aZQzAHjAOTCI",
76 | "colab_type": "code",
77 | "colab": {}
78 | },
79 | "source": [
80 | "import numpy as np\n",
81 | "import pandas as pd\n",
82 | "import matplotlib.pyplot as plt"
83 | ],
84 | "execution_count": null,
85 | "outputs": []
86 | },
87 | {
88 | "cell_type": "markdown",
89 | "metadata": {
90 | "id": "rMXVxmL_OTCM",
91 | "colab_type": "text"
92 | },
93 | "source": [
94 | "At this point, we will import our dataset using the read_csv command. Through this command, we access the csv and convert it to a dataframe we can manipulate and work with through pandas. We first give the link to our dataset (which for now is in GitHub). We then specify that our header is none, which means that we don't give the columns any names for now. "
95 | ]
96 | },
97 | {
98 | "cell_type": "code",
99 | "metadata": {
100 | "id": "Dm0kuUcuOTCN",
101 | "colab_type": "code",
102 | "colab": {}
103 | },
104 | "source": [
105 | "df = pd.read_csv(\"https://raw.githubusercontent.com/SiP-AI-ML/LessonMaterials/master/sales_data.csv\", header=None)"
106 | ],
107 | "execution_count": null,
108 | "outputs": []
109 | },
110 | {
111 | "cell_type": "markdown",
112 | "metadata": {
113 | "id": "W2gCg3dVOTCh",
114 | "colab_type": "text"
115 | },
116 | "source": [
117 | "We want to confirm that our data looks how we expected. We can do so using the head() method, which allows us to view the top five rows of our dataset. "
118 | ]
119 | },
120 | {
121 | "cell_type": "code",
122 | "metadata": {
123 | "id": "ZRUWIECEOTCh",
124 | "colab_type": "code",
125 | "colab": {
126 | "base_uri": "https://localhost:8080/",
127 | "height": 119
128 | },
129 | "outputId": "0587df23-600a-4b50-8563-db02aac59d79"
130 | },
131 | "source": [
132 | "print(df.head())"
133 | ],
134 | "execution_count": null,
135 | "outputs": [
136 | {
137 | "output_type": "stream",
138 | "text": [
139 | " 0 1\n",
140 | "0 12.0 15.0\n",
141 | "1 20.5 16.0\n",
142 | "2 21.0 18.0\n",
143 | "3 15.5 27.0\n",
144 | "4 15.3 21.0\n"
145 | ],
146 | "name": "stdout"
147 | }
148 | ]
149 | },
150 | {
151 | "cell_type": "markdown",
152 | "metadata": {
153 | "id": "aPMwVA62R8pE",
154 | "colab_type": "text"
155 | },
156 | "source": [
157 | "## Data Processing\n",
158 | "\n",
159 | "We now have a dataset that looks reasonable and the functions to carry them out. However, the data here isn't compatible with our model yet. Therefore, we have to change it around to input it. "
160 | ]
161 | },
162 | {
163 | "cell_type": "markdown",
164 | "metadata": {
165 | "id": "FVDJHcrHOTDB",
166 | "colab_type": "text"
167 | },
168 | "source": [
169 | "First, let's give our columns titles to make it easier to refer to them. "
170 | ]
171 | },
172 | {
173 | "cell_type": "code",
174 | "metadata": {
175 | "id": "N7ImeNAvOTDC",
176 | "colab_type": "code",
177 | "colab": {}
178 | },
179 | "source": [
180 | "df.columns = ['Sales', 'Advertising']"
181 | ],
182 | "execution_count": null,
183 | "outputs": []
184 | },
185 | {
186 | "cell_type": "markdown",
187 | "metadata": {
188 | "id": "KIKGgBXdOTDP",
189 | "colab_type": "text"
190 | },
191 | "source": [
192 | "To confirm that our columns were properly renamed, we will call the head function again."
193 | ]
194 | },
195 | {
196 | "cell_type": "code",
197 | "metadata": {
198 | "id": "vtiE99enOTDQ",
199 | "colab_type": "code",
200 | "colab": {
201 | "base_uri": "https://localhost:8080/",
202 | "height": 119
203 | },
204 | "outputId": "1cb3ed81-1fa1-478e-9e5c-83df7d192891"
205 | },
206 | "source": [
207 | "print(df.head())"
208 | ],
209 | "execution_count": null,
210 | "outputs": [
211 | {
212 | "output_type": "stream",
213 | "text": [
214 | " Sales Advertising\n",
215 | "0 12.0 15.0\n",
216 | "1 20.5 16.0\n",
217 | "2 21.0 18.0\n",
218 | "3 15.5 27.0\n",
219 | "4 15.3 21.0\n"
220 | ],
221 | "name": "stdout"
222 | }
223 | ]
224 | },
225 | {
226 | "cell_type": "markdown",
227 | "metadata": {
228 | "id": "Sr3kLleyOTDc",
229 | "colab_type": "text"
230 | },
231 | "source": [
232 | "Next, let's isolate our sales column and give it its own variable. This will allow us to specifically access the sales column while training our model, which will make the entire process much easier. "
233 | ]
234 | },
235 | {
236 | "cell_type": "code",
237 | "metadata": {
238 | "id": "6hVhubEbOTDc",
239 | "colab_type": "code",
240 | "colab": {}
241 | },
242 | "source": [
243 | "X = df['Sales'].values"
244 | ],
245 | "execution_count": null,
246 | "outputs": []
247 | },
248 | {
249 | "cell_type": "markdown",
250 | "metadata": {
251 | "id": "g1lvhXgqOTDf",
252 | "colab_type": "text"
253 | },
254 | "source": [
255 | "We will do the same for y, which represents the advertising column. This will make the entire process of training and visualizing our data much easier."
256 | ]
257 | },
258 | {
259 | "cell_type": "code",
260 | "metadata": {
261 | "id": "92HH0r6yOTDf",
262 | "colab_type": "code",
263 | "colab": {}
264 | },
265 | "source": [
266 | "y = df['Advertising'].values"
267 | ],
268 | "execution_count": null,
269 | "outputs": []
270 | },
271 | {
272 | "cell_type": "markdown",
273 | "metadata": {
274 | "id": "CSzem0y2OTDs",
275 | "colab_type": "text"
276 | },
277 | "source": [
278 | "We have now isolated the columns of our dataset and given them their own variables, which is helpful for later use. However, our data is still incompatible with the machine learning model. We need to change the structure of our dataset in order to input it. \n",
279 | "\n",
280 | "Specifically, a machine learning model requires a 2D array. For those of you who haven't taken algebra, it's essentially a bunch of arrays in an array. We need to make our X and Y columns into 2D array to input them. \n",
281 | "\n",
282 | "We will do so using the numpy reshape method. We will make our first dimension -1; don't worry about this, as it is irrelevant and doesn't impact our dataset. The other dimension will be 1, which means the array is just 1 row of inputs. \n"
283 | ]
284 | },
285 | {
286 | "cell_type": "code",
287 | "metadata": {
288 | "id": "NcxifSCrOTDs",
289 | "colab_type": "code",
290 | "colab": {
291 | "base_uri": "https://localhost:8080/",
292 | "height": 629
293 | },
294 | "outputId": "625fd7cc-c139-429b-f002-4655808277f8"
295 | },
296 | "source": [
297 | "X = X.reshape(-1,1)\n",
298 | "y = y.reshape(-1,1)\n",
299 | "\n",
300 | "print(X)\n"
301 | ],
302 | "execution_count": null,
303 | "outputs": [
304 | {
305 | "output_type": "stream",
306 | "text": [
307 | "[[12. ]\n",
308 | " [20.5]\n",
309 | " [21. ]\n",
310 | " [15.5]\n",
311 | " [15.3]\n",
312 | " [23.5]\n",
313 | " [24.5]\n",
314 | " [21.3]\n",
315 | " [23.5]\n",
316 | " [28. ]\n",
317 | " [24. ]\n",
318 | " [15.5]\n",
319 | " [17.3]\n",
320 | " [25.3]\n",
321 | " [25. ]\n",
322 | " [36.5]\n",
323 | " [36.5]\n",
324 | " [29.6]\n",
325 | " [30.5]\n",
326 | " [28. ]\n",
327 | " [26. ]\n",
328 | " [21.5]\n",
329 | " [19.7]\n",
330 | " [19. ]\n",
331 | " [16. ]\n",
332 | " [20.7]\n",
333 | " [26.5]\n",
334 | " [30.6]\n",
335 | " [32.3]\n",
336 | " [29.5]\n",
337 | " [28.3]\n",
338 | " [31.3]\n",
339 | " [32.3]\n",
340 | " [26.4]\n",
341 | " [23.4]\n",
342 | " [16.4]]\n"
343 | ],
344 | "name": "stdout"
345 | }
346 | ]
347 | },
348 | {
349 | "cell_type": "markdown",
350 | "metadata": {
351 | "id": "XEKSF8RXOTDy",
352 | "colab_type": "text"
353 | },
354 | "source": [
355 | "We need to train our data and improve our model's accuracy, but we also need to see how well our model is doing. To do this, we will split our data into 2 sections -- the training section and the testing section. We use the training section to improve our model and the testing section to assess its capabilities. "
356 | ]
357 | },
358 | {
359 | "cell_type": "code",
360 | "metadata": {
361 | "id": "3tNL1-nQOTD0",
362 | "colab_type": "code",
363 | "colab": {}
364 | },
365 | "source": [
366 | "from sklearn.model_selection import train_test_split\n",
367 | "X_train,X_test,y_train,y_test = train_test_split(X, y, test_size=0.33, random_state=42)\n"
368 | ],
369 | "execution_count": null,
370 | "outputs": []
371 | },
372 | {
373 | "cell_type": "markdown",
374 | "metadata": {
375 | "id": "TiJL6NI9OTD5",
376 | "colab_type": "text"
377 | },
378 | "source": [
379 | "## Training our model\n",
380 | "\n",
381 | "Now that our dataset is properly distributed to input into the model, we can begin the initial process of training our model. \n"
382 | ]
383 | },
384 | {
385 | "cell_type": "markdown",
386 | "metadata": {
387 | "id": "al2aro53QKW9",
388 | "colab_type": "text"
389 | },
390 | "source": [
391 | "We want to use sklearn's capabilities to train our model. We know that we want to use Linear Regression, so we import this from sklearn. However, we need a way to access all these functions, and we do so by initializing it as a variable. "
392 | ]
393 | },
394 | {
395 | "cell_type": "code",
396 | "metadata": {
397 | "id": "BhVjkAtHOTD5",
398 | "colab_type": "code",
399 | "colab": {}
400 | },
401 | "source": [
402 | "from sklearn.linear_model import LinearRegression\n",
403 | "lm = LinearRegression()"
404 | ],
405 | "execution_count": null,
406 | "outputs": []
407 | },
408 | {
409 | "cell_type": "markdown",
410 | "metadata": {
411 | "id": "pt4Bdm2bQaGv",
412 | "colab_type": "text"
413 | },
414 | "source": [
415 | "Now, we have everything we need to begin training our model. We have the dataset in the proper configuration and have established the function we want to fit our data to. \n",
416 | "\n",
417 | "Training our model is one simple line of code, written below. Using this one line, the model first comes up with a starting hypothesis. Using the cost function and gradient descent (refer to Week 2), it gradually fits the line better and better to the training data to minimize the error margin. "
418 | ]
419 | },
420 | {
421 | "cell_type": "code",
422 | "metadata": {
423 | "id": "dlgs1xeSQcBb",
424 | "colab_type": "code",
425 | "colab": {}
426 | },
427 | "source": [
428 | "lm.fit(X_train,y_train)"
429 | ],
430 | "execution_count": null,
431 | "outputs": []
432 | },
433 | {
434 | "cell_type": "markdown",
435 | "metadata": {
436 | "id": "zTlJ8yt9QaOz",
437 | "colab_type": "text"
438 | },
439 | "source": [
440 | "Now that we have trained our model, let's use a plot to visualize how well it fits to our data. It's not a great fit, but considering the disparity between the data, it fits as well as it can. "
441 | ]
442 | },
443 | {
444 | "cell_type": "code",
445 | "metadata": {
446 | "id": "8g2QHVBkQcJl",
447 | "colab_type": "code",
448 | "colab": {
449 | "base_uri": "https://localhost:8080/",
450 | "height": 295
451 | },
452 | "outputId": "10b3f614-7847-4795-9001-dd0006b0ddea"
453 | },
454 | "source": [
455 | "# plot the actual data points of training set\n",
456 | "plt.scatter(X_train, y_train, color = 'red')\n",
457 | "# plot the regression line\n",
458 | "plt.plot(X_train, lm.predict(X_train), color='blue')\n",
459 | "plt.title('Sales Value vs Advertising Value (Training set)')\n",
460 | "plt.xlabel('Sales Value')\n",
461 | "plt.ylabel('Advertising Value')\n",
462 | "plt.show()"
463 | ],
464 | "execution_count": null,
465 | "outputs": [
466 | {
467 | "output_type": "display_data",
468 | "data": {
469 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEWCAYAAABhffzLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deZgcVdn+8e8dthj2QAhhm0FAFhe2AUSRVUUQBBRZDDEqPyOiiDsoLvBeb3xBRUBlC4pEM2yyiyIim4CKTNgxgAgJWzYETEIgkOT5/XGqmZ5Od0/PZHq/P9fVV3edqq5+qqv76dOnTp1SRGBmZu1jWL0DMDOz2nLiNzNrM078ZmZtxonfzKzNOPGbmbUZJ34zszbjxF8FkqZLen+948iRFJI2r3ccQ0FSZ7Y9K9bo9b4t6RcVLHeDpPG1iKlSkj4l6c4qrv8uSdsP8TrHSvrTUC9bL5IOlHRZveMo5MRfgqTdJP1V0n8lvZh9yHeqUyx/lPQ/RcoPkjSrVkmwmiTtmSX0E+ocw7P5ZRHxg4j4f/09NyL2i4jJQxzPhpIWS9qsyLyrJf14KF9vICQdCMyPiPsknSdpQXZ7XdIbedM3DGS9EdEdER8c6mVroVilJCJ+B7xd0rvqGNoynPiLkLQGcD3wM2AksCFwCrCoTiFNBo6SpILycUB3RCyuQ0xDbTzwIvDJerx4I/54RsR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SNcA1RV73dUnXAYdKupI0HPONpFP2f5BdkGcpaVji0aQhqftTLh6zQXPit5YTEUuA24DbJD0EjM+aZ84BuiLimewqaMMLnirgkYjYtchqPwzsDhwInCTpnXnjzOdcAnw3W8+1EfFG1mQzCtgxm55e5HUX0/ffd25+uXjMBs1NPdZSJG0paYu8ou1Ig8HlkukL2Vj5xXrxPAaMyg4QI2klSW+XNAzYOCJuJY2rviawWpHn3wZsAXyB9CNAtuycLOnvBXQUed4MYBtJq2QjPe5TLp7+3wWz8lzjt1azGvCzLIEuBp4AJkTEy5IuIA2POwu4p/CJWXPNocBPs145KwJnAo8DU7IyAT/Nxl4vfP5SSVeQrq97e1bcDfwu++fRAzxa5HnPSLo8i+0p0iiW5eJ5ZJDvjRng0TnNzNqOm3rMzNqME7+ZWZtx4jczazNO/GZmbcaJ38yszTjxm5m1GSd+M7M28/8BAeCZlvjLRDsAAAAASUVORK5CYII=\n",
470 | "text/plain": [
471 | ""
472 | ]
473 | },
474 | "metadata": {
475 | "tags": [],
476 | "needs_background": "light"
477 | }
478 | }
479 | ]
480 | },
481 | {
482 | "cell_type": "markdown",
483 | "metadata": {
484 | "id": "hx797xogOTD8",
485 | "colab_type": "text"
486 | },
487 | "source": [
488 | "## Making predictions\n",
489 | "\n",
490 | "\n"
491 | ]
492 | },
493 | {
494 | "cell_type": "markdown",
495 | "metadata": {
496 | "colab_type": "text",
497 | "id": "b1AIZxr5pZyu"
498 | },
499 | "source": [
500 | "Now that we have a linear regression model fitted and trained on our data, we need to assess how well it can predict unknown data, which is the entire purpose of machine learning. To do so, we will now refer to the other section of our dataset, the testing section. We call the predict function to do so. "
501 | ]
502 | },
503 | {
504 | "cell_type": "code",
505 | "metadata": {
506 | "colab_type": "code",
507 | "id": "4YWwrwuApi99",
508 | "colab": {}
509 | },
510 | "source": [
511 | "y_pred = lm.predict(X_test)"
512 | ],
513 | "execution_count": null,
514 | "outputs": []
515 | },
516 | {
517 | "cell_type": "markdown",
518 | "metadata": {
519 | "id": "O3OFDZ-oaCNW",
520 | "colab_type": "text"
521 | },
522 | "source": [
523 | "Now that we have used the model on data it hasn't seen before, let's visualize how well it fits. "
524 | ]
525 | },
526 | {
527 | "cell_type": "code",
528 | "metadata": {
529 | "id": "L_RBPTUBaBhj",
530 | "colab_type": "code",
531 | "colab": {
532 | "base_uri": "https://localhost:8080/",
533 | "height": 295
534 | },
535 | "outputId": "72790bd7-db83-42e3-b0ac-26002bb6a0e1"
536 | },
537 | "source": [
538 | "import matplotlib.pyplot as plt\n",
539 | "# plot the actual data points of test set\n",
540 | "plt.scatter(X_test, y_test, color = 'red')\n",
541 | "# plot the regression line (same as above)\n",
542 | "plt.plot(X_train, lm.predict(X_train), color='blue')\n",
543 | "plt.title('Sales Value vs Advertising Value (Test Set)')\n",
544 | "plt.xlabel('Sales Value')\n",
545 | "plt.ylabel('Advertising value')\n",
546 | "plt.show()"
547 | ],
548 | "execution_count": null,
549 | "outputs": [
550 | {
551 | "output_type": "display_data",
552 | "data": {
553 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEWCAYAAABhffzLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3de5xbVbn/8c+33AuFtlB6KtAOB1DuAg4IR36KF/QIatUDCBYsHqXgEQ+KekCrB1CroCKIIDKIWmSAgqBcRLAg4AVFWkDkKhdbbgUKpfYyR2jp8/tjrTCZNJnJTCfJTPJ9v17zSrJ2svezk8mTJ2uvrK2IwMzMWseIRgdgZmb15cRvZtZinPjNzFqME7+ZWYtx4jczazFO/GZmLcaJv8EkzZP0jkbHUSApJG3b6DgGg6S2vD9r12l7X5T0wyru9ytJU+sRU7UkHSnp9zVc/x8k7V6r9deLpPGSHpC0XqNjWRNO/INA0r6SbpP0D0mL8j/5ng2K5X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6QPAfJ9n8tJ/63ApDKPmw/sKGm9PNPj23uLp+9nwax3rvit2WwEfC8n0JXAI8C0iFgs6XzS9LjPAHeUPjB31xwEnJVH5awNnAn8Dbgotwk4K8+9Xvr4VZJ+Rjq/7q25uRO4Jn/zmAM8WOZxT0i6LMf2d9Islr3Fc98AnxszwLNzmpm1HHf1mJm1GCd+M7MW48RvZtZinPjNzFqME7+ZWYtx4jczazFO/GZmLeb/AwSYvwq6gfWSAAAAAElFTkSuQmCC\n",
554 | "text/plain": [
555 | ""
556 | ]
557 | },
558 | "metadata": {
559 | "tags": [],
560 | "needs_background": "light"
561 | }
562 | }
563 | ]
564 | },
565 | {
566 | "cell_type": "markdown",
567 | "metadata": {
568 | "id": "sP-VDbWqOTEB",
569 | "colab_type": "text"
570 | },
571 | "source": [
572 | "## Making predictions\n",
573 | "\n",
574 | "Now that our model is completely done, we can put it to use by making predictions. \n"
575 | ]
576 | },
577 | {
578 | "cell_type": "markdown",
579 | "metadata": {
580 | "id": "z9m3fw_BSnc7",
581 | "colab_type": "text"
582 | },
583 | "source": [
584 | "First, we can use it to predict the values of items in our dataset. Below, we predict the advertising value on the first five sales values of our dataset. "
585 | ]
586 | },
587 | {
588 | "cell_type": "code",
589 | "metadata": {
590 | "id": "749-rNMdOTEC",
591 | "colab_type": "code",
592 | "colab": {
593 | "base_uri": "https://localhost:8080/",
594 | "height": 102
595 | },
596 | "outputId": "80ec62df-ef33-4c90-a680-2cfc61ed1ab6"
597 | },
598 | "source": [
599 | "lm.predict(X)[0:5]"
600 | ],
601 | "execution_count": null,
602 | "outputs": [
603 | {
604 | "output_type": "execute_result",
605 | "data": {
606 | "text/plain": [
607 | "array([[ 8.10108551],\n",
608 | " [21.74438002],\n",
609 | " [22.54692675],\n",
610 | " [13.71891266],\n",
611 | " [13.39789396]])"
612 | ]
613 | },
614 | "metadata": {
615 | "tags": []
616 | },
617 | "execution_count": 111
618 | }
619 | ]
620 | },
621 | {
622 | "cell_type": "markdown",
623 | "metadata": {
624 | "id": "8l1m5frVS2eh",
625 | "colab_type": "text"
626 | },
627 | "source": [
628 | "We can also use it to predict the advertising value on sales data it hasn't seen before, which would make it useful for all types of expenditures. Remember that the input is always a 2D array, so before entering it into your model, you must follow this format. "
629 | ]
630 | },
631 | {
632 | "cell_type": "code",
633 | "metadata": {
634 | "id": "4TkZIqTjOTEE",
635 | "colab_type": "code",
636 | "colab": {
637 | "base_uri": "https://localhost:8080/",
638 | "height": 34
639 | },
640 | "outputId": "9666504b-3d27-48b7-c875-8537257bbd2b"
641 | },
642 | "source": [
643 | "# To make an individual prediction using the linear regression model.\n",
644 | "\n",
645 | "givenPrediction = [[28]]\n",
646 | "\n",
647 | "print(str(lm.predict(givenPrediction)))"
648 | ],
649 | "execution_count": null,
650 | "outputs": [
651 | {
652 | "output_type": "stream",
653 | "text": [
654 | "[[33.78258106]]\n"
655 | ],
656 | "name": "stdout"
657 | }
658 | ]
659 | }
660 | ]
661 | }
--------------------------------------------------------------------------------
/projects/9_MNIST.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "MNIST.ipynb",
7 | "provenance": [],
8 | "authorship_tag": "ABX9TyMQpYOeDg8pDANFU1YXSapm",
9 | "include_colab_link": true
10 | },
11 | "kernelspec": {
12 | "name": "python3",
13 | "display_name": "Python 3"
14 | }
15 | },
16 | "cells": [
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {
20 | "id": "view-in-github",
21 | "colab_type": "text"
22 | },
23 | "source": [
24 | ""
25 | ]
26 | },
27 | {
28 | "cell_type": "code",
29 | "metadata": {
30 | "id": "qKyJ0_KYFnl6",
31 | "colab_type": "code",
32 | "colab": {
33 | "base_uri": "https://localhost:8080/",
34 | "height": 68
35 | },
36 | "outputId": "ffafc984-bd3c-45ee-9baf-22cefd8f08b5"
37 | },
38 | "source": [
39 | "import keras\n",
40 | "from keras.datasets import mnist\n",
41 | "from keras.models import Sequential\n",
42 | "from keras.layers import Dense, Dropout, Flatten\n",
43 | "from keras.layers import Conv2D, MaxPooling2D\n",
44 | "from keras import backend as K\n",
45 | "# the data, split between train and test sets\n",
46 | "(x_train, y_train), (x_test, y_test) = mnist.load_data()\n",
47 | "print(x_train.shape, y_train.shape)"
48 | ],
49 | "execution_count": 1,
50 | "outputs": [
51 | {
52 | "output_type": "stream",
53 | "text": [
54 | "Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz\n",
55 | "11493376/11490434 [==============================] - 0s 0us/step\n",
56 | "(60000, 28, 28) (60000,)\n"
57 | ],
58 | "name": "stdout"
59 | }
60 | ]
61 | },
62 | {
63 | "cell_type": "code",
64 | "metadata": {
65 | "id": "enXvgxUqFtIL",
66 | "colab_type": "code",
67 | "colab": {
68 | "base_uri": "https://localhost:8080/",
69 | "height": 68
70 | },
71 | "outputId": "fbfbe382-82e1-4ce0-ac1e-f1284af9b3ea"
72 | },
73 | "source": [
74 | "num_classes = 10\n",
75 | "\n",
76 | "x_train = x_train.reshape(x_train.shape[0], 28, 28, 1)\n",
77 | "x_test = x_test.reshape(x_test.shape[0], 28, 28, 1)\n",
78 | "input_shape = (28, 28, 1)\n",
79 | "# convert class vectors to binary class matrices\n",
80 | "y_train = keras.utils.to_categorical(y_train, num_classes)\n",
81 | "y_test = keras.utils.to_categorical(y_test, num_classes)\n",
82 | "x_train = x_train.astype('float32')\n",
83 | "x_test = x_test.astype('float32')\n",
84 | "x_train /= 255\n",
85 | "x_test /= 255\n",
86 | "print('x_train shape:', x_train.shape)\n",
87 | "print(x_train.shape[0], 'train samples')\n",
88 | "print(x_test.shape[0], 'test samples')"
89 | ],
90 | "execution_count": 3,
91 | "outputs": [
92 | {
93 | "output_type": "stream",
94 | "text": [
95 | "x_train shape: (60000, 28, 28, 1)\n",
96 | "60000 train samples\n",
97 | "10000 test samples\n"
98 | ],
99 | "name": "stdout"
100 | }
101 | ]
102 | },
103 | {
104 | "cell_type": "code",
105 | "metadata": {
106 | "id": "7lurG_NuFvGU",
107 | "colab_type": "code",
108 | "colab": {}
109 | },
110 | "source": [
111 | "batch_size = 128\n",
112 | "epochs = 10\n",
113 | "model = Sequential()\n",
114 | "model.add(Conv2D(32, kernel_size=(3, 3),activation='relu',input_shape=input_shape))\n",
115 | "model.add(Conv2D(64, (3, 3), activation='relu'))\n",
116 | "model.add(MaxPooling2D(pool_size=(2, 2)))\n",
117 | "model.add(Dropout(0.25))\n",
118 | "model.add(Flatten())\n",
119 | "model.add(Dense(256, activation='relu'))\n",
120 | "model.add(Dropout(0.5))\n",
121 | "model.add(Dense(num_classes, activation='softmax'))\n",
122 | "model.compile(loss=keras.losses.categorical_crossentropy,optimizer=keras.optimizers.Adadelta(),metrics=['accuracy'])"
123 | ],
124 | "execution_count": 4,
125 | "outputs": []
126 | },
127 | {
128 | "cell_type": "code",
129 | "metadata": {
130 | "id": "ugiV95JEFzLn",
131 | "colab_type": "code",
132 | "colab": {
133 | "base_uri": "https://localhost:8080/",
134 | "height": 426
135 | },
136 | "outputId": "4cada984-3ce2-4be2-f28b-c6587d431ccb"
137 | },
138 | "source": [
139 | "hist = model.fit(x_train, y_train,batch_size=batch_size,epochs=epochs,verbose=1,validation_data=(x_test, y_test))\n",
140 | "print(\"The model has successfully trained\")\n",
141 | "model.save('mnist.h5')\n",
142 | "print(\"Saving the model as mnist.h5\")"
143 | ],
144 | "execution_count": 5,
145 | "outputs": [
146 | {
147 | "output_type": "stream",
148 | "text": [
149 | "Epoch 1/10\n",
150 | "469/469 [==============================] - 155s 331ms/step - loss: 2.2778 - accuracy: 0.1481 - val_loss: 2.2321 - val_accuracy: 0.3136\n",
151 | "Epoch 2/10\n",
152 | " 30/469 [>.............................] - ETA: 2:15 - loss: 2.2431 - accuracy: 0.2096"
153 | ],
154 | "name": "stdout"
155 | },
156 | {
157 | "output_type": "error",
158 | "ename": "KeyboardInterrupt",
159 | "evalue": "ignored",
160 | "traceback": [
161 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
162 | "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
163 | "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mhist\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfit\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx_train\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my_train\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mbatch_size\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mbatch_size\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mepochs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mepochs\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mvalidation_data\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx_test\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my_test\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"The model has successfully trained\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msave\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'mnist.h5'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Saving the model as mnist.h5\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
164 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py\u001b[0m in \u001b[0;36m_method_wrapper\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 106\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_method_wrapper\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 107\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_in_multi_worker_mode\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;31m# pylint: disable=protected-access\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 108\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mmethod\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 109\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 110\u001b[0m \u001b[0;31m# Running inside `run_distribute_coordinator` already.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
165 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py\u001b[0m in \u001b[0;36mfit\u001b[0;34m(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_batch_size, validation_freq, max_queue_size, workers, use_multiprocessing)\u001b[0m\n\u001b[1;32m 1096\u001b[0m batch_size=batch_size):\n\u001b[1;32m 1097\u001b[0m \u001b[0mcallbacks\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_train_batch_begin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstep\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1098\u001b[0;31m \u001b[0mtmp_logs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtrain_function\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0miterator\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1099\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mdata_handler\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshould_sync\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1100\u001b[0m \u001b[0mcontext\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0masync_wait\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
166 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/def_function.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, *args, **kwds)\u001b[0m\n\u001b[1;32m 778\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 779\u001b[0m \u001b[0mcompiler\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"nonXla\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 780\u001b[0;31m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 781\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 782\u001b[0m \u001b[0mnew_tracing_count\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_tracing_count\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
167 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/def_function.py\u001b[0m in \u001b[0;36m_call\u001b[0;34m(self, *args, **kwds)\u001b[0m\n\u001b[1;32m 805\u001b[0m \u001b[0;31m# In this case we have created variables on the first call, so we run the\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 806\u001b[0m \u001b[0;31m# defunned version which is guaranteed to never create variables.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 807\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_stateless_fn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# pylint: disable=not-callable\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 808\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_stateful_fn\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 809\u001b[0m \u001b[0;31m# Release the lock early so that multiple threads can perform the call\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
168 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/function.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 2827\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_lock\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2828\u001b[0m \u001b[0mgraph_function\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_maybe_define_function\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2829\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mgraph_function\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_filtered_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# pylint: disable=protected-access\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2830\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2831\u001b[0m \u001b[0;34m@\u001b[0m\u001b[0mproperty\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
169 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/function.py\u001b[0m in \u001b[0;36m_filtered_call\u001b[0;34m(self, args, kwargs, cancellation_manager)\u001b[0m\n\u001b[1;32m 1846\u001b[0m resource_variable_ops.BaseResourceVariable))],\n\u001b[1;32m 1847\u001b[0m \u001b[0mcaptured_inputs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcaptured_inputs\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1848\u001b[0;31m cancellation_manager=cancellation_manager)\n\u001b[0m\u001b[1;32m 1849\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1850\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_call_flat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcaptured_inputs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcancellation_manager\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mNone\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
170 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/function.py\u001b[0m in \u001b[0;36m_call_flat\u001b[0;34m(self, args, captured_inputs, cancellation_manager)\u001b[0m\n\u001b[1;32m 1922\u001b[0m \u001b[0;31m# No tape is watching; skip to running the function.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1923\u001b[0m return self._build_call_outputs(self._inference_function.call(\n\u001b[0;32m-> 1924\u001b[0;31m ctx, args, cancellation_manager=cancellation_manager))\n\u001b[0m\u001b[1;32m 1925\u001b[0m forward_backward = self._select_forward_and_backward_functions(\n\u001b[1;32m 1926\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
171 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/function.py\u001b[0m in \u001b[0;36mcall\u001b[0;34m(self, ctx, args, cancellation_manager)\u001b[0m\n\u001b[1;32m 548\u001b[0m \u001b[0minputs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 549\u001b[0m \u001b[0mattrs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mattrs\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 550\u001b[0;31m ctx=ctx)\n\u001b[0m\u001b[1;32m 551\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 552\u001b[0m outputs = execute.execute_with_cancellation(\n",
172 | "\u001b[0;32m/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/execute.py\u001b[0m in \u001b[0;36mquick_execute\u001b[0;34m(op_name, num_outputs, inputs, attrs, ctx, name)\u001b[0m\n\u001b[1;32m 58\u001b[0m \u001b[0mctx\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mensure_initialized\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 59\u001b[0m tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,\n\u001b[0;32m---> 60\u001b[0;31m inputs, attrs, num_outputs)\n\u001b[0m\u001b[1;32m 61\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_NotOkStatusException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 62\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mname\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
173 | "\u001b[0;31mKeyboardInterrupt\u001b[0m: "
174 | ]
175 | }
176 | ]
177 | },
178 | {
179 | "cell_type": "code",
180 | "metadata": {
181 | "id": "SYVImY0fF2NY",
182 | "colab_type": "code",
183 | "colab": {
184 | "base_uri": "https://localhost:8080/",
185 | "height": 51
186 | },
187 | "outputId": "8e75883d-2c15-431d-d162-16fd047f2af3"
188 | },
189 | "source": [
190 | "score = model.evaluate(x_test, y_test, verbose=0)\n",
191 | "print('Test loss:', score[0])\n",
192 | "print('Test accuracy:', score[1])"
193 | ],
194 | "execution_count": 6,
195 | "outputs": [
196 | {
197 | "output_type": "stream",
198 | "text": [
199 | "Test loss: 2.226501941680908\n",
200 | "Test accuracy: 0.3321000039577484\n"
201 | ],
202 | "name": "stdout"
203 | }
204 | ]
205 | },
206 | {
207 | "cell_type": "code",
208 | "metadata": {
209 | "id": "-tGtu52lF91z",
210 | "colab_type": "code",
211 | "colab": {
212 | "base_uri": "https://localhost:8080/",
213 | "height": 368
214 | },
215 | "outputId": "c026ba69-e301-482c-c97b-14330df4ba4c"
216 | },
217 | "source": [
218 | "from keras.models import load_model\n",
219 | "from tkinter import *\n",
220 | "import tkinter as tk\n",
221 | "import win32gui\n",
222 | "from PIL import ImageGrab, Image\n",
223 | "import numpy as np\n",
224 | "model = load_model('mnist.h5')\n",
225 | "def predict_digit(img):\n",
226 | " #resize image to 28x28 pixels\n",
227 | " img = img.resize((28,28))\n",
228 | " #convert rgb to grayscale\n",
229 | " img = img.convert('L')\n",
230 | " img = np.array(img)\n",
231 | " #reshaping to support our model input and normalizing\n",
232 | " img = img.reshape(1,28,28,1)\n",
233 | " img = img/255.0\n",
234 | " #predicting the class\n",
235 | " res = model.predict([img])[0]\n",
236 | " return np.argmax(res), max(res)\n",
237 | "class App(tk.Tk):\n",
238 | " def __init__(self):\n",
239 | " tk.Tk.__init__(self)\n",
240 | " self.x = self.y = 0\n",
241 | " # Creating elements\n",
242 | " self.canvas = tk.Canvas(self, width=300, height=300, bg = \"white\", cursor=\"cross\")\n",
243 | " self.label = tk.Label(self, text=\"Thinking..\", font=(\"Helvetica\", 48))\n",
244 | " self.classify_btn = tk.Button(self, text = \"Recognise\", command = self.classify_handwriting) \n",
245 | " self.button_clear = tk.Button(self, text = \"Clear\", command = self.clear_all)\n",
246 | " # Grid structure\n",
247 | " self.canvas.grid(row=0, column=0, pady=2, sticky=W, )\n",
248 | " self.label.grid(row=0, column=1,pady=2, padx=2)\n",
249 | " self.classify_btn.grid(row=1, column=1, pady=2, padx=2)\n",
250 | " self.button_clear.grid(row=1, column=0, pady=2)\n",
251 | " #self.canvas.bind(\"\", self.start_pos)\n",
252 | " self.canvas.bind(\"\", self.draw_lines)\n",
253 | " def clear_all(self):\n",
254 | " self.canvas.delete(\"all\")\n",
255 | " def classify_handwriting(self):\n",
256 | " HWND = self.canvas.winfo_id() # get the handle of the canvas\n",
257 | " rect = win32gui.GetWindowRect(HWND) # get the coordinate of the canvas\n",
258 | " im = ImageGrab.grab(rect)\n",
259 | " digit, acc = predict_digit(im)\n",
260 | " self.label.configure(text= str(digit)+', '+ str(int(acc*100))+'%')\n",
261 | " def draw_lines(self, event):\n",
262 | " self.x = event.x\n",
263 | " self.y = event.y\n",
264 | " r=8\n",
265 | " self.canvas.create_oval(self.x-r, self.y-r, self.x + r, self.y + r, fill='black')\n",
266 | "app = App()\n",
267 | "mainloop()"
268 | ],
269 | "execution_count": 7,
270 | "outputs": [
271 | {
272 | "output_type": "error",
273 | "ename": "ModuleNotFoundError",
274 | "evalue": "ignored",
275 | "traceback": [
276 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
277 | "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
278 | "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtkinter\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mtkinter\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mtk\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mwin32gui\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 5\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mPIL\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mImageGrab\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mImage\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
279 | "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'win32gui'",
280 | "",
281 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0;32m\nNOTE: If your import is failing due to a missing package, you can\nmanually install dependencies using either !pip or !apt.\n\nTo view examples of installing some common dependencies, click the\n\"Open Examples\" button below.\n\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n"
282 | ]
283 | }
284 | ]
285 | }
286 | ]
287 | }
--------------------------------------------------------------------------------
/projects/models/4_my_model_weights.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/projects/models/4_my_model_weights.h5
--------------------------------------------------------------------------------
/projects/models/5_medical_trial_model.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Intro-Course-AI-ML/LessonMaterials/8992f5f4917f4569732a7d464ac950c10ec7aa52/projects/models/5_medical_trial_model.h5
--------------------------------------------------------------------------------