├── Candidate Elimination Algorithm
├── CEA_Car.ipynb
├── CEA_Sport.ipynb
├── EconomyCar.csv
└── EnjoySport.csv
├── Find-S Algorithm
├── EconomyCar.csv
├── EconomyCar.ipynb
├── EnjoySport.csv
└── EnjoySport.ipynb
├── ID3 Decision Tree algorithm
├── ID3_Decision_Tree.ipynb
└── PlayTennis.csv
├── K Nearest Neighbors
├── HomePrices-Test.xlsx
├── K_Nearest_Neighbors.ipynb
├── Weighted_K_Nearest_Neighbors.ipynb
├── diabetes.csv
└── home_data-train.txt
├── LICENSE
├── Linear Regression
├── 50_Startups.csv
├── Multivariate_Linear_Regression.ipynb
├── Univariate_Linear_Regression.ipynb
└── house_prices.csv
├── Logistic Regression
├── Data.csv
└── logistic_regression.ipynb
├── Naive Bayes
├── Naive_Bayes.ipynb
└── diabetes.csv
├── Neural Network
└── Neural_Network.ipynb
├── Project
├── MINI_Project.ipynb
└── adult.data
├── README.md
├── Random Forest Algorithm
└── Random_Forest_Classification.ipynb
└── Support Vector Machine
├── Kernal_SVM.ipynb
├── Linear_Support_Vector_Machine.ipynb
├── Multiclass_Support_Vector_Machine.ipynb
├── diabetes.csv
└── pulsar_data_train.csv
/Candidate Elimination Algorithm/CEA_Car.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "CEA_Car.ipynb",
7 | "provenance": [],
8 | "collapsed_sections": [],
9 | "toc_visible": true
10 | },
11 | "kernelspec": {
12 | "name": "python3",
13 | "display_name": "Python 3"
14 | },
15 | "language_info": {
16 | "name": "python"
17 | }
18 | },
19 | "cells": [
20 | {
21 | "cell_type": "code",
22 | "metadata": {
23 | "colab": {
24 | "base_uri": "https://localhost:8080/"
25 | },
26 | "id": "BH6KaGyIyEHB",
27 | "outputId": "952231e2-6e3b-4015-e203-aec80b8c464f"
28 | },
29 | "source": [
30 | "import csv\n",
31 | "with open('/content/EconomyCar.csv') as csvFile:\n",
32 | " examples = [tuple(line) for line in csv.reader(csvFile)]\n",
33 | "print(examples)\n"
34 | ],
35 | "execution_count": null,
36 | "outputs": [
37 | {
38 | "output_type": "stream",
39 | "name": "stdout",
40 | "text": [
41 | "[('Japan ', 'Honda', 'Blue ', '1980', 'Economy', 'Yes'), ('Japan ', 'Toyota', 'Green', '1970', 'Sports', 'No'), ('Japan ', 'Toyota', 'Blue ', '1990', 'Economy', 'Yes'), ('USA', 'Chrysler', 'Red', '1980', 'Economy', 'No'), ('Japan ', 'Honda', 'White', '1980', 'Economy', 'Yes')]\n"
42 | ]
43 | }
44 | ]
45 | },
46 | {
47 | "cell_type": "code",
48 | "metadata": {
49 | "colab": {
50 | "base_uri": "https://localhost:8080/"
51 | },
52 | "id": "Erdw2cIuylT3",
53 | "outputId": "fcd4dd6f-1e66-4f4e-af02-b6638d33e322"
54 | },
55 | "source": [
56 | "def get_domains(examples):\n",
57 | " d = [set() for i in examples[0]] \n",
58 | " for x in examples:\n",
59 | " for i, xi in enumerate(x):\n",
60 | " d[i].add(xi)\n",
61 | " return [list(sorted(x)) for x in d]\n",
62 | "get_domains(examples)\n"
63 | ],
64 | "execution_count": null,
65 | "outputs": [
66 | {
67 | "output_type": "execute_result",
68 | "data": {
69 | "text/plain": [
70 | "[['Japan ', 'USA'],\n",
71 | " ['Chrysler', 'Honda', 'Toyota'],\n",
72 | " ['Blue ', 'Green', 'Red', 'White'],\n",
73 | " ['1970', '1980', '1990'],\n",
74 | " ['Economy', 'Sports'],\n",
75 | " ['No', 'Yes']]"
76 | ]
77 | },
78 | "metadata": {},
79 | "execution_count": 5
80 | }
81 | ]
82 | },
83 | {
84 | "cell_type": "code",
85 | "metadata": {
86 | "colab": {
87 | "base_uri": "https://localhost:8080/"
88 | },
89 | "id": "kK-632QXyvOy",
90 | "outputId": "3ef770d5-07f8-4a88-e88a-fbc440fa7b1a"
91 | },
92 | "source": [
93 | "def g_0(n):\n",
94 | " return ('?',)*n\n",
95 | "\n",
96 | "def s_0(n):\n",
97 | " return ('Phi',)*n\n",
98 | "def more_general(h1, h2):\n",
99 | " more_general_parts = []\n",
100 | " for x, y in zip(h1, h2):\n",
101 | " mg = x == '?' or (x != 'Phi' and (x == y or y == 'Phi'))\n",
102 | " more_general_parts.append(mg)\n",
103 | " return all(more_general_parts) \n",
104 | "\n",
105 | "def consistent(hypothesis,example):\n",
106 | " return more_general(hypothesis, example)\n",
107 | "\n",
108 | "def min_generalizations(h, x):\n",
109 | " h_new = list(h)\n",
110 | " for i in range(len(h)):\n",
111 | " if not consistent(h[i:i+1],x[i:i+1]):\n",
112 | " if h[i] != 'Phi':\n",
113 | " h_new[i] = '?'\n",
114 | " else:\n",
115 | " h_new[i] = x[i]\n",
116 | " return [tuple(h_new)]\n",
117 | "\n",
118 | "def generalize_S(x, G, S):\n",
119 | " S_prev = list(S)\n",
120 | " for s in S_prev:\n",
121 | " if s not in S:\n",
122 | " continue\n",
123 | " if not consistent(s,x):\n",
124 | " S.remove(s)\n",
125 | " Splus = min_generalizations(s, x)\n",
126 | " S.update([h for h in Splus if any([more_general(g,h) \n",
127 | " for g in G])])\n",
128 | "\n",
129 | " S.difference_update([h for h in S if \n",
130 | " any([more_general(h, h1) \n",
131 | " for h1 in S if h != h1])])\n",
132 | " return S\n",
133 | "\n",
134 | "def min_specializations(h, domains, x):\n",
135 | " results = []\n",
136 | " for i in range(len(h)):\n",
137 | " if h[i] == '?':\n",
138 | " for val in domains[i]:\n",
139 | " if x[i] != val:\n",
140 | " h_new = h[:i] + (val,) + h[i+1:]\n",
141 | " results.append(h_new)\n",
142 | " elif h[i] != 'Phi':\n",
143 | " h_new = h[:i] + ('Phi',) + h[i+1:]\n",
144 | " results.append(h_new)\n",
145 | " return results\n",
146 | "\n",
147 | "def specialize_G(x, domains, G, S):\n",
148 | " G_prev = list(G)\n",
149 | " for g in G_prev:\n",
150 | " if g not in G:\n",
151 | " continue\n",
152 | " if consistent(g,x):\n",
153 | " G.remove(g)\n",
154 | " Gminus = min_specializations(g, domains, x)\n",
155 | " G.update([h for h in Gminus if any([more_general(h, s)\n",
156 | " for s in S])])\n",
157 | " G.difference_update([h for h in G if \n",
158 | " any([more_general(g1, h) \n",
159 | " for g1 in G if h != g1])])\n",
160 | " return G\n",
161 | "\n",
162 | "def candidate_elimination(examples):\n",
163 | " domains = get_domains(examples)[:-1] \n",
164 | " \n",
165 | " G = set([g_0(len(domains))])\n",
166 | " S = set([s_0(len(domains))])\n",
167 | " i=0\n",
168 | " print('All the hypotheses in General and Specific boundary are:\\n')\n",
169 | " print('\\n G[{0}]:'.format(i),G)\n",
170 | " print('\\n S[{0}]:'.format(i),S)\n",
171 | " for xcx in examples:\n",
172 | " i=i+1\n",
173 | " x, cx = xcx[:-1], xcx[-1] \n",
174 | " if cx=='Yes': \n",
175 | " G = {g for g in G if consistent(g,x)}\n",
176 | " S = generalize_S(x, G, S)\n",
177 | " else: \n",
178 | " S = {s for s in S if not consistent(s,x)}\n",
179 | " G = specialize_G(x, domains, G, S)\n",
180 | " print('\\n G[{0}]:'.format(i),G)\n",
181 | " print('\\n S[{0}]:'.format(i),S)\n",
182 | " return\n",
183 | "candidate_elimination(examples)\n"
184 | ],
185 | "execution_count": null,
186 | "outputs": [
187 | {
188 | "output_type": "stream",
189 | "name": "stdout",
190 | "text": [
191 | "All the hypotheses in General and Specific boundary are:\n",
192 | "\n",
193 | "\n",
194 | " G[0]: {('?', '?', '?', '?', '?')}\n",
195 | "\n",
196 | " S[0]: {('Phi', 'Phi', 'Phi', 'Phi', 'Phi')}\n",
197 | "\n",
198 | " G[1]: {('?', '?', '?', '?', '?')}\n",
199 | "\n",
200 | " S[1]: {('Japan ', 'Honda', 'Blue ', '1980', 'Economy')}\n",
201 | "\n",
202 | " G[2]: {('?', '?', 'Blue ', '?', '?'), ('?', '?', '?', '1980', '?'), ('?', 'Honda', '?', '?', '?'), ('?', '?', '?', '?', 'Economy')}\n",
203 | "\n",
204 | " S[2]: {('Japan ', 'Honda', 'Blue ', '1980', 'Economy')}\n",
205 | "\n",
206 | " G[3]: {('?', '?', 'Blue ', '?', '?'), ('?', '?', '?', '?', 'Economy')}\n",
207 | "\n",
208 | " S[3]: {('Japan ', '?', 'Blue ', '?', 'Economy')}\n",
209 | "\n",
210 | " G[4]: {('Japan ', '?', '?', '?', 'Economy'), ('?', '?', 'Blue ', '?', '?')}\n",
211 | "\n",
212 | " S[4]: {('Japan ', '?', 'Blue ', '?', 'Economy')}\n",
213 | "\n",
214 | " G[5]: {('Japan ', '?', '?', '?', 'Economy')}\n",
215 | "\n",
216 | " S[5]: {('Japan ', '?', '?', '?', 'Economy')}\n"
217 | ]
218 | }
219 | ]
220 | }
221 | ]
222 | }
--------------------------------------------------------------------------------
/Candidate Elimination Algorithm/CEA_Sport.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "CEA_Sport.ipynb",
7 | "provenance": [],
8 | "collapsed_sections": []
9 | },
10 | "kernelspec": {
11 | "name": "python3",
12 | "display_name": "Python 3"
13 | },
14 | "language_info": {
15 | "name": "python"
16 | }
17 | },
18 | "cells": [
19 | {
20 | "cell_type": "code",
21 | "metadata": {
22 | "colab": {
23 | "base_uri": "https://localhost:8080/"
24 | },
25 | "id": "glEa_vjJ1Geh",
26 | "outputId": "6d9f39e2-0229-4cb6-ca80-c092d4ae0ee0"
27 | },
28 | "source": [
29 | "import csv\n",
30 | "with open('/content/EnjoySport.csv') as csvFile:\n",
31 | " examples = [tuple(line) for line in csv.reader(csvFile)]\n",
32 | "print(examples)"
33 | ],
34 | "execution_count": null,
35 | "outputs": [
36 | {
37 | "output_type": "stream",
38 | "name": "stdout",
39 | "text": [
40 | "[('Sunny', 'Warm', 'Normal', 'Strong', 'Warm', 'Same', 'Yes'), ('Sunny', 'Warm', 'High', 'Strong', 'Warm', 'Same', 'Yes'), ('Rainy', 'Cold', 'High', 'Strong', 'Warm', 'Change', 'No'), ('Sunny', 'Warm', 'High', 'Strong', 'Cool', 'Change', 'Yes')]\n"
41 | ]
42 | }
43 | ]
44 | },
45 | {
46 | "cell_type": "code",
47 | "metadata": {
48 | "colab": {
49 | "base_uri": "https://localhost:8080/"
50 | },
51 | "id": "xSQB9ckD1VUJ",
52 | "outputId": "095e83e1-0687-442e-f20c-ef9055b4b293"
53 | },
54 | "source": [
55 | "def get_domains(examples):\n",
56 | " d = [set() for i in examples[0]] \n",
57 | " for x in examples:\n",
58 | " for i, xi in enumerate(x):\n",
59 | " d[i].add(xi)\n",
60 | " return [list(sorted(x)) for x in d]\n",
61 | "get_domains(examples)"
62 | ],
63 | "execution_count": null,
64 | "outputs": [
65 | {
66 | "output_type": "execute_result",
67 | "data": {
68 | "text/plain": [
69 | "[['Rainy', 'Sunny'],\n",
70 | " ['Cold', 'Warm'],\n",
71 | " ['High', 'Normal'],\n",
72 | " ['Strong'],\n",
73 | " ['Cool', 'Warm'],\n",
74 | " ['Change', 'Same'],\n",
75 | " ['No', 'Yes']]"
76 | ]
77 | },
78 | "metadata": {},
79 | "execution_count": 3
80 | }
81 | ]
82 | },
83 | {
84 | "cell_type": "code",
85 | "metadata": {
86 | "colab": {
87 | "base_uri": "https://localhost:8080/"
88 | },
89 | "id": "8_lGGOj01XlQ",
90 | "outputId": "30935b0f-fb65-47c3-ebd9-748174ee7c03"
91 | },
92 | "source": [
93 | "def g_0(n):\n",
94 | " return ('?',)*n\n",
95 | "\n",
96 | "def s_0(n):\n",
97 | " return ('Phi',)*n\n",
98 | "def more_general(h1, h2):\n",
99 | " more_general_parts = []\n",
100 | " for x, y in zip(h1, h2):\n",
101 | " mg = x == '?' or (x != 'Phi' and (x == y or y == 'Phi'))\n",
102 | " more_general_parts.append(mg)\n",
103 | " return all(more_general_parts) \n",
104 | "\n",
105 | "def consistent(hypothesis,example):\n",
106 | " return more_general(hypothesis, example)\n",
107 | "\n",
108 | "def min_generalizations(h, x):\n",
109 | " h_new = list(h)\n",
110 | " for i in range(len(h)):\n",
111 | " if not consistent(h[i:i+1],x[i:i+1]):\n",
112 | " if h[i] != 'Phi':\n",
113 | " h_new[i] = '?'\n",
114 | " else:\n",
115 | " h_new[i] = x[i]\n",
116 | " return [tuple(h_new)]\n",
117 | "\n",
118 | "def generalize_S(x, G, S):\n",
119 | " S_prev = list(S)\n",
120 | " for s in S_prev:\n",
121 | " if s not in S:\n",
122 | " continue\n",
123 | " if not consistent(s,x):\n",
124 | " S.remove(s)\n",
125 | " Splus = min_generalizations(s, x)\n",
126 | " S.update([h for h in Splus if any([more_general(g,h) \n",
127 | " for g in G])])\n",
128 | "\n",
129 | " S.difference_update([h for h in S if \n",
130 | " any([more_general(h, h1) \n",
131 | " for h1 in S if h != h1])])\n",
132 | " return S\n",
133 | "\n",
134 | "def min_specializations(h, domains, x):\n",
135 | " results = []\n",
136 | " for i in range(len(h)):\n",
137 | " if h[i] == '?':\n",
138 | " for val in domains[i]:\n",
139 | " if x[i] != val:\n",
140 | " h_new = h[:i] + (val,) + h[i+1:]\n",
141 | " results.append(h_new)\n",
142 | " elif h[i] != 'Phi':\n",
143 | " h_new = h[:i] + ('Phi',) + h[i+1:]\n",
144 | " results.append(h_new)\n",
145 | " return results\n",
146 | "\n",
147 | "def specialize_G(x, domains, G, S):\n",
148 | " G_prev = list(G)\n",
149 | " for g in G_prev:\n",
150 | " if g not in G:\n",
151 | " continue\n",
152 | " if consistent(g,x):\n",
153 | " G.remove(g)\n",
154 | " Gminus = min_specializations(g, domains, x)\n",
155 | " G.update([h for h in Gminus if any([more_general(h, s)\n",
156 | " for s in S])])\n",
157 | " G.difference_update([h for h in G if \n",
158 | " any([more_general(g1, h) \n",
159 | " for g1 in G if h != g1])])\n",
160 | " return G\n",
161 | "\n",
162 | "def candidate_elimination(examples):\n",
163 | " domains = get_domains(examples)[:-1] \n",
164 | " \n",
165 | " G = set([g_0(len(domains))])\n",
166 | " S = set([s_0(len(domains))])\n",
167 | " i=0\n",
168 | " print('All the hypotheses in General and Specific boundary are:\\n')\n",
169 | " print('\\n G[{0}]:'.format(i),G)\n",
170 | " print('\\n S[{0}]:'.format(i),S)\n",
171 | " for xcx in examples:\n",
172 | " i=i+1\n",
173 | " x, cx = xcx[:-1], xcx[-1] \n",
174 | " if cx=='Yes': \n",
175 | " G = {g for g in G if consistent(g,x)}\n",
176 | " S = generalize_S(x, G, S)\n",
177 | " else: \n",
178 | " S = {s for s in S if not consistent(s,x)}\n",
179 | " G = specialize_G(x, domains, G, S)\n",
180 | " print('\\n G[{0}]:'.format(i),G)\n",
181 | " print('\\n S[{0}]:'.format(i),S)\n",
182 | " return\n",
183 | "candidate_elimination(examples)\n"
184 | ],
185 | "execution_count": null,
186 | "outputs": [
187 | {
188 | "output_type": "stream",
189 | "name": "stdout",
190 | "text": [
191 | "All the hypotheses in General and Specific boundary are:\n",
192 | "\n",
193 | "\n",
194 | " G[0]: {('?', '?', '?', '?', '?', '?')}\n",
195 | "\n",
196 | " S[0]: {('Phi', 'Phi', 'Phi', 'Phi', 'Phi', 'Phi')}\n",
197 | "\n",
198 | " G[1]: {('?', '?', '?', '?', '?', '?')}\n",
199 | "\n",
200 | " S[1]: {('Sunny', 'Warm', 'Normal', 'Strong', 'Warm', 'Same')}\n",
201 | "\n",
202 | " G[2]: {('?', '?', '?', '?', '?', '?')}\n",
203 | "\n",
204 | " S[2]: {('Sunny', 'Warm', '?', 'Strong', 'Warm', 'Same')}\n",
205 | "\n",
206 | " G[3]: {('?', 'Warm', '?', '?', '?', '?'), ('?', '?', '?', '?', '?', 'Same'), ('Sunny', '?', '?', '?', '?', '?')}\n",
207 | "\n",
208 | " S[3]: {('Sunny', 'Warm', '?', 'Strong', 'Warm', 'Same')}\n",
209 | "\n",
210 | " G[4]: {('?', 'Warm', '?', '?', '?', '?'), ('Sunny', '?', '?', '?', '?', '?')}\n",
211 | "\n",
212 | " S[4]: {('Sunny', 'Warm', '?', 'Strong', '?', '?')}\n"
213 | ]
214 | }
215 | ]
216 | }
217 | ]
218 | }
--------------------------------------------------------------------------------
/Candidate Elimination Algorithm/EconomyCar.csv:
--------------------------------------------------------------------------------
1 | Japan ,Honda,Blue ,1980,Economy,Yes
2 | Japan ,Toyota,Green,1970,Sports,No
3 | Japan ,Toyota,Blue ,1990,Economy,Yes
4 | USA,Chrysler,Red,1980,Economy,No
5 | Japan ,Honda,White,1980,Economy,Yes
6 |
--------------------------------------------------------------------------------
/Candidate Elimination Algorithm/EnjoySport.csv:
--------------------------------------------------------------------------------
1 | Sunny,Warm,Normal,Strong,Warm,Same,Yes
2 | Sunny,Warm,High,Strong,Warm,Same,Yes
3 | Rainy,Cold,High,Strong,Warm,Change,No
4 | Sunny,Warm,High,Strong,Cool,Change,Yes
5 |
--------------------------------------------------------------------------------
/Find-S Algorithm/EconomyCar.csv:
--------------------------------------------------------------------------------
1 | Japan ,Honda,Blue ,1980,Economy,Yes
2 | Japan ,Toyota,Green,1970,Sports,No
3 | Japan ,Toyota,Blue ,1990,Economy,Yes
4 | USA,Chrysler,Red,1980,Economy,No
5 | Japan ,Honda,White,1980,Economy,Yes
6 |
--------------------------------------------------------------------------------
/Find-S Algorithm/EconomyCar.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "EconomyCar.ipynb",
7 | "provenance": [],
8 | "collapsed_sections": []
9 | },
10 | "kernelspec": {
11 | "name": "python3",
12 | "display_name": "Python 3"
13 | },
14 | "language_info": {
15 | "name": "python"
16 | }
17 | },
18 | "cells": [
19 | {
20 | "cell_type": "code",
21 | "metadata": {
22 | "colab": {
23 | "base_uri": "https://localhost:8080/"
24 | },
25 | "id": "fbCA5mySFUkp",
26 | "outputId": "af817db8-b961-468d-e216-2abd0364283f"
27 | },
28 | "source": [
29 | "import random\n",
30 | "import csv\n",
31 | "attr = [['Japan','USA'],\n",
32 | " ['Honda','Toyota','Chrysler'],\n",
33 | " ['Blue','Green','Red','White'],\n",
34 | " ['1980','1970','1990'],\n",
35 | " ['Economy','Sports']]\n",
36 | "\n",
37 | "\n",
38 | "num_attr = len(attr)\n",
39 | "\n",
40 | "\n",
41 | "print (\" \\n The most general hypothesis : ['?','?','?','?','?']\\n\")\n",
42 | "print (\"\\n The most specific hypothesis : ['Phi','Phi','Phi','Phi','Phi']\\n\")\n"
43 | ],
44 | "execution_count": null,
45 | "outputs": [
46 | {
47 | "output_type": "stream",
48 | "name": "stdout",
49 | "text": [
50 | " \n",
51 | " The most general hypothesis : ['?','?','?','?','?']\n",
52 | "\n",
53 | "\n",
54 | " The most specific hypothesis : ['Phi','Phi','Phi','Phi','Phi']\n",
55 | "\n"
56 | ]
57 | }
58 | ]
59 | },
60 | {
61 | "cell_type": "code",
62 | "metadata": {
63 | "colab": {
64 | "base_uri": "https://localhost:8080/"
65 | },
66 | "id": "Mw-g-GQYHUx2",
67 | "outputId": "de619ddb-9264-4d6b-da07-bf5e4f6e2935"
68 | },
69 | "source": [
70 | "a = []\n",
71 | "print(\"\\n The Given Training Data Set \\n\")\n",
72 | "\n",
73 | "with open('/content/EconomyCar.csv', 'r') as csvFile:\n",
74 | " reader = csv.reader(csvFile)\n",
75 | " for row in reader:\n",
76 | " a.append (row)\n",
77 | " print(row)\n"
78 | ],
79 | "execution_count": null,
80 | "outputs": [
81 | {
82 | "output_type": "stream",
83 | "name": "stdout",
84 | "text": [
85 | "\n",
86 | " The Given Training Data Set \n",
87 | "\n",
88 | "['Japan ', 'Honda', 'Blue ', '1980', 'Economy', 'Yes']\n",
89 | "['Japan ', 'Toyota', 'Green', '1970', 'Sports', 'No']\n",
90 | "['Japan ', 'Toyota', 'Blue ', '1990', 'Economy', 'Yes']\n",
91 | "['USA', 'Chrysler', 'Red', '1980', 'Economy', 'No']\n",
92 | "['Japan ', 'Honda', 'White', '1980', 'Economy', 'Yes']\n"
93 | ]
94 | }
95 | ]
96 | },
97 | {
98 | "cell_type": "code",
99 | "metadata": {
100 | "colab": {
101 | "base_uri": "https://localhost:8080/"
102 | },
103 | "id": "wyn0MDEmHsav",
104 | "outputId": "f7fc6fd6-07e1-4063-d030-de783f570389"
105 | },
106 | "source": [
107 | "print(\"The initial value of hypothesis: \")\n",
108 | "hypothesis = ['Phi'] * num_attr\n",
109 | "print(hypothesis)\n"
110 | ],
111 | "execution_count": null,
112 | "outputs": [
113 | {
114 | "output_type": "stream",
115 | "name": "stdout",
116 | "text": [
117 | "The initial value of hypothesis: \n",
118 | "['Phi', 'Phi', 'Phi', 'Phi', 'Phi']\n"
119 | ]
120 | }
121 | ]
122 | },
123 | {
124 | "cell_type": "code",
125 | "metadata": {
126 | "colab": {
127 | "base_uri": "https://localhost:8080/"
128 | },
129 | "id": "iISDH1dgH9DI",
130 | "outputId": "8b8375f4-de96-44c3-e471-053e113890ae"
131 | },
132 | "source": [
133 | "for j in range(0,num_attr):\n",
134 | " hypothesis[j] = a[0][j];\n",
135 | "print(\"\\n Find S: Finding a Maximally Specific Hypothesis\\n\");\n",
136 | "\n",
137 | "for i in range(0,len(a)):\n",
138 | " if a[i][num_attr]=='Yes':\n",
139 | " for j in range(0,num_attr):\n",
140 | " if a[i][j]!=hypothesis[j]:\n",
141 | " hypothesis[j]='?'\n",
142 | " else :\n",
143 | " hypothesis[j]= a[i][j] \n",
144 | " print(\" For Training Example No :{0} the hypothesis is \".format(i),hypothesis)\n",
145 | " \n",
146 | "print(\"\\n The Maximally Specific Hypothesis for a given Training Examples :\\n\")\n",
147 | "print(hypothesis)\n"
148 | ],
149 | "execution_count": null,
150 | "outputs": [
151 | {
152 | "output_type": "stream",
153 | "name": "stdout",
154 | "text": [
155 | "\n",
156 | " Find S: Finding a Maximally Specific Hypothesis\n",
157 | "\n",
158 | " For Training Example No :0 the hypothesis is ['Japan ', 'Honda', 'Blue ', '1980', 'Economy']\n",
159 | " For Training Example No :1 the hypothesis is ['Japan ', 'Honda', 'Blue ', '1980', 'Economy']\n",
160 | " For Training Example No :2 the hypothesis is ['Japan ', '?', 'Blue ', '?', 'Economy']\n",
161 | " For Training Example No :3 the hypothesis is ['Japan ', '?', 'Blue ', '?', 'Economy']\n",
162 | " For Training Example No :4 the hypothesis is ['Japan ', '?', '?', '?', 'Economy']\n",
163 | "\n",
164 | " The Maximally Specific Hypothesis for a given Training Examples :\n",
165 | "\n",
166 | "['Japan ', '?', '?', '?', 'Economy']\n"
167 | ]
168 | }
169 | ]
170 | }
171 | ]
172 | }
--------------------------------------------------------------------------------
/Find-S Algorithm/EnjoySport.csv:
--------------------------------------------------------------------------------
1 | Sunny,Warm,Normal,Strong,Warm,Same,Yes
2 | Sunny,Warm,High,Strong,Warm,Same,Yes
3 | Rainy,Cold,High,Strong,Warm,Change,No
4 | Sunny,Warm,High,Strong,Cool,Change,Yes
5 |
--------------------------------------------------------------------------------
/Find-S Algorithm/EnjoySport.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "EnjoySport.ipynb",
7 | "provenance": [],
8 | "collapsed_sections": []
9 | },
10 | "kernelspec": {
11 | "name": "python3",
12 | "display_name": "Python 3"
13 | },
14 | "language_info": {
15 | "name": "python"
16 | }
17 | },
18 | "cells": [
19 | {
20 | "cell_type": "code",
21 | "metadata": {
22 | "colab": {
23 | "base_uri": "https://localhost:8080/"
24 | },
25 | "id": "fbCA5mySFUkp",
26 | "outputId": "a0fb1450-2ea4-43ec-8988-8ff5b82ed4a9"
27 | },
28 | "source": [
29 | "import random\n",
30 | "import csv\n",
31 | "attr = [['Sunny','Rainy'],\n",
32 | " ['Warm','Cold'],\n",
33 | " ['Normal','High'],\n",
34 | " ['Strong','Weak'],\n",
35 | " ['Warm','Cool'],\n",
36 | " ['Same','Change']]\n",
37 | "\n",
38 | "\n",
39 | "num_attr = len(attr)\n",
40 | "\n",
41 | "\n",
42 | "print (\" \\n The most general hypothesis : ['?','?','?','?','?','?']\\n\")\n",
43 | "print (\"\\n The most specific hypothesis : ['Phi','Phi','Phi','Phi','Phi','Phi']\\n\")\n"
44 | ],
45 | "execution_count": null,
46 | "outputs": [
47 | {
48 | "output_type": "stream",
49 | "name": "stdout",
50 | "text": [
51 | " \n",
52 | " The most general hypothesis : ['?','?','?','?','?','?']\n",
53 | "\n",
54 | "\n",
55 | " The most specific hypothesis : ['Phi','Phi','Phi','Phi','Phi','Phi']\n",
56 | "\n"
57 | ]
58 | }
59 | ]
60 | },
61 | {
62 | "cell_type": "code",
63 | "metadata": {
64 | "colab": {
65 | "base_uri": "https://localhost:8080/"
66 | },
67 | "id": "Mw-g-GQYHUx2",
68 | "outputId": "f36ce1ab-333f-424f-ba34-e40197265349"
69 | },
70 | "source": [
71 | "a = []\n",
72 | "print(\"\\n The Given Training Data Set \\n\")\n",
73 | "\n",
74 | "with open('/content/EnjoySport.csv', 'r') as csvFile:\n",
75 | " reader = csv.reader(csvFile)\n",
76 | " for row in reader:\n",
77 | " a.append (row)\n",
78 | " print(row)\n"
79 | ],
80 | "execution_count": null,
81 | "outputs": [
82 | {
83 | "output_type": "stream",
84 | "name": "stdout",
85 | "text": [
86 | "\n",
87 | " The Given Training Data Set \n",
88 | "\n",
89 | "['Sunny', 'Warm', 'Normal', 'Strong', 'Warm', 'Same', 'Yes']\n",
90 | "['Sunny', 'Warm', 'High', 'Strong', 'Warm', 'Same', 'Yes']\n",
91 | "['Rainy', 'Cold', 'High', 'Strong', 'Warm', 'Change', 'No']\n",
92 | "['Sunny', 'Warm', 'High', 'Strong', 'Cool', 'Change', 'Yes']\n"
93 | ]
94 | }
95 | ]
96 | },
97 | {
98 | "cell_type": "code",
99 | "metadata": {
100 | "colab": {
101 | "base_uri": "https://localhost:8080/"
102 | },
103 | "id": "wyn0MDEmHsav",
104 | "outputId": "ab5cd448-b4e8-431d-ece1-638c3583a032"
105 | },
106 | "source": [
107 | "print(\"The initial value of hypothesis: \")\n",
108 | "hypothesis = ['Phi'] * num_attr\n",
109 | "print(hypothesis)\n"
110 | ],
111 | "execution_count": null,
112 | "outputs": [
113 | {
114 | "output_type": "stream",
115 | "name": "stdout",
116 | "text": [
117 | "The initial value of hypothesis: \n",
118 | "['Phi', 'Phi', 'Phi', 'Phi', 'Phi', 'Phi']\n"
119 | ]
120 | }
121 | ]
122 | },
123 | {
124 | "cell_type": "code",
125 | "metadata": {
126 | "colab": {
127 | "base_uri": "https://localhost:8080/"
128 | },
129 | "id": "iISDH1dgH9DI",
130 | "outputId": "24faef5b-5310-4671-9e51-4fdf9a38c725"
131 | },
132 | "source": [
133 | "for j in range(0,num_attr):\n",
134 | " hypothesis[j] = a[0][j];\n",
135 | "print(\"\\n Find S: Finding a Maximally Specific Hypothesis\\n\");\n",
136 | "\n",
137 | "for i in range(0,len(a)):\n",
138 | " if a[i][num_attr]=='Yes':\n",
139 | " for j in range(0,num_attr):\n",
140 | " if a[i][j]!=hypothesis[j]:\n",
141 | " hypothesis[j]='?'\n",
142 | " else :\n",
143 | " hypothesis[j]= a[i][j] \n",
144 | " print(\" For Training Example No :{0} the hypothesis is \".format(i),hypothesis)\n",
145 | " \n",
146 | "print(\"\\n The Maximally Specific Hypothesis for a given Training Examples :\\n\")\n",
147 | "print(hypothesis)\n"
148 | ],
149 | "execution_count": null,
150 | "outputs": [
151 | {
152 | "output_type": "stream",
153 | "name": "stdout",
154 | "text": [
155 | "\n",
156 | " Find S: Finding a Maximally Specific Hypothesis\n",
157 | "\n",
158 | " For Training Example No :0 the hypothesis is ['Sunny', 'Warm', 'Normal', 'Strong', 'Warm', 'Same']\n",
159 | " For Training Example No :1 the hypothesis is ['Sunny', 'Warm', '?', 'Strong', 'Warm', 'Same']\n",
160 | " For Training Example No :2 the hypothesis is ['Sunny', 'Warm', '?', 'Strong', 'Warm', 'Same']\n",
161 | " For Training Example No :3 the hypothesis is ['Sunny', 'Warm', '?', 'Strong', '?', '?']\n",
162 | "\n",
163 | " The Maximally Specific Hypothesis for a given Training Examples :\n",
164 | "\n",
165 | "['Sunny', 'Warm', '?', 'Strong', '?', '?']\n"
166 | ]
167 | }
168 | ]
169 | }
170 | ]
171 | }
--------------------------------------------------------------------------------
/ID3 Decision Tree algorithm/ID3_Decision_Tree.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "ID3_Decision_Tree.ipynb",
7 | "provenance": []
8 | },
9 | "kernelspec": {
10 | "name": "python3",
11 | "display_name": "Python 3"
12 | },
13 | "language_info": {
14 | "name": "python"
15 | }
16 | },
17 | "cells": [
18 | {
19 | "cell_type": "code",
20 | "metadata": {
21 | "colab": {
22 | "base_uri": "https://localhost:8080/"
23 | },
24 | "id": "dH10kwBZKzYP",
25 | "outputId": "404477e7-0c10-48e2-f02f-5d2f01a08b58"
26 | },
27 | "source": [
28 | "import pandas as pd\n",
29 | "df_tennis=pd.read_csv('/content/PlayTennis.csv')\n",
30 | "print(df_tennis)"
31 | ],
32 | "execution_count": null,
33 | "outputs": [
34 | {
35 | "output_type": "stream",
36 | "name": "stdout",
37 | "text": [
38 | " Outlook Temperature Humidity Wind Play_Tennis\n",
39 | "0 Sunny Hot High Weak No\n",
40 | "1 Sunny Hot High Strong No\n",
41 | "2 Overcast Hot High Weak Yes\n",
42 | "3 Rain Mild High Weak Yes\n",
43 | "4 Rain Cool Normal Weak Yes\n",
44 | "5 Rain Cool Normal Strong No\n",
45 | "6 Overcast Cool Normal Strong Yes\n",
46 | "7 Sunny Mild High Weak No\n",
47 | "8 Sunny Cool Normal Weak Yes\n",
48 | "9 Rain Mild Normal Weak Yes\n",
49 | "10 Sunny Mild Normal Strong Yes\n",
50 | "11 Overcast Mild High Strong Yes\n",
51 | "12 Overcast Hot Normal Weak Yes\n",
52 | "13 Rain Mild High Strong No\n"
53 | ]
54 | }
55 | ]
56 | },
57 | {
58 | "cell_type": "code",
59 | "metadata": {
60 | "colab": {
61 | "base_uri": "https://localhost:8080/"
62 | },
63 | "id": "9C5Uiyj7Ozqk",
64 | "outputId": "78d55ac4-7038-4491-972e-f13659445b0b"
65 | },
66 | "source": [
67 | "def entropy(probs): \n",
68 | " import math\n",
69 | " return sum( [-prob*math.log(prob, 2) for prob in probs])\n",
70 | "\n",
71 | "def entropy_of_list(a_list): \n",
72 | " from collections import Counter\n",
73 | " cnt = Counter(x for x in a_list)\n",
74 | " \n",
75 | " num_instances = len(a_list)*1.0\n",
76 | " print(\"\\n Number of Instances of the Current Sub Class is {0}:\".format(num_instances ))\n",
77 | " probs = [x / num_instances for x in cnt.values()] \n",
78 | " print(\"\\n Classes:\",min(cnt),max(cnt))\n",
79 | " print(\" \\n Probabilities of Class {0} is {1}:\".format(min(cnt),min(probs)))\n",
80 | " print(\" \\n Probabilities of Class {0} is {1}:\".format(max(cnt),max(probs)))\n",
81 | " return entropy(probs) \n",
82 | " \n",
83 | "print(\"\\n INPUT DATA SET FOR ENTROPY CALCULATION:\\n\", df_tennis['Play_Tennis'])\n",
84 | "\n",
85 | "total_entropy = entropy_of_list(df_tennis['Play_Tennis'])\n",
86 | " \n",
87 | "print(\"\\n Total Entropy of PlayTennis Data Set:\",total_entropy)"
88 | ],
89 | "execution_count": null,
90 | "outputs": [
91 | {
92 | "output_type": "stream",
93 | "name": "stdout",
94 | "text": [
95 | "\n",
96 | " INPUT DATA SET FOR ENTROPY CALCULATION:\n",
97 | " 0 No\n",
98 | "1 No\n",
99 | "2 Yes\n",
100 | "3 Yes\n",
101 | "4 Yes\n",
102 | "5 No\n",
103 | "6 Yes\n",
104 | "7 No\n",
105 | "8 Yes\n",
106 | "9 Yes\n",
107 | "10 Yes\n",
108 | "11 Yes\n",
109 | "12 Yes\n",
110 | "13 No\n",
111 | "Name: Play_Tennis, dtype: object\n",
112 | "\n",
113 | " Number of Instances of the Current Sub Class is 14.0:\n",
114 | "\n",
115 | " Classes: No Yes\n",
116 | " \n",
117 | " Probabilities of Class No is 0.35714285714285715:\n",
118 | " \n",
119 | " Probabilities of Class Yes is 0.6428571428571429:\n",
120 | "\n",
121 | " Total Entropy of PlayTennis Data Set: 0.9402859586706309\n"
122 | ]
123 | }
124 | ]
125 | },
126 | {
127 | "cell_type": "code",
128 | "metadata": {
129 | "colab": {
130 | "base_uri": "https://localhost:8080/"
131 | },
132 | "id": "7xkL85c4P8ni",
133 | "outputId": "59723c2e-e71d-4374-a99c-f28164682bd8"
134 | },
135 | "source": [
136 | "def information_gain(df, split_attribute_name, target_attribute_name, trace=0):\n",
137 | " print(\"Information Gain Calculation of \",split_attribute_name)\n",
138 | " '''\n",
139 | " Takes a DataFrame of attributes, and quantifies the entropy of a target\n",
140 | " attribute after performing a split along the values of another attribute.\n",
141 | " '''\n",
142 | " df_split = df.groupby(split_attribute_name)\n",
143 | " \n",
144 | " nobs = len(df.index) * 1.0\n",
145 | " \n",
146 | " df_agg_ent = df_split.agg({target_attribute_name : [entropy_of_list, lambda x: len(x)/nobs]})[target_attribute_name]\n",
147 | " \n",
148 | " df_agg_ent.columns = ['Entropy', 'PropObservations']\n",
149 | " \n",
150 | " new_entropy = sum( df_agg_ent['Entropy'] * df_agg_ent['PropObservations'] )\n",
151 | " old_entropy = entropy_of_list(df[target_attribute_name])\n",
152 | " return old_entropy - new_entropy\n",
153 | "\n",
154 | "print('Info-gain for Outlook is :'+str( information_gain(df_tennis, 'Outlook', 'Play_Tennis')),\"\\n\")\n",
155 | "print('\\n Info-gain for Humidity is: ' + str( information_gain(df_tennis, 'Humidity', 'Play_Tennis')),\"\\n\")\n",
156 | "print('\\n Info-gain for Wind is:' + str( information_gain(df_tennis, 'Wind', 'Play_Tennis')),\"\\n\")\n",
157 | "print('\\n Info-gain for Temperature is:' + str( information_gain(df_tennis,'Temperature','Play_Tennis')),\"\\n\")"
158 | ],
159 | "execution_count": null,
160 | "outputs": [
161 | {
162 | "output_type": "stream",
163 | "name": "stdout",
164 | "text": [
165 | "Information Gain Calculation of Outlook\n",
166 | "\n",
167 | " Number of Instances of the Current Sub Class is 4.0:\n",
168 | "\n",
169 | " Classes: Yes Yes\n",
170 | " \n",
171 | " Probabilities of Class Yes is 1.0:\n",
172 | " \n",
173 | " Probabilities of Class Yes is 1.0:\n",
174 | "\n",
175 | " Number of Instances of the Current Sub Class is 5.0:\n",
176 | "\n",
177 | " Classes: No Yes\n",
178 | " \n",
179 | " Probabilities of Class No is 0.4:\n",
180 | " \n",
181 | " Probabilities of Class Yes is 0.6:\n",
182 | "\n",
183 | " Number of Instances of the Current Sub Class is 5.0:\n",
184 | "\n",
185 | " Classes: No Yes\n",
186 | " \n",
187 | " Probabilities of Class No is 0.4:\n",
188 | " \n",
189 | " Probabilities of Class Yes is 0.6:\n",
190 | "\n",
191 | " Number of Instances of the Current Sub Class is 14.0:\n",
192 | "\n",
193 | " Classes: No Yes\n",
194 | " \n",
195 | " Probabilities of Class No is 0.35714285714285715:\n",
196 | " \n",
197 | " Probabilities of Class Yes is 0.6428571428571429:\n",
198 | "Info-gain for Outlook is :0.2467498197744391 \n",
199 | "\n",
200 | "Information Gain Calculation of Humidity\n",
201 | "\n",
202 | " Number of Instances of the Current Sub Class is 7.0:\n",
203 | "\n",
204 | " Classes: No Yes\n",
205 | " \n",
206 | " Probabilities of Class No is 0.42857142857142855:\n",
207 | " \n",
208 | " Probabilities of Class Yes is 0.5714285714285714:\n",
209 | "\n",
210 | " Number of Instances of the Current Sub Class is 7.0:\n",
211 | "\n",
212 | " Classes: No Yes\n",
213 | " \n",
214 | " Probabilities of Class No is 0.14285714285714285:\n",
215 | " \n",
216 | " Probabilities of Class Yes is 0.8571428571428571:\n",
217 | "\n",
218 | " Number of Instances of the Current Sub Class is 14.0:\n",
219 | "\n",
220 | " Classes: No Yes\n",
221 | " \n",
222 | " Probabilities of Class No is 0.35714285714285715:\n",
223 | " \n",
224 | " Probabilities of Class Yes is 0.6428571428571429:\n",
225 | "\n",
226 | " Info-gain for Humidity is: 0.15183550136234136 \n",
227 | "\n",
228 | "Information Gain Calculation of Wind\n",
229 | "\n",
230 | " Number of Instances of the Current Sub Class is 6.0:\n",
231 | "\n",
232 | " Classes: No Yes\n",
233 | " \n",
234 | " Probabilities of Class No is 0.5:\n",
235 | " \n",
236 | " Probabilities of Class Yes is 0.5:\n",
237 | "\n",
238 | " Number of Instances of the Current Sub Class is 8.0:\n",
239 | "\n",
240 | " Classes: No Yes\n",
241 | " \n",
242 | " Probabilities of Class No is 0.25:\n",
243 | " \n",
244 | " Probabilities of Class Yes is 0.75:\n",
245 | "\n",
246 | " Number of Instances of the Current Sub Class is 14.0:\n",
247 | "\n",
248 | " Classes: No Yes\n",
249 | " \n",
250 | " Probabilities of Class No is 0.35714285714285715:\n",
251 | " \n",
252 | " Probabilities of Class Yes is 0.6428571428571429:\n",
253 | "\n",
254 | " Info-gain for Wind is:0.04812703040826927 \n",
255 | "\n",
256 | "Information Gain Calculation of Temperature\n",
257 | "\n",
258 | " Number of Instances of the Current Sub Class is 4.0:\n",
259 | "\n",
260 | " Classes: No Yes\n",
261 | " \n",
262 | " Probabilities of Class No is 0.25:\n",
263 | " \n",
264 | " Probabilities of Class Yes is 0.75:\n",
265 | "\n",
266 | " Number of Instances of the Current Sub Class is 4.0:\n",
267 | "\n",
268 | " Classes: No Yes\n",
269 | " \n",
270 | " Probabilities of Class No is 0.5:\n",
271 | " \n",
272 | " Probabilities of Class Yes is 0.5:\n",
273 | "\n",
274 | " Number of Instances of the Current Sub Class is 6.0:\n",
275 | "\n",
276 | " Classes: No Yes\n",
277 | " \n",
278 | " Probabilities of Class No is 0.3333333333333333:\n",
279 | " \n",
280 | " Probabilities of Class Yes is 0.6666666666666666:\n",
281 | "\n",
282 | " Number of Instances of the Current Sub Class is 14.0:\n",
283 | "\n",
284 | " Classes: No Yes\n",
285 | " \n",
286 | " Probabilities of Class No is 0.35714285714285715:\n",
287 | " \n",
288 | " Probabilities of Class Yes is 0.6428571428571429:\n",
289 | "\n",
290 | " Info-gain for Temperature is:0.029222565658954647 \n",
291 | "\n"
292 | ]
293 | }
294 | ]
295 | },
296 | {
297 | "cell_type": "code",
298 | "metadata": {
299 | "id": "FOzkNKjuO5Ui"
300 | },
301 | "source": [
302 | "def id3(df, target_attribute_name, attribute_names, default_class=None):\n",
303 | " \n",
304 | " from collections import Counter\n",
305 | " cnt = Counter(x for x in df[target_attribute_name])\n",
306 | " \n",
307 | " if len(cnt) == 1:\n",
308 | " return next(iter(cnt)) \n",
309 | " elif df.empty or (not attribute_names):\n",
310 | " return default_class \n",
311 | " \n",
312 | " else:\n",
313 | " default_class = max(cnt.keys())\n",
314 | " gainz = [information_gain(df, attr, target_attribute_name) for attr in attribute_names] #\n",
315 | " index_of_max = gainz.index(max(gainz))\n",
316 | " best_attr = attribute_names[index_of_max]\n",
317 | " tree = {best_attr:{}} \n",
318 | " remaining_attribute_names = [i for i in attribute_names if i != best_attr]\n",
319 | " for attr_val, data_subset in df.groupby(best_attr):\n",
320 | " subtree = id3(data_subset,target_attribute_name,remaining_attribute_names,default_class)\n",
321 | " tree[best_attr][attr_val] = subtree\n",
322 | " return tree\n"
323 | ],
324 | "execution_count": null,
325 | "outputs": []
326 | },
327 | {
328 | "cell_type": "code",
329 | "metadata": {
330 | "colab": {
331 | "base_uri": "https://localhost:8080/"
332 | },
333 | "id": "IjNWfgmwTJQM",
334 | "outputId": "d2877010-36b8-42ab-bb29-4f50d18ba3dc"
335 | },
336 | "source": [
337 | "attribute_names = list(df_tennis.columns)\n",
338 | "print(\"List of Attributes:\", attribute_names) \n",
339 | "attribute_names.remove('Play_Tennis') \n",
340 | "print(\"Predicting Attributes:\", attribute_names)\n",
341 | "\n"
342 | ],
343 | "execution_count": null,
344 | "outputs": [
345 | {
346 | "output_type": "stream",
347 | "name": "stdout",
348 | "text": [
349 | "List of Attributes: ['Outlook', 'Temperature', 'Humidity', 'Wind', 'Play_Tennis']\n",
350 | "Predicting Attributes: ['Outlook', 'Temperature', 'Humidity', 'Wind']\n"
351 | ]
352 | }
353 | ]
354 | },
355 | {
356 | "cell_type": "code",
357 | "metadata": {
358 | "colab": {
359 | "base_uri": "https://localhost:8080/"
360 | },
361 | "id": "Vqz76WN1TlyA",
362 | "outputId": "6e2fea0d-66dc-4dc5-9826-4d81eddabff8"
363 | },
364 | "source": [
365 | "from pprint import pprint\n",
366 | "tree = id3(df_tennis,'Play_Tennis',attribute_names)\n",
367 | "print(\"\\n\\nThe Resultant Decision Tree is :\\n\")\n",
368 | "pprint(tree)\n",
369 | "attribute = next(iter(tree))\n",
370 | "print(\"Best Attribute :\\n\",attribute)\n",
371 | "print(\"Tree Keys:\\n\",tree[attribute].keys())"
372 | ],
373 | "execution_count": null,
374 | "outputs": [
375 | {
376 | "output_type": "stream",
377 | "name": "stdout",
378 | "text": [
379 | "Information Gain Calculation of Outlook\n",
380 | "\n",
381 | " Number of Instances of the Current Sub Class is 4.0:\n",
382 | "\n",
383 | " Classes: Yes Yes\n",
384 | " \n",
385 | " Probabilities of Class Yes is 1.0:\n",
386 | " \n",
387 | " Probabilities of Class Yes is 1.0:\n",
388 | "\n",
389 | " Number of Instances of the Current Sub Class is 5.0:\n",
390 | "\n",
391 | " Classes: No Yes\n",
392 | " \n",
393 | " Probabilities of Class No is 0.4:\n",
394 | " \n",
395 | " Probabilities of Class Yes is 0.6:\n",
396 | "\n",
397 | " Number of Instances of the Current Sub Class is 5.0:\n",
398 | "\n",
399 | " Classes: No Yes\n",
400 | " \n",
401 | " Probabilities of Class No is 0.4:\n",
402 | " \n",
403 | " Probabilities of Class Yes is 0.6:\n",
404 | "\n",
405 | " Number of Instances of the Current Sub Class is 14.0:\n",
406 | "\n",
407 | " Classes: No Yes\n",
408 | " \n",
409 | " Probabilities of Class No is 0.35714285714285715:\n",
410 | " \n",
411 | " Probabilities of Class Yes is 0.6428571428571429:\n",
412 | "Information Gain Calculation of Temperature\n",
413 | "\n",
414 | " Number of Instances of the Current Sub Class is 4.0:\n",
415 | "\n",
416 | " Classes: No Yes\n",
417 | " \n",
418 | " Probabilities of Class No is 0.25:\n",
419 | " \n",
420 | " Probabilities of Class Yes is 0.75:\n",
421 | "\n",
422 | " Number of Instances of the Current Sub Class is 4.0:\n",
423 | "\n",
424 | " Classes: No Yes\n",
425 | " \n",
426 | " Probabilities of Class No is 0.5:\n",
427 | " \n",
428 | " Probabilities of Class Yes is 0.5:\n",
429 | "\n",
430 | " Number of Instances of the Current Sub Class is 6.0:\n",
431 | "\n",
432 | " Classes: No Yes\n",
433 | " \n",
434 | " Probabilities of Class No is 0.3333333333333333:\n",
435 | " \n",
436 | " Probabilities of Class Yes is 0.6666666666666666:\n",
437 | "\n",
438 | " Number of Instances of the Current Sub Class is 14.0:\n",
439 | "\n",
440 | " Classes: No Yes\n",
441 | " \n",
442 | " Probabilities of Class No is 0.35714285714285715:\n",
443 | " \n",
444 | " Probabilities of Class Yes is 0.6428571428571429:\n",
445 | "Information Gain Calculation of Humidity\n",
446 | "\n",
447 | " Number of Instances of the Current Sub Class is 7.0:\n",
448 | "\n",
449 | " Classes: No Yes\n",
450 | " \n",
451 | " Probabilities of Class No is 0.42857142857142855:\n",
452 | " \n",
453 | " Probabilities of Class Yes is 0.5714285714285714:\n",
454 | "\n",
455 | " Number of Instances of the Current Sub Class is 7.0:\n",
456 | "\n",
457 | " Classes: No Yes\n",
458 | " \n",
459 | " Probabilities of Class No is 0.14285714285714285:\n",
460 | " \n",
461 | " Probabilities of Class Yes is 0.8571428571428571:\n",
462 | "\n",
463 | " Number of Instances of the Current Sub Class is 14.0:\n",
464 | "\n",
465 | " Classes: No Yes\n",
466 | " \n",
467 | " Probabilities of Class No is 0.35714285714285715:\n",
468 | " \n",
469 | " Probabilities of Class Yes is 0.6428571428571429:\n",
470 | "Information Gain Calculation of Wind\n",
471 | "\n",
472 | " Number of Instances of the Current Sub Class is 6.0:\n",
473 | "\n",
474 | " Classes: No Yes\n",
475 | " \n",
476 | " Probabilities of Class No is 0.5:\n",
477 | " \n",
478 | " Probabilities of Class Yes is 0.5:\n",
479 | "\n",
480 | " Number of Instances of the Current Sub Class is 8.0:\n",
481 | "\n",
482 | " Classes: No Yes\n",
483 | " \n",
484 | " Probabilities of Class No is 0.25:\n",
485 | " \n",
486 | " Probabilities of Class Yes is 0.75:\n",
487 | "\n",
488 | " Number of Instances of the Current Sub Class is 14.0:\n",
489 | "\n",
490 | " Classes: No Yes\n",
491 | " \n",
492 | " Probabilities of Class No is 0.35714285714285715:\n",
493 | " \n",
494 | " Probabilities of Class Yes is 0.6428571428571429:\n",
495 | "Information Gain Calculation of Temperature\n",
496 | "\n",
497 | " Number of Instances of the Current Sub Class is 2.0:\n",
498 | "\n",
499 | " Classes: No Yes\n",
500 | " \n",
501 | " Probabilities of Class No is 0.5:\n",
502 | " \n",
503 | " Probabilities of Class Yes is 0.5:\n",
504 | "\n",
505 | " Number of Instances of the Current Sub Class is 3.0:\n",
506 | "\n",
507 | " Classes: No Yes\n",
508 | " \n",
509 | " Probabilities of Class No is 0.3333333333333333:\n",
510 | " \n",
511 | " Probabilities of Class Yes is 0.6666666666666666:\n",
512 | "\n",
513 | " Number of Instances of the Current Sub Class is 5.0:\n",
514 | "\n",
515 | " Classes: No Yes\n",
516 | " \n",
517 | " Probabilities of Class No is 0.4:\n",
518 | " \n",
519 | " Probabilities of Class Yes is 0.6:\n",
520 | "Information Gain Calculation of Humidity\n",
521 | "\n",
522 | " Number of Instances of the Current Sub Class is 2.0:\n",
523 | "\n",
524 | " Classes: No Yes\n",
525 | " \n",
526 | " Probabilities of Class No is 0.5:\n",
527 | " \n",
528 | " Probabilities of Class Yes is 0.5:\n",
529 | "\n",
530 | " Number of Instances of the Current Sub Class is 3.0:\n",
531 | "\n",
532 | " Classes: No Yes\n",
533 | " \n",
534 | " Probabilities of Class No is 0.3333333333333333:\n",
535 | " \n",
536 | " Probabilities of Class Yes is 0.6666666666666666:\n",
537 | "\n",
538 | " Number of Instances of the Current Sub Class is 5.0:\n",
539 | "\n",
540 | " Classes: No Yes\n",
541 | " \n",
542 | " Probabilities of Class No is 0.4:\n",
543 | " \n",
544 | " Probabilities of Class Yes is 0.6:\n",
545 | "Information Gain Calculation of Wind\n",
546 | "\n",
547 | " Number of Instances of the Current Sub Class is 2.0:\n",
548 | "\n",
549 | " Classes: No No\n",
550 | " \n",
551 | " Probabilities of Class No is 1.0:\n",
552 | " \n",
553 | " Probabilities of Class No is 1.0:\n",
554 | "\n",
555 | " Number of Instances of the Current Sub Class is 3.0:\n",
556 | "\n",
557 | " Classes: Yes Yes\n",
558 | " \n",
559 | " Probabilities of Class Yes is 1.0:\n",
560 | " \n",
561 | " Probabilities of Class Yes is 1.0:\n",
562 | "\n",
563 | " Number of Instances of the Current Sub Class is 5.0:\n",
564 | "\n",
565 | " Classes: No Yes\n",
566 | " \n",
567 | " Probabilities of Class No is 0.4:\n",
568 | " \n",
569 | " Probabilities of Class Yes is 0.6:\n",
570 | "Information Gain Calculation of Temperature\n",
571 | "\n",
572 | " Number of Instances of the Current Sub Class is 1.0:\n",
573 | "\n",
574 | " Classes: Yes Yes\n",
575 | " \n",
576 | " Probabilities of Class Yes is 1.0:\n",
577 | " \n",
578 | " Probabilities of Class Yes is 1.0:\n",
579 | "\n",
580 | " Number of Instances of the Current Sub Class is 2.0:\n",
581 | "\n",
582 | " Classes: No No\n",
583 | " \n",
584 | " Probabilities of Class No is 1.0:\n",
585 | " \n",
586 | " Probabilities of Class No is 1.0:\n",
587 | "\n",
588 | " Number of Instances of the Current Sub Class is 2.0:\n",
589 | "\n",
590 | " Classes: No Yes\n",
591 | " \n",
592 | " Probabilities of Class No is 0.5:\n",
593 | " \n",
594 | " Probabilities of Class Yes is 0.5:\n",
595 | "\n",
596 | " Number of Instances of the Current Sub Class is 5.0:\n",
597 | "\n",
598 | " Classes: No Yes\n",
599 | " \n",
600 | " Probabilities of Class No is 0.4:\n",
601 | " \n",
602 | " Probabilities of Class Yes is 0.6:\n",
603 | "Information Gain Calculation of Humidity\n",
604 | "\n",
605 | " Number of Instances of the Current Sub Class is 3.0:\n",
606 | "\n",
607 | " Classes: No No\n",
608 | " \n",
609 | " Probabilities of Class No is 1.0:\n",
610 | " \n",
611 | " Probabilities of Class No is 1.0:\n",
612 | "\n",
613 | " Number of Instances of the Current Sub Class is 2.0:\n",
614 | "\n",
615 | " Classes: Yes Yes\n",
616 | " \n",
617 | " Probabilities of Class Yes is 1.0:\n",
618 | " \n",
619 | " Probabilities of Class Yes is 1.0:\n",
620 | "\n",
621 | " Number of Instances of the Current Sub Class is 5.0:\n",
622 | "\n",
623 | " Classes: No Yes\n",
624 | " \n",
625 | " Probabilities of Class No is 0.4:\n",
626 | " \n",
627 | " Probabilities of Class Yes is 0.6:\n",
628 | "Information Gain Calculation of Wind\n",
629 | "\n",
630 | " Number of Instances of the Current Sub Class is 2.0:\n",
631 | "\n",
632 | " Classes: No Yes\n",
633 | " \n",
634 | " Probabilities of Class No is 0.5:\n",
635 | " \n",
636 | " Probabilities of Class Yes is 0.5:\n",
637 | "\n",
638 | " Number of Instances of the Current Sub Class is 3.0:\n",
639 | "\n",
640 | " Classes: No Yes\n",
641 | " \n",
642 | " Probabilities of Class No is 0.3333333333333333:\n",
643 | " \n",
644 | " Probabilities of Class Yes is 0.6666666666666666:\n",
645 | "\n",
646 | " Number of Instances of the Current Sub Class is 5.0:\n",
647 | "\n",
648 | " Classes: No Yes\n",
649 | " \n",
650 | " Probabilities of Class No is 0.4:\n",
651 | " \n",
652 | " Probabilities of Class Yes is 0.6:\n",
653 | "\n",
654 | "\n",
655 | "The Resultant Decision Tree is :\n",
656 | "\n",
657 | "{'Outlook': {'Sunny': {'Humidity': {'Normal': 'Yes'}}}}\n",
658 | "Best Attribute :\n",
659 | " Outlook\n",
660 | "Tree Keys:\n",
661 | " dict_keys(['Sunny'])\n"
662 | ]
663 | }
664 | ]
665 | },
666 | {
667 | "cell_type": "code",
668 | "metadata": {
669 | "id": "CwUaj_A4Tzyg"
670 | },
671 | "source": [
672 | "def classify(instance, tree, default=None):\n",
673 | " attribute = next(iter(tree)) \n",
674 | " print(\"Key:\",tree.keys()) \n",
675 | " print(\"Attribute:\",attribute)\n",
676 | " if instance[attribute] in tree[attribute].keys():\n",
677 | " result = tree[attribute][instance[attribute]]\n",
678 | " print(\"Instance Attribute:\",instance[attribute],\"TreeKeys :\",tree[attribute].keys())\n",
679 | " if isinstance(result, dict): \n",
680 | " return classify(instance, result)\n",
681 | " else:\n",
682 | " return result \n",
683 | " else:\n",
684 | " return default"
685 | ],
686 | "execution_count": null,
687 | "outputs": []
688 | },
689 | {
690 | "cell_type": "code",
691 | "metadata": {
692 | "colab": {
693 | "base_uri": "https://localhost:8080/",
694 | "height": 1000
695 | },
696 | "id": "UPce_M2LUI4P",
697 | "outputId": "81a2a72f-1f3e-4922-8ac1-286a1bf829e9"
698 | },
699 | "source": [
700 | "df_tennis['predicted'] = df_tennis.apply(classify, axis=1, args=(tree,'No') ) \n",
701 | "print(df_tennis['predicted'])\n",
702 | "print('\\n Accuracy is:\\n' + str( sum(df_tennis['Play_Tennis']==df_tennis['predicted'] ) / \n",
703 | "(1.0*len(df_tennis.index)) ))\n",
704 | "df_tennis[['Play_Tennis', 'predicted']]"
705 | ],
706 | "execution_count": null,
707 | "outputs": [
708 | {
709 | "output_type": "stream",
710 | "name": "stdout",
711 | "text": [
712 | "Key: dict_keys(['Outlook'])\n",
713 | "Attribute: Outlook\n",
714 | "Instance Attribute: Sunny TreeKeys : dict_keys(['Sunny'])\n",
715 | "Key: dict_keys(['Humidity'])\n",
716 | "Attribute: Humidity\n",
717 | "Key: dict_keys(['Outlook'])\n",
718 | "Attribute: Outlook\n",
719 | "Instance Attribute: Sunny TreeKeys : dict_keys(['Sunny'])\n",
720 | "Key: dict_keys(['Humidity'])\n",
721 | "Attribute: Humidity\n",
722 | "Key: dict_keys(['Outlook'])\n",
723 | "Attribute: Outlook\n",
724 | "Key: dict_keys(['Outlook'])\n",
725 | "Attribute: Outlook\n",
726 | "Key: dict_keys(['Outlook'])\n",
727 | "Attribute: Outlook\n",
728 | "Key: dict_keys(['Outlook'])\n",
729 | "Attribute: Outlook\n",
730 | "Key: dict_keys(['Outlook'])\n",
731 | "Attribute: Outlook\n",
732 | "Key: dict_keys(['Outlook'])\n",
733 | "Attribute: Outlook\n",
734 | "Instance Attribute: Sunny TreeKeys : dict_keys(['Sunny'])\n",
735 | "Key: dict_keys(['Humidity'])\n",
736 | "Attribute: Humidity\n",
737 | "Key: dict_keys(['Outlook'])\n",
738 | "Attribute: Outlook\n",
739 | "Instance Attribute: Sunny TreeKeys : dict_keys(['Sunny'])\n",
740 | "Key: dict_keys(['Humidity'])\n",
741 | "Attribute: Humidity\n",
742 | "Instance Attribute: Normal TreeKeys : dict_keys(['Normal'])\n",
743 | "Key: dict_keys(['Outlook'])\n",
744 | "Attribute: Outlook\n",
745 | "Key: dict_keys(['Outlook'])\n",
746 | "Attribute: Outlook\n",
747 | "Instance Attribute: Sunny TreeKeys : dict_keys(['Sunny'])\n",
748 | "Key: dict_keys(['Humidity'])\n",
749 | "Attribute: Humidity\n",
750 | "Instance Attribute: Normal TreeKeys : dict_keys(['Normal'])\n",
751 | "Key: dict_keys(['Outlook'])\n",
752 | "Attribute: Outlook\n",
753 | "Key: dict_keys(['Outlook'])\n",
754 | "Attribute: Outlook\n",
755 | "Key: dict_keys(['Outlook'])\n",
756 | "Attribute: Outlook\n",
757 | "0 None\n",
758 | "1 None\n",
759 | "2 No\n",
760 | "3 No\n",
761 | "4 No\n",
762 | "5 No\n",
763 | "6 No\n",
764 | "7 None\n",
765 | "8 Yes\n",
766 | "9 No\n",
767 | "10 Yes\n",
768 | "11 No\n",
769 | "12 No\n",
770 | "13 No\n",
771 | "Name: predicted, dtype: object\n",
772 | "\n",
773 | " Accuracy is:\n",
774 | "0.2857142857142857\n"
775 | ]
776 | },
777 | {
778 | "output_type": "execute_result",
779 | "data": {
780 | "text/html": [
781 | "
\n",
782 | "\n",
795 | "
\n",
796 | " \n",
797 | " \n",
798 | " | \n",
799 | " Play_Tennis | \n",
800 | " predicted | \n",
801 | "
\n",
802 | " \n",
803 | " \n",
804 | " \n",
805 | " 0 | \n",
806 | " No | \n",
807 | " None | \n",
808 | "
\n",
809 | " \n",
810 | " 1 | \n",
811 | " No | \n",
812 | " None | \n",
813 | "
\n",
814 | " \n",
815 | " 2 | \n",
816 | " Yes | \n",
817 | " No | \n",
818 | "
\n",
819 | " \n",
820 | " 3 | \n",
821 | " Yes | \n",
822 | " No | \n",
823 | "
\n",
824 | " \n",
825 | " 4 | \n",
826 | " Yes | \n",
827 | " No | \n",
828 | "
\n",
829 | " \n",
830 | " 5 | \n",
831 | " No | \n",
832 | " No | \n",
833 | "
\n",
834 | " \n",
835 | " 6 | \n",
836 | " Yes | \n",
837 | " No | \n",
838 | "
\n",
839 | " \n",
840 | " 7 | \n",
841 | " No | \n",
842 | " None | \n",
843 | "
\n",
844 | " \n",
845 | " 8 | \n",
846 | " Yes | \n",
847 | " Yes | \n",
848 | "
\n",
849 | " \n",
850 | " 9 | \n",
851 | " Yes | \n",
852 | " No | \n",
853 | "
\n",
854 | " \n",
855 | " 10 | \n",
856 | " Yes | \n",
857 | " Yes | \n",
858 | "
\n",
859 | " \n",
860 | " 11 | \n",
861 | " Yes | \n",
862 | " No | \n",
863 | "
\n",
864 | " \n",
865 | " 12 | \n",
866 | " Yes | \n",
867 | " No | \n",
868 | "
\n",
869 | " \n",
870 | " 13 | \n",
871 | " No | \n",
872 | " No | \n",
873 | "
\n",
874 | " \n",
875 | "
\n",
876 | "
"
877 | ],
878 | "text/plain": [
879 | " Play_Tennis predicted\n",
880 | "0 No None\n",
881 | "1 No None\n",
882 | "2 Yes No\n",
883 | "3 Yes No\n",
884 | "4 Yes No\n",
885 | "5 No No\n",
886 | "6 Yes No\n",
887 | "7 No None\n",
888 | "8 Yes Yes\n",
889 | "9 Yes No\n",
890 | "10 Yes Yes\n",
891 | "11 Yes No\n",
892 | "12 Yes No\n",
893 | "13 No No"
894 | ]
895 | },
896 | "metadata": {},
897 | "execution_count": 39
898 | }
899 | ]
900 | }
901 | ]
902 | }
--------------------------------------------------------------------------------
/ID3 Decision Tree algorithm/PlayTennis.csv:
--------------------------------------------------------------------------------
1 | Outlook,Temperature,Humidity,Wind,Play_Tennis
2 | Sunny,Hot,High,Weak,No
3 | Sunny,Hot,High,Strong,No
4 | Overcast,Hot,High,Weak,Yes
5 | Rain,Mild,High,Weak,Yes
6 | Rain,Cool,Normal,Weak,Yes
7 | Rain,Cool,Normal,Strong,No
8 | Overcast,Cool,Normal,Strong,Yes
9 | Sunny,Mild,High,Weak,No
10 | Sunny,Cool,Normal,Weak,Yes
11 | Rain,Mild,Normal,Weak,Yes
12 | Sunny,Mild,Normal,Strong,Yes
13 | Overcast,Mild,High,Strong,Yes
14 | Overcast,Hot,Normal,Weak,Yes
15 | Rain,Mild,High,Strong,No
16 |
--------------------------------------------------------------------------------
/K Nearest Neighbors/HomePrices-Test.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RiteshPuvvada/Machine-Learning-Lab/30616486c52f92a9ea0fabd4c23d8cae1eac1ab4/K Nearest Neighbors/HomePrices-Test.xlsx
--------------------------------------------------------------------------------
/K Nearest Neighbors/K_Nearest_Neighbors.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "K_Nearest_Neighbors.ipynb",
7 | "provenance": [],
8 | "collapsed_sections": [],
9 | "machine_shape": "hm"
10 | },
11 | "kernelspec": {
12 | "name": "python3",
13 | "display_name": "Python 3"
14 | }
15 | },
16 | "cells": [
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {
20 | "id": "0MRC0e0KhQ0S"
21 | },
22 | "source": [
23 | "# K-Nearest Neighbors (K-NN)"
24 | ]
25 | },
26 | {
27 | "cell_type": "markdown",
28 | "metadata": {
29 | "id": "LWd1UlMnhT2s"
30 | },
31 | "source": [
32 | "## Importing the libraries"
33 | ]
34 | },
35 | {
36 | "cell_type": "code",
37 | "metadata": {
38 | "id": "YvGPUQaHhXfL"
39 | },
40 | "source": [
41 | "import numpy as np\n",
42 | "import matplotlib.pyplot as plt\n",
43 | "import pandas as pd"
44 | ],
45 | "execution_count": null,
46 | "outputs": []
47 | },
48 | {
49 | "cell_type": "markdown",
50 | "metadata": {
51 | "id": "K1VMqkGvhc3-"
52 | },
53 | "source": [
54 | "## Importing the dataset"
55 | ]
56 | },
57 | {
58 | "cell_type": "code",
59 | "metadata": {
60 | "id": "M52QDmyzhh9s"
61 | },
62 | "source": [
63 | "dataset = pd.read_csv('/content/diabetes.csv')\n",
64 | "X = dataset.iloc[:, :-1].values\n",
65 | "y = dataset.iloc[:, -1].values"
66 | ],
67 | "execution_count": null,
68 | "outputs": []
69 | },
70 | {
71 | "cell_type": "markdown",
72 | "metadata": {
73 | "id": "YvxIPVyMhmKp"
74 | },
75 | "source": [
76 | "## Splitting the dataset into the Training set and Test set"
77 | ]
78 | },
79 | {
80 | "cell_type": "code",
81 | "metadata": {
82 | "id": "AVzJWAXIhxoC"
83 | },
84 | "source": [
85 | "from sklearn.model_selection import train_test_split\n",
86 | "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.25, random_state = 0)"
87 | ],
88 | "execution_count": null,
89 | "outputs": []
90 | },
91 | {
92 | "cell_type": "markdown",
93 | "metadata": {
94 | "id": "kW3c7UYih0hT"
95 | },
96 | "source": [
97 | "## Feature Scaling"
98 | ]
99 | },
100 | {
101 | "cell_type": "code",
102 | "metadata": {
103 | "id": "9fQlDPKCh8sc"
104 | },
105 | "source": [
106 | "from sklearn.preprocessing import StandardScaler\n",
107 | "sc = StandardScaler()\n",
108 | "X_train = sc.fit_transform(X_train)\n",
109 | "X_test = sc.transform(X_test)"
110 | ],
111 | "execution_count": null,
112 | "outputs": []
113 | },
114 | {
115 | "cell_type": "markdown",
116 | "metadata": {
117 | "id": "bb6jCOCQiAmP"
118 | },
119 | "source": [
120 | "## Training the K-NN model on the Training set"
121 | ]
122 | },
123 | {
124 | "cell_type": "code",
125 | "metadata": {
126 | "id": "e0pFVAmciHQs",
127 | "colab": {
128 | "base_uri": "https://localhost:8080/"
129 | },
130 | "outputId": "873bf992-1a3e-4b08-ecdc-b64655cadfac"
131 | },
132 | "source": [
133 | "from sklearn.neighbors import KNeighborsClassifier\n",
134 | "classifier = KNeighborsClassifier(n_neighbors = 5, metric = 'minkowski', p = 2)\n",
135 | "classifier.fit(X_train, y_train)"
136 | ],
137 | "execution_count": null,
138 | "outputs": [
139 | {
140 | "output_type": "execute_result",
141 | "data": {
142 | "text/plain": [
143 | "KNeighborsClassifier(algorithm='auto', leaf_size=30, metric='minkowski',\n",
144 | " metric_params=None, n_jobs=None, n_neighbors=5, p=2,\n",
145 | " weights='uniform')"
146 | ]
147 | },
148 | "metadata": {},
149 | "execution_count": 7
150 | }
151 | ]
152 | },
153 | {
154 | "cell_type": "markdown",
155 | "metadata": {
156 | "id": "h4Hwj34ziWQW"
157 | },
158 | "source": [
159 | "## Making the Confusion Matrix"
160 | ]
161 | },
162 | {
163 | "cell_type": "code",
164 | "metadata": {
165 | "id": "D6bpZwUiiXic",
166 | "colab": {
167 | "base_uri": "https://localhost:8080/"
168 | },
169 | "outputId": "c35cfbff-29a4-4d2e-b305-47e7bfff150f"
170 | },
171 | "source": [
172 | "from sklearn.metrics import confusion_matrix, accuracy_score\n",
173 | "y_pred = classifier.predict(X_test)\n",
174 | "cm = confusion_matrix(y_test, y_pred)\n",
175 | "print(cm)\n",
176 | "accuracy_score(y_test, y_pred)"
177 | ],
178 | "execution_count": null,
179 | "outputs": [
180 | {
181 | "output_type": "stream",
182 | "name": "stdout",
183 | "text": [
184 | "[[114 16]\n",
185 | " [ 22 40]]\n"
186 | ]
187 | },
188 | {
189 | "output_type": "execute_result",
190 | "data": {
191 | "text/plain": [
192 | "0.8020833333333334"
193 | ]
194 | },
195 | "metadata": {},
196 | "execution_count": 8
197 | }
198 | ]
199 | }
200 | ]
201 | }
--------------------------------------------------------------------------------
/K Nearest Neighbors/diabetes.csv:
--------------------------------------------------------------------------------
1 | Pregnancies,Glucose,BloodPressure,SkinThickness,Insulin,BMI,DiabetesPedigreeFunction,Age,Outcome
2 | 6,148,72,35,0,33.6,0.627,50,1
3 | 1,85,66,29,0,26.6,0.351,31,0
4 | 8,183,64,0,0,23.3,0.672,32,1
5 | 1,89,66,23,94,28.1,0.167,21,0
6 | 0,137,40,35,168,43.1,2.288,33,1
7 | 5,116,74,0,0,25.6,0.201,30,0
8 | 3,78,50,32,88,31,0.248,26,1
9 | 10,115,0,0,0,35.3,0.134,29,0
10 | 2,197,70,45,543,30.5,0.158,53,1
11 | 8,125,96,0,0,0,0.232,54,1
12 | 4,110,92,0,0,37.6,0.191,30,0
13 | 10,168,74,0,0,38,0.537,34,1
14 | 10,139,80,0,0,27.1,1.441,57,0
15 | 1,189,60,23,846,30.1,0.398,59,1
16 | 5,166,72,19,175,25.8,0.587,51,1
17 | 7,100,0,0,0,30,0.484,32,1
18 | 0,118,84,47,230,45.8,0.551,31,1
19 | 7,107,74,0,0,29.6,0.254,31,1
20 | 1,103,30,38,83,43.3,0.183,33,0
21 | 1,115,70,30,96,34.6,0.529,32,1
22 | 3,126,88,41,235,39.3,0.704,27,0
23 | 8,99,84,0,0,35.4,0.388,50,0
24 | 7,196,90,0,0,39.8,0.451,41,1
25 | 9,119,80,35,0,29,0.263,29,1
26 | 11,143,94,33,146,36.6,0.254,51,1
27 | 10,125,70,26,115,31.1,0.205,41,1
28 | 7,147,76,0,0,39.4,0.257,43,1
29 | 1,97,66,15,140,23.2,0.487,22,0
30 | 13,145,82,19,110,22.2,0.245,57,0
31 | 5,117,92,0,0,34.1,0.337,38,0
32 | 5,109,75,26,0,36,0.546,60,0
33 | 3,158,76,36,245,31.6,0.851,28,1
34 | 3,88,58,11,54,24.8,0.267,22,0
35 | 6,92,92,0,0,19.9,0.188,28,0
36 | 10,122,78,31,0,27.6,0.512,45,0
37 | 4,103,60,33,192,24,0.966,33,0
38 | 11,138,76,0,0,33.2,0.42,35,0
39 | 9,102,76,37,0,32.9,0.665,46,1
40 | 2,90,68,42,0,38.2,0.503,27,1
41 | 4,111,72,47,207,37.1,1.39,56,1
42 | 3,180,64,25,70,34,0.271,26,0
43 | 7,133,84,0,0,40.2,0.696,37,0
44 | 7,106,92,18,0,22.7,0.235,48,0
45 | 9,171,110,24,240,45.4,0.721,54,1
46 | 7,159,64,0,0,27.4,0.294,40,0
47 | 0,180,66,39,0,42,1.893,25,1
48 | 1,146,56,0,0,29.7,0.564,29,0
49 | 2,71,70,27,0,28,0.586,22,0
50 | 7,103,66,32,0,39.1,0.344,31,1
51 | 7,105,0,0,0,0,0.305,24,0
52 | 1,103,80,11,82,19.4,0.491,22,0
53 | 1,101,50,15,36,24.2,0.526,26,0
54 | 5,88,66,21,23,24.4,0.342,30,0
55 | 8,176,90,34,300,33.7,0.467,58,1
56 | 7,150,66,42,342,34.7,0.718,42,0
57 | 1,73,50,10,0,23,0.248,21,0
58 | 7,187,68,39,304,37.7,0.254,41,1
59 | 0,100,88,60,110,46.8,0.962,31,0
60 | 0,146,82,0,0,40.5,1.781,44,0
61 | 0,105,64,41,142,41.5,0.173,22,0
62 | 2,84,0,0,0,0,0.304,21,0
63 | 8,133,72,0,0,32.9,0.27,39,1
64 | 5,44,62,0,0,25,0.587,36,0
65 | 2,141,58,34,128,25.4,0.699,24,0
66 | 7,114,66,0,0,32.8,0.258,42,1
67 | 5,99,74,27,0,29,0.203,32,0
68 | 0,109,88,30,0,32.5,0.855,38,1
69 | 2,109,92,0,0,42.7,0.845,54,0
70 | 1,95,66,13,38,19.6,0.334,25,0
71 | 4,146,85,27,100,28.9,0.189,27,0
72 | 2,100,66,20,90,32.9,0.867,28,1
73 | 5,139,64,35,140,28.6,0.411,26,0
74 | 13,126,90,0,0,43.4,0.583,42,1
75 | 4,129,86,20,270,35.1,0.231,23,0
76 | 1,79,75,30,0,32,0.396,22,0
77 | 1,0,48,20,0,24.7,0.14,22,0
78 | 7,62,78,0,0,32.6,0.391,41,0
79 | 5,95,72,33,0,37.7,0.37,27,0
80 | 0,131,0,0,0,43.2,0.27,26,1
81 | 2,112,66,22,0,25,0.307,24,0
82 | 3,113,44,13,0,22.4,0.14,22,0
83 | 2,74,0,0,0,0,0.102,22,0
84 | 7,83,78,26,71,29.3,0.767,36,0
85 | 0,101,65,28,0,24.6,0.237,22,0
86 | 5,137,108,0,0,48.8,0.227,37,1
87 | 2,110,74,29,125,32.4,0.698,27,0
88 | 13,106,72,54,0,36.6,0.178,45,0
89 | 2,100,68,25,71,38.5,0.324,26,0
90 | 15,136,70,32,110,37.1,0.153,43,1
91 | 1,107,68,19,0,26.5,0.165,24,0
92 | 1,80,55,0,0,19.1,0.258,21,0
93 | 4,123,80,15,176,32,0.443,34,0
94 | 7,81,78,40,48,46.7,0.261,42,0
95 | 4,134,72,0,0,23.8,0.277,60,1
96 | 2,142,82,18,64,24.7,0.761,21,0
97 | 6,144,72,27,228,33.9,0.255,40,0
98 | 2,92,62,28,0,31.6,0.13,24,0
99 | 1,71,48,18,76,20.4,0.323,22,0
100 | 6,93,50,30,64,28.7,0.356,23,0
101 | 1,122,90,51,220,49.7,0.325,31,1
102 | 1,163,72,0,0,39,1.222,33,1
103 | 1,151,60,0,0,26.1,0.179,22,0
104 | 0,125,96,0,0,22.5,0.262,21,0
105 | 1,81,72,18,40,26.6,0.283,24,0
106 | 2,85,65,0,0,39.6,0.93,27,0
107 | 1,126,56,29,152,28.7,0.801,21,0
108 | 1,96,122,0,0,22.4,0.207,27,0
109 | 4,144,58,28,140,29.5,0.287,37,0
110 | 3,83,58,31,18,34.3,0.336,25,0
111 | 0,95,85,25,36,37.4,0.247,24,1
112 | 3,171,72,33,135,33.3,0.199,24,1
113 | 8,155,62,26,495,34,0.543,46,1
114 | 1,89,76,34,37,31.2,0.192,23,0
115 | 4,76,62,0,0,34,0.391,25,0
116 | 7,160,54,32,175,30.5,0.588,39,1
117 | 4,146,92,0,0,31.2,0.539,61,1
118 | 5,124,74,0,0,34,0.22,38,1
119 | 5,78,48,0,0,33.7,0.654,25,0
120 | 4,97,60,23,0,28.2,0.443,22,0
121 | 4,99,76,15,51,23.2,0.223,21,0
122 | 0,162,76,56,100,53.2,0.759,25,1
123 | 6,111,64,39,0,34.2,0.26,24,0
124 | 2,107,74,30,100,33.6,0.404,23,0
125 | 5,132,80,0,0,26.8,0.186,69,0
126 | 0,113,76,0,0,33.3,0.278,23,1
127 | 1,88,30,42,99,55,0.496,26,1
128 | 3,120,70,30,135,42.9,0.452,30,0
129 | 1,118,58,36,94,33.3,0.261,23,0
130 | 1,117,88,24,145,34.5,0.403,40,1
131 | 0,105,84,0,0,27.9,0.741,62,1
132 | 4,173,70,14,168,29.7,0.361,33,1
133 | 9,122,56,0,0,33.3,1.114,33,1
134 | 3,170,64,37,225,34.5,0.356,30,1
135 | 8,84,74,31,0,38.3,0.457,39,0
136 | 2,96,68,13,49,21.1,0.647,26,0
137 | 2,125,60,20,140,33.8,0.088,31,0
138 | 0,100,70,26,50,30.8,0.597,21,0
139 | 0,93,60,25,92,28.7,0.532,22,0
140 | 0,129,80,0,0,31.2,0.703,29,0
141 | 5,105,72,29,325,36.9,0.159,28,0
142 | 3,128,78,0,0,21.1,0.268,55,0
143 | 5,106,82,30,0,39.5,0.286,38,0
144 | 2,108,52,26,63,32.5,0.318,22,0
145 | 10,108,66,0,0,32.4,0.272,42,1
146 | 4,154,62,31,284,32.8,0.237,23,0
147 | 0,102,75,23,0,0,0.572,21,0
148 | 9,57,80,37,0,32.8,0.096,41,0
149 | 2,106,64,35,119,30.5,1.4,34,0
150 | 5,147,78,0,0,33.7,0.218,65,0
151 | 2,90,70,17,0,27.3,0.085,22,0
152 | 1,136,74,50,204,37.4,0.399,24,0
153 | 4,114,65,0,0,21.9,0.432,37,0
154 | 9,156,86,28,155,34.3,1.189,42,1
155 | 1,153,82,42,485,40.6,0.687,23,0
156 | 8,188,78,0,0,47.9,0.137,43,1
157 | 7,152,88,44,0,50,0.337,36,1
158 | 2,99,52,15,94,24.6,0.637,21,0
159 | 1,109,56,21,135,25.2,0.833,23,0
160 | 2,88,74,19,53,29,0.229,22,0
161 | 17,163,72,41,114,40.9,0.817,47,1
162 | 4,151,90,38,0,29.7,0.294,36,0
163 | 7,102,74,40,105,37.2,0.204,45,0
164 | 0,114,80,34,285,44.2,0.167,27,0
165 | 2,100,64,23,0,29.7,0.368,21,0
166 | 0,131,88,0,0,31.6,0.743,32,1
167 | 6,104,74,18,156,29.9,0.722,41,1
168 | 3,148,66,25,0,32.5,0.256,22,0
169 | 4,120,68,0,0,29.6,0.709,34,0
170 | 4,110,66,0,0,31.9,0.471,29,0
171 | 3,111,90,12,78,28.4,0.495,29,0
172 | 6,102,82,0,0,30.8,0.18,36,1
173 | 6,134,70,23,130,35.4,0.542,29,1
174 | 2,87,0,23,0,28.9,0.773,25,0
175 | 1,79,60,42,48,43.5,0.678,23,0
176 | 2,75,64,24,55,29.7,0.37,33,0
177 | 8,179,72,42,130,32.7,0.719,36,1
178 | 6,85,78,0,0,31.2,0.382,42,0
179 | 0,129,110,46,130,67.1,0.319,26,1
180 | 5,143,78,0,0,45,0.19,47,0
181 | 5,130,82,0,0,39.1,0.956,37,1
182 | 6,87,80,0,0,23.2,0.084,32,0
183 | 0,119,64,18,92,34.9,0.725,23,0
184 | 1,0,74,20,23,27.7,0.299,21,0
185 | 5,73,60,0,0,26.8,0.268,27,0
186 | 4,141,74,0,0,27.6,0.244,40,0
187 | 7,194,68,28,0,35.9,0.745,41,1
188 | 8,181,68,36,495,30.1,0.615,60,1
189 | 1,128,98,41,58,32,1.321,33,1
190 | 8,109,76,39,114,27.9,0.64,31,1
191 | 5,139,80,35,160,31.6,0.361,25,1
192 | 3,111,62,0,0,22.6,0.142,21,0
193 | 9,123,70,44,94,33.1,0.374,40,0
194 | 7,159,66,0,0,30.4,0.383,36,1
195 | 11,135,0,0,0,52.3,0.578,40,1
196 | 8,85,55,20,0,24.4,0.136,42,0
197 | 5,158,84,41,210,39.4,0.395,29,1
198 | 1,105,58,0,0,24.3,0.187,21,0
199 | 3,107,62,13,48,22.9,0.678,23,1
200 | 4,109,64,44,99,34.8,0.905,26,1
201 | 4,148,60,27,318,30.9,0.15,29,1
202 | 0,113,80,16,0,31,0.874,21,0
203 | 1,138,82,0,0,40.1,0.236,28,0
204 | 0,108,68,20,0,27.3,0.787,32,0
205 | 2,99,70,16,44,20.4,0.235,27,0
206 | 6,103,72,32,190,37.7,0.324,55,0
207 | 5,111,72,28,0,23.9,0.407,27,0
208 | 8,196,76,29,280,37.5,0.605,57,1
209 | 5,162,104,0,0,37.7,0.151,52,1
210 | 1,96,64,27,87,33.2,0.289,21,0
211 | 7,184,84,33,0,35.5,0.355,41,1
212 | 2,81,60,22,0,27.7,0.29,25,0
213 | 0,147,85,54,0,42.8,0.375,24,0
214 | 7,179,95,31,0,34.2,0.164,60,0
215 | 0,140,65,26,130,42.6,0.431,24,1
216 | 9,112,82,32,175,34.2,0.26,36,1
217 | 12,151,70,40,271,41.8,0.742,38,1
218 | 5,109,62,41,129,35.8,0.514,25,1
219 | 6,125,68,30,120,30,0.464,32,0
220 | 5,85,74,22,0,29,1.224,32,1
221 | 5,112,66,0,0,37.8,0.261,41,1
222 | 0,177,60,29,478,34.6,1.072,21,1
223 | 2,158,90,0,0,31.6,0.805,66,1
224 | 7,119,0,0,0,25.2,0.209,37,0
225 | 7,142,60,33,190,28.8,0.687,61,0
226 | 1,100,66,15,56,23.6,0.666,26,0
227 | 1,87,78,27,32,34.6,0.101,22,0
228 | 0,101,76,0,0,35.7,0.198,26,0
229 | 3,162,52,38,0,37.2,0.652,24,1
230 | 4,197,70,39,744,36.7,2.329,31,0
231 | 0,117,80,31,53,45.2,0.089,24,0
232 | 4,142,86,0,0,44,0.645,22,1
233 | 6,134,80,37,370,46.2,0.238,46,1
234 | 1,79,80,25,37,25.4,0.583,22,0
235 | 4,122,68,0,0,35,0.394,29,0
236 | 3,74,68,28,45,29.7,0.293,23,0
237 | 4,171,72,0,0,43.6,0.479,26,1
238 | 7,181,84,21,192,35.9,0.586,51,1
239 | 0,179,90,27,0,44.1,0.686,23,1
240 | 9,164,84,21,0,30.8,0.831,32,1
241 | 0,104,76,0,0,18.4,0.582,27,0
242 | 1,91,64,24,0,29.2,0.192,21,0
243 | 4,91,70,32,88,33.1,0.446,22,0
244 | 3,139,54,0,0,25.6,0.402,22,1
245 | 6,119,50,22,176,27.1,1.318,33,1
246 | 2,146,76,35,194,38.2,0.329,29,0
247 | 9,184,85,15,0,30,1.213,49,1
248 | 10,122,68,0,0,31.2,0.258,41,0
249 | 0,165,90,33,680,52.3,0.427,23,0
250 | 9,124,70,33,402,35.4,0.282,34,0
251 | 1,111,86,19,0,30.1,0.143,23,0
252 | 9,106,52,0,0,31.2,0.38,42,0
253 | 2,129,84,0,0,28,0.284,27,0
254 | 2,90,80,14,55,24.4,0.249,24,0
255 | 0,86,68,32,0,35.8,0.238,25,0
256 | 12,92,62,7,258,27.6,0.926,44,1
257 | 1,113,64,35,0,33.6,0.543,21,1
258 | 3,111,56,39,0,30.1,0.557,30,0
259 | 2,114,68,22,0,28.7,0.092,25,0
260 | 1,193,50,16,375,25.9,0.655,24,0
261 | 11,155,76,28,150,33.3,1.353,51,1
262 | 3,191,68,15,130,30.9,0.299,34,0
263 | 3,141,0,0,0,30,0.761,27,1
264 | 4,95,70,32,0,32.1,0.612,24,0
265 | 3,142,80,15,0,32.4,0.2,63,0
266 | 4,123,62,0,0,32,0.226,35,1
267 | 5,96,74,18,67,33.6,0.997,43,0
268 | 0,138,0,0,0,36.3,0.933,25,1
269 | 2,128,64,42,0,40,1.101,24,0
270 | 0,102,52,0,0,25.1,0.078,21,0
271 | 2,146,0,0,0,27.5,0.24,28,1
272 | 10,101,86,37,0,45.6,1.136,38,1
273 | 2,108,62,32,56,25.2,0.128,21,0
274 | 3,122,78,0,0,23,0.254,40,0
275 | 1,71,78,50,45,33.2,0.422,21,0
276 | 13,106,70,0,0,34.2,0.251,52,0
277 | 2,100,70,52,57,40.5,0.677,25,0
278 | 7,106,60,24,0,26.5,0.296,29,1
279 | 0,104,64,23,116,27.8,0.454,23,0
280 | 5,114,74,0,0,24.9,0.744,57,0
281 | 2,108,62,10,278,25.3,0.881,22,0
282 | 0,146,70,0,0,37.9,0.334,28,1
283 | 10,129,76,28,122,35.9,0.28,39,0
284 | 7,133,88,15,155,32.4,0.262,37,0
285 | 7,161,86,0,0,30.4,0.165,47,1
286 | 2,108,80,0,0,27,0.259,52,1
287 | 7,136,74,26,135,26,0.647,51,0
288 | 5,155,84,44,545,38.7,0.619,34,0
289 | 1,119,86,39,220,45.6,0.808,29,1
290 | 4,96,56,17,49,20.8,0.34,26,0
291 | 5,108,72,43,75,36.1,0.263,33,0
292 | 0,78,88,29,40,36.9,0.434,21,0
293 | 0,107,62,30,74,36.6,0.757,25,1
294 | 2,128,78,37,182,43.3,1.224,31,1
295 | 1,128,48,45,194,40.5,0.613,24,1
296 | 0,161,50,0,0,21.9,0.254,65,0
297 | 6,151,62,31,120,35.5,0.692,28,0
298 | 2,146,70,38,360,28,0.337,29,1
299 | 0,126,84,29,215,30.7,0.52,24,0
300 | 14,100,78,25,184,36.6,0.412,46,1
301 | 8,112,72,0,0,23.6,0.84,58,0
302 | 0,167,0,0,0,32.3,0.839,30,1
303 | 2,144,58,33,135,31.6,0.422,25,1
304 | 5,77,82,41,42,35.8,0.156,35,0
305 | 5,115,98,0,0,52.9,0.209,28,1
306 | 3,150,76,0,0,21,0.207,37,0
307 | 2,120,76,37,105,39.7,0.215,29,0
308 | 10,161,68,23,132,25.5,0.326,47,1
309 | 0,137,68,14,148,24.8,0.143,21,0
310 | 0,128,68,19,180,30.5,1.391,25,1
311 | 2,124,68,28,205,32.9,0.875,30,1
312 | 6,80,66,30,0,26.2,0.313,41,0
313 | 0,106,70,37,148,39.4,0.605,22,0
314 | 2,155,74,17,96,26.6,0.433,27,1
315 | 3,113,50,10,85,29.5,0.626,25,0
316 | 7,109,80,31,0,35.9,1.127,43,1
317 | 2,112,68,22,94,34.1,0.315,26,0
318 | 3,99,80,11,64,19.3,0.284,30,0
319 | 3,182,74,0,0,30.5,0.345,29,1
320 | 3,115,66,39,140,38.1,0.15,28,0
321 | 6,194,78,0,0,23.5,0.129,59,1
322 | 4,129,60,12,231,27.5,0.527,31,0
323 | 3,112,74,30,0,31.6,0.197,25,1
324 | 0,124,70,20,0,27.4,0.254,36,1
325 | 13,152,90,33,29,26.8,0.731,43,1
326 | 2,112,75,32,0,35.7,0.148,21,0
327 | 1,157,72,21,168,25.6,0.123,24,0
328 | 1,122,64,32,156,35.1,0.692,30,1
329 | 10,179,70,0,0,35.1,0.2,37,0
330 | 2,102,86,36,120,45.5,0.127,23,1
331 | 6,105,70,32,68,30.8,0.122,37,0
332 | 8,118,72,19,0,23.1,1.476,46,0
333 | 2,87,58,16,52,32.7,0.166,25,0
334 | 1,180,0,0,0,43.3,0.282,41,1
335 | 12,106,80,0,0,23.6,0.137,44,0
336 | 1,95,60,18,58,23.9,0.26,22,0
337 | 0,165,76,43,255,47.9,0.259,26,0
338 | 0,117,0,0,0,33.8,0.932,44,0
339 | 5,115,76,0,0,31.2,0.343,44,1
340 | 9,152,78,34,171,34.2,0.893,33,1
341 | 7,178,84,0,0,39.9,0.331,41,1
342 | 1,130,70,13,105,25.9,0.472,22,0
343 | 1,95,74,21,73,25.9,0.673,36,0
344 | 1,0,68,35,0,32,0.389,22,0
345 | 5,122,86,0,0,34.7,0.29,33,0
346 | 8,95,72,0,0,36.8,0.485,57,0
347 | 8,126,88,36,108,38.5,0.349,49,0
348 | 1,139,46,19,83,28.7,0.654,22,0
349 | 3,116,0,0,0,23.5,0.187,23,0
350 | 3,99,62,19,74,21.8,0.279,26,0
351 | 5,0,80,32,0,41,0.346,37,1
352 | 4,92,80,0,0,42.2,0.237,29,0
353 | 4,137,84,0,0,31.2,0.252,30,0
354 | 3,61,82,28,0,34.4,0.243,46,0
355 | 1,90,62,12,43,27.2,0.58,24,0
356 | 3,90,78,0,0,42.7,0.559,21,0
357 | 9,165,88,0,0,30.4,0.302,49,1
358 | 1,125,50,40,167,33.3,0.962,28,1
359 | 13,129,0,30,0,39.9,0.569,44,1
360 | 12,88,74,40,54,35.3,0.378,48,0
361 | 1,196,76,36,249,36.5,0.875,29,1
362 | 5,189,64,33,325,31.2,0.583,29,1
363 | 5,158,70,0,0,29.8,0.207,63,0
364 | 5,103,108,37,0,39.2,0.305,65,0
365 | 4,146,78,0,0,38.5,0.52,67,1
366 | 4,147,74,25,293,34.9,0.385,30,0
367 | 5,99,54,28,83,34,0.499,30,0
368 | 6,124,72,0,0,27.6,0.368,29,1
369 | 0,101,64,17,0,21,0.252,21,0
370 | 3,81,86,16,66,27.5,0.306,22,0
371 | 1,133,102,28,140,32.8,0.234,45,1
372 | 3,173,82,48,465,38.4,2.137,25,1
373 | 0,118,64,23,89,0,1.731,21,0
374 | 0,84,64,22,66,35.8,0.545,21,0
375 | 2,105,58,40,94,34.9,0.225,25,0
376 | 2,122,52,43,158,36.2,0.816,28,0
377 | 12,140,82,43,325,39.2,0.528,58,1
378 | 0,98,82,15,84,25.2,0.299,22,0
379 | 1,87,60,37,75,37.2,0.509,22,0
380 | 4,156,75,0,0,48.3,0.238,32,1
381 | 0,93,100,39,72,43.4,1.021,35,0
382 | 1,107,72,30,82,30.8,0.821,24,0
383 | 0,105,68,22,0,20,0.236,22,0
384 | 1,109,60,8,182,25.4,0.947,21,0
385 | 1,90,62,18,59,25.1,1.268,25,0
386 | 1,125,70,24,110,24.3,0.221,25,0
387 | 1,119,54,13,50,22.3,0.205,24,0
388 | 5,116,74,29,0,32.3,0.66,35,1
389 | 8,105,100,36,0,43.3,0.239,45,1
390 | 5,144,82,26,285,32,0.452,58,1
391 | 3,100,68,23,81,31.6,0.949,28,0
392 | 1,100,66,29,196,32,0.444,42,0
393 | 5,166,76,0,0,45.7,0.34,27,1
394 | 1,131,64,14,415,23.7,0.389,21,0
395 | 4,116,72,12,87,22.1,0.463,37,0
396 | 4,158,78,0,0,32.9,0.803,31,1
397 | 2,127,58,24,275,27.7,1.6,25,0
398 | 3,96,56,34,115,24.7,0.944,39,0
399 | 0,131,66,40,0,34.3,0.196,22,1
400 | 3,82,70,0,0,21.1,0.389,25,0
401 | 3,193,70,31,0,34.9,0.241,25,1
402 | 4,95,64,0,0,32,0.161,31,1
403 | 6,137,61,0,0,24.2,0.151,55,0
404 | 5,136,84,41,88,35,0.286,35,1
405 | 9,72,78,25,0,31.6,0.28,38,0
406 | 5,168,64,0,0,32.9,0.135,41,1
407 | 2,123,48,32,165,42.1,0.52,26,0
408 | 4,115,72,0,0,28.9,0.376,46,1
409 | 0,101,62,0,0,21.9,0.336,25,0
410 | 8,197,74,0,0,25.9,1.191,39,1
411 | 1,172,68,49,579,42.4,0.702,28,1
412 | 6,102,90,39,0,35.7,0.674,28,0
413 | 1,112,72,30,176,34.4,0.528,25,0
414 | 1,143,84,23,310,42.4,1.076,22,0
415 | 1,143,74,22,61,26.2,0.256,21,0
416 | 0,138,60,35,167,34.6,0.534,21,1
417 | 3,173,84,33,474,35.7,0.258,22,1
418 | 1,97,68,21,0,27.2,1.095,22,0
419 | 4,144,82,32,0,38.5,0.554,37,1
420 | 1,83,68,0,0,18.2,0.624,27,0
421 | 3,129,64,29,115,26.4,0.219,28,1
422 | 1,119,88,41,170,45.3,0.507,26,0
423 | 2,94,68,18,76,26,0.561,21,0
424 | 0,102,64,46,78,40.6,0.496,21,0
425 | 2,115,64,22,0,30.8,0.421,21,0
426 | 8,151,78,32,210,42.9,0.516,36,1
427 | 4,184,78,39,277,37,0.264,31,1
428 | 0,94,0,0,0,0,0.256,25,0
429 | 1,181,64,30,180,34.1,0.328,38,1
430 | 0,135,94,46,145,40.6,0.284,26,0
431 | 1,95,82,25,180,35,0.233,43,1
432 | 2,99,0,0,0,22.2,0.108,23,0
433 | 3,89,74,16,85,30.4,0.551,38,0
434 | 1,80,74,11,60,30,0.527,22,0
435 | 2,139,75,0,0,25.6,0.167,29,0
436 | 1,90,68,8,0,24.5,1.138,36,0
437 | 0,141,0,0,0,42.4,0.205,29,1
438 | 12,140,85,33,0,37.4,0.244,41,0
439 | 5,147,75,0,0,29.9,0.434,28,0
440 | 1,97,70,15,0,18.2,0.147,21,0
441 | 6,107,88,0,0,36.8,0.727,31,0
442 | 0,189,104,25,0,34.3,0.435,41,1
443 | 2,83,66,23,50,32.2,0.497,22,0
444 | 4,117,64,27,120,33.2,0.23,24,0
445 | 8,108,70,0,0,30.5,0.955,33,1
446 | 4,117,62,12,0,29.7,0.38,30,1
447 | 0,180,78,63,14,59.4,2.42,25,1
448 | 1,100,72,12,70,25.3,0.658,28,0
449 | 0,95,80,45,92,36.5,0.33,26,0
450 | 0,104,64,37,64,33.6,0.51,22,1
451 | 0,120,74,18,63,30.5,0.285,26,0
452 | 1,82,64,13,95,21.2,0.415,23,0
453 | 2,134,70,0,0,28.9,0.542,23,1
454 | 0,91,68,32,210,39.9,0.381,25,0
455 | 2,119,0,0,0,19.6,0.832,72,0
456 | 2,100,54,28,105,37.8,0.498,24,0
457 | 14,175,62,30,0,33.6,0.212,38,1
458 | 1,135,54,0,0,26.7,0.687,62,0
459 | 5,86,68,28,71,30.2,0.364,24,0
460 | 10,148,84,48,237,37.6,1.001,51,1
461 | 9,134,74,33,60,25.9,0.46,81,0
462 | 9,120,72,22,56,20.8,0.733,48,0
463 | 1,71,62,0,0,21.8,0.416,26,0
464 | 8,74,70,40,49,35.3,0.705,39,0
465 | 5,88,78,30,0,27.6,0.258,37,0
466 | 10,115,98,0,0,24,1.022,34,0
467 | 0,124,56,13,105,21.8,0.452,21,0
468 | 0,74,52,10,36,27.8,0.269,22,0
469 | 0,97,64,36,100,36.8,0.6,25,0
470 | 8,120,0,0,0,30,0.183,38,1
471 | 6,154,78,41,140,46.1,0.571,27,0
472 | 1,144,82,40,0,41.3,0.607,28,0
473 | 0,137,70,38,0,33.2,0.17,22,0
474 | 0,119,66,27,0,38.8,0.259,22,0
475 | 7,136,90,0,0,29.9,0.21,50,0
476 | 4,114,64,0,0,28.9,0.126,24,0
477 | 0,137,84,27,0,27.3,0.231,59,0
478 | 2,105,80,45,191,33.7,0.711,29,1
479 | 7,114,76,17,110,23.8,0.466,31,0
480 | 8,126,74,38,75,25.9,0.162,39,0
481 | 4,132,86,31,0,28,0.419,63,0
482 | 3,158,70,30,328,35.5,0.344,35,1
483 | 0,123,88,37,0,35.2,0.197,29,0
484 | 4,85,58,22,49,27.8,0.306,28,0
485 | 0,84,82,31,125,38.2,0.233,23,0
486 | 0,145,0,0,0,44.2,0.63,31,1
487 | 0,135,68,42,250,42.3,0.365,24,1
488 | 1,139,62,41,480,40.7,0.536,21,0
489 | 0,173,78,32,265,46.5,1.159,58,0
490 | 4,99,72,17,0,25.6,0.294,28,0
491 | 8,194,80,0,0,26.1,0.551,67,0
492 | 2,83,65,28,66,36.8,0.629,24,0
493 | 2,89,90,30,0,33.5,0.292,42,0
494 | 4,99,68,38,0,32.8,0.145,33,0
495 | 4,125,70,18,122,28.9,1.144,45,1
496 | 3,80,0,0,0,0,0.174,22,0
497 | 6,166,74,0,0,26.6,0.304,66,0
498 | 5,110,68,0,0,26,0.292,30,0
499 | 2,81,72,15,76,30.1,0.547,25,0
500 | 7,195,70,33,145,25.1,0.163,55,1
501 | 6,154,74,32,193,29.3,0.839,39,0
502 | 2,117,90,19,71,25.2,0.313,21,0
503 | 3,84,72,32,0,37.2,0.267,28,0
504 | 6,0,68,41,0,39,0.727,41,1
505 | 7,94,64,25,79,33.3,0.738,41,0
506 | 3,96,78,39,0,37.3,0.238,40,0
507 | 10,75,82,0,0,33.3,0.263,38,0
508 | 0,180,90,26,90,36.5,0.314,35,1
509 | 1,130,60,23,170,28.6,0.692,21,0
510 | 2,84,50,23,76,30.4,0.968,21,0
511 | 8,120,78,0,0,25,0.409,64,0
512 | 12,84,72,31,0,29.7,0.297,46,1
513 | 0,139,62,17,210,22.1,0.207,21,0
514 | 9,91,68,0,0,24.2,0.2,58,0
515 | 2,91,62,0,0,27.3,0.525,22,0
516 | 3,99,54,19,86,25.6,0.154,24,0
517 | 3,163,70,18,105,31.6,0.268,28,1
518 | 9,145,88,34,165,30.3,0.771,53,1
519 | 7,125,86,0,0,37.6,0.304,51,0
520 | 13,76,60,0,0,32.8,0.18,41,0
521 | 6,129,90,7,326,19.6,0.582,60,0
522 | 2,68,70,32,66,25,0.187,25,0
523 | 3,124,80,33,130,33.2,0.305,26,0
524 | 6,114,0,0,0,0,0.189,26,0
525 | 9,130,70,0,0,34.2,0.652,45,1
526 | 3,125,58,0,0,31.6,0.151,24,0
527 | 3,87,60,18,0,21.8,0.444,21,0
528 | 1,97,64,19,82,18.2,0.299,21,0
529 | 3,116,74,15,105,26.3,0.107,24,0
530 | 0,117,66,31,188,30.8,0.493,22,0
531 | 0,111,65,0,0,24.6,0.66,31,0
532 | 2,122,60,18,106,29.8,0.717,22,0
533 | 0,107,76,0,0,45.3,0.686,24,0
534 | 1,86,66,52,65,41.3,0.917,29,0
535 | 6,91,0,0,0,29.8,0.501,31,0
536 | 1,77,56,30,56,33.3,1.251,24,0
537 | 4,132,0,0,0,32.9,0.302,23,1
538 | 0,105,90,0,0,29.6,0.197,46,0
539 | 0,57,60,0,0,21.7,0.735,67,0
540 | 0,127,80,37,210,36.3,0.804,23,0
541 | 3,129,92,49,155,36.4,0.968,32,1
542 | 8,100,74,40,215,39.4,0.661,43,1
543 | 3,128,72,25,190,32.4,0.549,27,1
544 | 10,90,85,32,0,34.9,0.825,56,1
545 | 4,84,90,23,56,39.5,0.159,25,0
546 | 1,88,78,29,76,32,0.365,29,0
547 | 8,186,90,35,225,34.5,0.423,37,1
548 | 5,187,76,27,207,43.6,1.034,53,1
549 | 4,131,68,21,166,33.1,0.16,28,0
550 | 1,164,82,43,67,32.8,0.341,50,0
551 | 4,189,110,31,0,28.5,0.68,37,0
552 | 1,116,70,28,0,27.4,0.204,21,0
553 | 3,84,68,30,106,31.9,0.591,25,0
554 | 6,114,88,0,0,27.8,0.247,66,0
555 | 1,88,62,24,44,29.9,0.422,23,0
556 | 1,84,64,23,115,36.9,0.471,28,0
557 | 7,124,70,33,215,25.5,0.161,37,0
558 | 1,97,70,40,0,38.1,0.218,30,0
559 | 8,110,76,0,0,27.8,0.237,58,0
560 | 11,103,68,40,0,46.2,0.126,42,0
561 | 11,85,74,0,0,30.1,0.3,35,0
562 | 6,125,76,0,0,33.8,0.121,54,1
563 | 0,198,66,32,274,41.3,0.502,28,1
564 | 1,87,68,34,77,37.6,0.401,24,0
565 | 6,99,60,19,54,26.9,0.497,32,0
566 | 0,91,80,0,0,32.4,0.601,27,0
567 | 2,95,54,14,88,26.1,0.748,22,0
568 | 1,99,72,30,18,38.6,0.412,21,0
569 | 6,92,62,32,126,32,0.085,46,0
570 | 4,154,72,29,126,31.3,0.338,37,0
571 | 0,121,66,30,165,34.3,0.203,33,1
572 | 3,78,70,0,0,32.5,0.27,39,0
573 | 2,130,96,0,0,22.6,0.268,21,0
574 | 3,111,58,31,44,29.5,0.43,22,0
575 | 2,98,60,17,120,34.7,0.198,22,0
576 | 1,143,86,30,330,30.1,0.892,23,0
577 | 1,119,44,47,63,35.5,0.28,25,0
578 | 6,108,44,20,130,24,0.813,35,0
579 | 2,118,80,0,0,42.9,0.693,21,1
580 | 10,133,68,0,0,27,0.245,36,0
581 | 2,197,70,99,0,34.7,0.575,62,1
582 | 0,151,90,46,0,42.1,0.371,21,1
583 | 6,109,60,27,0,25,0.206,27,0
584 | 12,121,78,17,0,26.5,0.259,62,0
585 | 8,100,76,0,0,38.7,0.19,42,0
586 | 8,124,76,24,600,28.7,0.687,52,1
587 | 1,93,56,11,0,22.5,0.417,22,0
588 | 8,143,66,0,0,34.9,0.129,41,1
589 | 6,103,66,0,0,24.3,0.249,29,0
590 | 3,176,86,27,156,33.3,1.154,52,1
591 | 0,73,0,0,0,21.1,0.342,25,0
592 | 11,111,84,40,0,46.8,0.925,45,1
593 | 2,112,78,50,140,39.4,0.175,24,0
594 | 3,132,80,0,0,34.4,0.402,44,1
595 | 2,82,52,22,115,28.5,1.699,25,0
596 | 6,123,72,45,230,33.6,0.733,34,0
597 | 0,188,82,14,185,32,0.682,22,1
598 | 0,67,76,0,0,45.3,0.194,46,0
599 | 1,89,24,19,25,27.8,0.559,21,0
600 | 1,173,74,0,0,36.8,0.088,38,1
601 | 1,109,38,18,120,23.1,0.407,26,0
602 | 1,108,88,19,0,27.1,0.4,24,0
603 | 6,96,0,0,0,23.7,0.19,28,0
604 | 1,124,74,36,0,27.8,0.1,30,0
605 | 7,150,78,29,126,35.2,0.692,54,1
606 | 4,183,0,0,0,28.4,0.212,36,1
607 | 1,124,60,32,0,35.8,0.514,21,0
608 | 1,181,78,42,293,40,1.258,22,1
609 | 1,92,62,25,41,19.5,0.482,25,0
610 | 0,152,82,39,272,41.5,0.27,27,0
611 | 1,111,62,13,182,24,0.138,23,0
612 | 3,106,54,21,158,30.9,0.292,24,0
613 | 3,174,58,22,194,32.9,0.593,36,1
614 | 7,168,88,42,321,38.2,0.787,40,1
615 | 6,105,80,28,0,32.5,0.878,26,0
616 | 11,138,74,26,144,36.1,0.557,50,1
617 | 3,106,72,0,0,25.8,0.207,27,0
618 | 6,117,96,0,0,28.7,0.157,30,0
619 | 2,68,62,13,15,20.1,0.257,23,0
620 | 9,112,82,24,0,28.2,1.282,50,1
621 | 0,119,0,0,0,32.4,0.141,24,1
622 | 2,112,86,42,160,38.4,0.246,28,0
623 | 2,92,76,20,0,24.2,1.698,28,0
624 | 6,183,94,0,0,40.8,1.461,45,0
625 | 0,94,70,27,115,43.5,0.347,21,0
626 | 2,108,64,0,0,30.8,0.158,21,0
627 | 4,90,88,47,54,37.7,0.362,29,0
628 | 0,125,68,0,0,24.7,0.206,21,0
629 | 0,132,78,0,0,32.4,0.393,21,0
630 | 5,128,80,0,0,34.6,0.144,45,0
631 | 4,94,65,22,0,24.7,0.148,21,0
632 | 7,114,64,0,0,27.4,0.732,34,1
633 | 0,102,78,40,90,34.5,0.238,24,0
634 | 2,111,60,0,0,26.2,0.343,23,0
635 | 1,128,82,17,183,27.5,0.115,22,0
636 | 10,92,62,0,0,25.9,0.167,31,0
637 | 13,104,72,0,0,31.2,0.465,38,1
638 | 5,104,74,0,0,28.8,0.153,48,0
639 | 2,94,76,18,66,31.6,0.649,23,0
640 | 7,97,76,32,91,40.9,0.871,32,1
641 | 1,100,74,12,46,19.5,0.149,28,0
642 | 0,102,86,17,105,29.3,0.695,27,0
643 | 4,128,70,0,0,34.3,0.303,24,0
644 | 6,147,80,0,0,29.5,0.178,50,1
645 | 4,90,0,0,0,28,0.61,31,0
646 | 3,103,72,30,152,27.6,0.73,27,0
647 | 2,157,74,35,440,39.4,0.134,30,0
648 | 1,167,74,17,144,23.4,0.447,33,1
649 | 0,179,50,36,159,37.8,0.455,22,1
650 | 11,136,84,35,130,28.3,0.26,42,1
651 | 0,107,60,25,0,26.4,0.133,23,0
652 | 1,91,54,25,100,25.2,0.234,23,0
653 | 1,117,60,23,106,33.8,0.466,27,0
654 | 5,123,74,40,77,34.1,0.269,28,0
655 | 2,120,54,0,0,26.8,0.455,27,0
656 | 1,106,70,28,135,34.2,0.142,22,0
657 | 2,155,52,27,540,38.7,0.24,25,1
658 | 2,101,58,35,90,21.8,0.155,22,0
659 | 1,120,80,48,200,38.9,1.162,41,0
660 | 11,127,106,0,0,39,0.19,51,0
661 | 3,80,82,31,70,34.2,1.292,27,1
662 | 10,162,84,0,0,27.7,0.182,54,0
663 | 1,199,76,43,0,42.9,1.394,22,1
664 | 8,167,106,46,231,37.6,0.165,43,1
665 | 9,145,80,46,130,37.9,0.637,40,1
666 | 6,115,60,39,0,33.7,0.245,40,1
667 | 1,112,80,45,132,34.8,0.217,24,0
668 | 4,145,82,18,0,32.5,0.235,70,1
669 | 10,111,70,27,0,27.5,0.141,40,1
670 | 6,98,58,33,190,34,0.43,43,0
671 | 9,154,78,30,100,30.9,0.164,45,0
672 | 6,165,68,26,168,33.6,0.631,49,0
673 | 1,99,58,10,0,25.4,0.551,21,0
674 | 10,68,106,23,49,35.5,0.285,47,0
675 | 3,123,100,35,240,57.3,0.88,22,0
676 | 8,91,82,0,0,35.6,0.587,68,0
677 | 6,195,70,0,0,30.9,0.328,31,1
678 | 9,156,86,0,0,24.8,0.23,53,1
679 | 0,93,60,0,0,35.3,0.263,25,0
680 | 3,121,52,0,0,36,0.127,25,1
681 | 2,101,58,17,265,24.2,0.614,23,0
682 | 2,56,56,28,45,24.2,0.332,22,0
683 | 0,162,76,36,0,49.6,0.364,26,1
684 | 0,95,64,39,105,44.6,0.366,22,0
685 | 4,125,80,0,0,32.3,0.536,27,1
686 | 5,136,82,0,0,0,0.64,69,0
687 | 2,129,74,26,205,33.2,0.591,25,0
688 | 3,130,64,0,0,23.1,0.314,22,0
689 | 1,107,50,19,0,28.3,0.181,29,0
690 | 1,140,74,26,180,24.1,0.828,23,0
691 | 1,144,82,46,180,46.1,0.335,46,1
692 | 8,107,80,0,0,24.6,0.856,34,0
693 | 13,158,114,0,0,42.3,0.257,44,1
694 | 2,121,70,32,95,39.1,0.886,23,0
695 | 7,129,68,49,125,38.5,0.439,43,1
696 | 2,90,60,0,0,23.5,0.191,25,0
697 | 7,142,90,24,480,30.4,0.128,43,1
698 | 3,169,74,19,125,29.9,0.268,31,1
699 | 0,99,0,0,0,25,0.253,22,0
700 | 4,127,88,11,155,34.5,0.598,28,0
701 | 4,118,70,0,0,44.5,0.904,26,0
702 | 2,122,76,27,200,35.9,0.483,26,0
703 | 6,125,78,31,0,27.6,0.565,49,1
704 | 1,168,88,29,0,35,0.905,52,1
705 | 2,129,0,0,0,38.5,0.304,41,0
706 | 4,110,76,20,100,28.4,0.118,27,0
707 | 6,80,80,36,0,39.8,0.177,28,0
708 | 10,115,0,0,0,0,0.261,30,1
709 | 2,127,46,21,335,34.4,0.176,22,0
710 | 9,164,78,0,0,32.8,0.148,45,1
711 | 2,93,64,32,160,38,0.674,23,1
712 | 3,158,64,13,387,31.2,0.295,24,0
713 | 5,126,78,27,22,29.6,0.439,40,0
714 | 10,129,62,36,0,41.2,0.441,38,1
715 | 0,134,58,20,291,26.4,0.352,21,0
716 | 3,102,74,0,0,29.5,0.121,32,0
717 | 7,187,50,33,392,33.9,0.826,34,1
718 | 3,173,78,39,185,33.8,0.97,31,1
719 | 10,94,72,18,0,23.1,0.595,56,0
720 | 1,108,60,46,178,35.5,0.415,24,0
721 | 5,97,76,27,0,35.6,0.378,52,1
722 | 4,83,86,19,0,29.3,0.317,34,0
723 | 1,114,66,36,200,38.1,0.289,21,0
724 | 1,149,68,29,127,29.3,0.349,42,1
725 | 5,117,86,30,105,39.1,0.251,42,0
726 | 1,111,94,0,0,32.8,0.265,45,0
727 | 4,112,78,40,0,39.4,0.236,38,0
728 | 1,116,78,29,180,36.1,0.496,25,0
729 | 0,141,84,26,0,32.4,0.433,22,0
730 | 2,175,88,0,0,22.9,0.326,22,0
731 | 2,92,52,0,0,30.1,0.141,22,0
732 | 3,130,78,23,79,28.4,0.323,34,1
733 | 8,120,86,0,0,28.4,0.259,22,1
734 | 2,174,88,37,120,44.5,0.646,24,1
735 | 2,106,56,27,165,29,0.426,22,0
736 | 2,105,75,0,0,23.3,0.56,53,0
737 | 4,95,60,32,0,35.4,0.284,28,0
738 | 0,126,86,27,120,27.4,0.515,21,0
739 | 8,65,72,23,0,32,0.6,42,0
740 | 2,99,60,17,160,36.6,0.453,21,0
741 | 1,102,74,0,0,39.5,0.293,42,1
742 | 11,120,80,37,150,42.3,0.785,48,1
743 | 3,102,44,20,94,30.8,0.4,26,0
744 | 1,109,58,18,116,28.5,0.219,22,0
745 | 9,140,94,0,0,32.7,0.734,45,1
746 | 13,153,88,37,140,40.6,1.174,39,0
747 | 12,100,84,33,105,30,0.488,46,0
748 | 1,147,94,41,0,49.3,0.358,27,1
749 | 1,81,74,41,57,46.3,1.096,32,0
750 | 3,187,70,22,200,36.4,0.408,36,1
751 | 6,162,62,0,0,24.3,0.178,50,1
752 | 4,136,70,0,0,31.2,1.182,22,1
753 | 1,121,78,39,74,39,0.261,28,0
754 | 3,108,62,24,0,26,0.223,25,0
755 | 0,181,88,44,510,43.3,0.222,26,1
756 | 8,154,78,32,0,32.4,0.443,45,1
757 | 1,128,88,39,110,36.5,1.057,37,1
758 | 7,137,90,41,0,32,0.391,39,0
759 | 0,123,72,0,0,36.3,0.258,52,1
760 | 1,106,76,0,0,37.5,0.197,26,0
761 | 6,190,92,0,0,35.5,0.278,66,1
762 | 2,88,58,26,16,28.4,0.766,22,0
763 | 9,170,74,31,0,44,0.403,43,1
764 | 9,89,62,0,0,22.5,0.142,33,0
765 | 10,101,76,48,180,32.9,0.171,63,0
766 | 2,122,70,27,0,36.8,0.34,27,0
767 | 5,121,72,23,112,26.2,0.245,30,0
768 | 1,126,60,0,0,30.1,0.349,47,1
769 | 1,93,70,31,0,30.4,0.315,23,0
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Ritesh
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Linear Regression/50_Startups.csv:
--------------------------------------------------------------------------------
1 | R&D Spend,Administration,Marketing Spend,State,Profit
2 | 165349.2,136897.8,471784.1,New York,192261.83
3 | 162597.7,151377.59,443898.53,California,191792.06
4 | 153441.51,101145.55,407934.54,Florida,191050.39
5 | 144372.41,118671.85,383199.62,New York,182901.99
6 | 142107.34,91391.77,366168.42,Florida,166187.94
7 | 131876.9,99814.71,362861.36,New York,156991.12
8 | 134615.46,147198.87,127716.82,California,156122.51
9 | 130298.13,145530.06,323876.68,Florida,155752.6
10 | 120542.52,148718.95,311613.29,New York,152211.77
11 | 123334.88,108679.17,304981.62,California,149759.96
12 | 101913.08,110594.11,229160.95,Florida,146121.95
13 | 100671.96,91790.61,249744.55,California,144259.4
14 | 93863.75,127320.38,249839.44,Florida,141585.52
15 | 91992.39,135495.07,252664.93,California,134307.35
16 | 119943.24,156547.42,256512.92,Florida,132602.65
17 | 114523.61,122616.84,261776.23,New York,129917.04
18 | 78013.11,121597.55,264346.06,California,126992.93
19 | 94657.16,145077.58,282574.31,New York,125370.37
20 | 91749.16,114175.79,294919.57,Florida,124266.9
21 | 86419.7,153514.11,0,New York,122776.86
22 | 76253.86,113867.3,298664.47,California,118474.03
23 | 78389.47,153773.43,299737.29,New York,111313.02
24 | 73994.56,122782.75,303319.26,Florida,110352.25
25 | 67532.53,105751.03,304768.73,Florida,108733.99
26 | 77044.01,99281.34,140574.81,New York,108552.04
27 | 64664.71,139553.16,137962.62,California,107404.34
28 | 75328.87,144135.98,134050.07,Florida,105733.54
29 | 72107.6,127864.55,353183.81,New York,105008.31
30 | 66051.52,182645.56,118148.2,Florida,103282.38
31 | 65605.48,153032.06,107138.38,New York,101004.64
32 | 61994.48,115641.28,91131.24,Florida,99937.59
33 | 61136.38,152701.92,88218.23,New York,97483.56
34 | 63408.86,129219.61,46085.25,California,97427.84
35 | 55493.95,103057.49,214634.81,Florida,96778.92
36 | 46426.07,157693.92,210797.67,California,96712.8
37 | 46014.02,85047.44,205517.64,New York,96479.51
38 | 28663.76,127056.21,201126.82,Florida,90708.19
39 | 44069.95,51283.14,197029.42,California,89949.14
40 | 20229.59,65947.93,185265.1,New York,81229.06
41 | 38558.51,82982.09,174999.3,California,81005.76
42 | 28754.33,118546.05,172795.67,California,78239.91
43 | 27892.92,84710.77,164470.71,Florida,77798.83
44 | 23640.93,96189.63,148001.11,California,71498.49
45 | 15505.73,127382.3,35534.17,New York,69758.98
46 | 22177.74,154806.14,28334.72,California,65200.33
47 | 1000.23,124153.04,1903.93,New York,64926.08
48 | 1315.46,115816.21,297114.46,Florida,49490.75
49 | 0,135426.92,0,California,42559.73
50 | 542.05,51743.15,0,New York,35673.41
51 | 0,116983.8,45173.06,California,14681.4
--------------------------------------------------------------------------------
/Linear Regression/Multivariate_Linear_Regression.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "Multivariate_Linear_Regression.ipynb",
7 | "provenance": [],
8 | "collapsed_sections": []
9 | },
10 | "kernelspec": {
11 | "name": "python3",
12 | "display_name": "Python 3"
13 | },
14 | "language_info": {
15 | "name": "python"
16 | }
17 | },
18 | "cells": [
19 | {
20 | "cell_type": "code",
21 | "metadata": {
22 | "id": "H-tX-aTL48VU"
23 | },
24 | "source": [
25 | "import numpy as np\n",
26 | "import matplotlib.pyplot as plt\n",
27 | "import pandas as pd\n"
28 | ],
29 | "execution_count": null,
30 | "outputs": []
31 | },
32 | {
33 | "cell_type": "code",
34 | "metadata": {
35 | "colab": {
36 | "base_uri": "https://localhost:8080/"
37 | },
38 | "id": "WNUNF_gC9UJ8",
39 | "outputId": "b3ddf5c5-a109-4815-b123-29321c855267"
40 | },
41 | "source": [
42 | "dataset = pd.read_csv('/content/50_Startups.csv')\n",
43 | "X = dataset.iloc[:, :-1].values\n",
44 | "y = dataset.iloc[:, -1].values\n",
45 | "print(X)"
46 | ],
47 | "execution_count": null,
48 | "outputs": [
49 | {
50 | "output_type": "stream",
51 | "name": "stdout",
52 | "text": [
53 | "[[165349.2 136897.8 471784.1 'New York']\n",
54 | " [162597.7 151377.59 443898.53 'California']\n",
55 | " [153441.51 101145.55 407934.54 'Florida']\n",
56 | " [144372.41 118671.85 383199.62 'New York']\n",
57 | " [142107.34 91391.77 366168.42 'Florida']\n",
58 | " [131876.9 99814.71 362861.36 'New York']\n",
59 | " [134615.46 147198.87 127716.82 'California']\n",
60 | " [130298.13 145530.06 323876.68 'Florida']\n",
61 | " [120542.52 148718.95 311613.29 'New York']\n",
62 | " [123334.88 108679.17 304981.62 'California']\n",
63 | " [101913.08 110594.11 229160.95 'Florida']\n",
64 | " [100671.96 91790.61 249744.55 'California']\n",
65 | " [93863.75 127320.38 249839.44 'Florida']\n",
66 | " [91992.39 135495.07 252664.93 'California']\n",
67 | " [119943.24 156547.42 256512.92 'Florida']\n",
68 | " [114523.61 122616.84 261776.23 'New York']\n",
69 | " [78013.11 121597.55 264346.06 'California']\n",
70 | " [94657.16 145077.58 282574.31 'New York']\n",
71 | " [91749.16 114175.79 294919.57 'Florida']\n",
72 | " [86419.7 153514.11 0.0 'New York']\n",
73 | " [76253.86 113867.3 298664.47 'California']\n",
74 | " [78389.47 153773.43 299737.29 'New York']\n",
75 | " [73994.56 122782.75 303319.26 'Florida']\n",
76 | " [67532.53 105751.03 304768.73 'Florida']\n",
77 | " [77044.01 99281.34 140574.81 'New York']\n",
78 | " [64664.71 139553.16 137962.62 'California']\n",
79 | " [75328.87 144135.98 134050.07 'Florida']\n",
80 | " [72107.6 127864.55 353183.81 'New York']\n",
81 | " [66051.52 182645.56 118148.2 'Florida']\n",
82 | " [65605.48 153032.06 107138.38 'New York']\n",
83 | " [61994.48 115641.28 91131.24 'Florida']\n",
84 | " [61136.38 152701.92 88218.23 'New York']\n",
85 | " [63408.86 129219.61 46085.25 'California']\n",
86 | " [55493.95 103057.49 214634.81 'Florida']\n",
87 | " [46426.07 157693.92 210797.67 'California']\n",
88 | " [46014.02 85047.44 205517.64 'New York']\n",
89 | " [28663.76 127056.21 201126.82 'Florida']\n",
90 | " [44069.95 51283.14 197029.42 'California']\n",
91 | " [20229.59 65947.93 185265.1 'New York']\n",
92 | " [38558.51 82982.09 174999.3 'California']\n",
93 | " [28754.33 118546.05 172795.67 'California']\n",
94 | " [27892.92 84710.77 164470.71 'Florida']\n",
95 | " [23640.93 96189.63 148001.11 'California']\n",
96 | " [15505.73 127382.3 35534.17 'New York']\n",
97 | " [22177.74 154806.14 28334.72 'California']\n",
98 | " [1000.23 124153.04 1903.93 'New York']\n",
99 | " [1315.46 115816.21 297114.46 'Florida']\n",
100 | " [0.0 135426.92 0.0 'California']\n",
101 | " [542.05 51743.15 0.0 'New York']\n",
102 | " [0.0 116983.8 45173.06 'California']]\n"
103 | ]
104 | }
105 | ]
106 | },
107 | {
108 | "cell_type": "code",
109 | "metadata": {
110 | "colab": {
111 | "base_uri": "https://localhost:8080/"
112 | },
113 | "id": "_d3N2zmC9eT9",
114 | "outputId": "5320294d-a030-4d49-dacc-b6c503283add"
115 | },
116 | "source": [
117 | "from sklearn.compose import ColumnTransformer\n",
118 | "from sklearn.preprocessing import OneHotEncoder\n",
119 | "ct = ColumnTransformer(transformers=[('encoder', OneHotEncoder(), [3])], remainder='passthrough')\n",
120 | "X = np.array(ct.fit_transform(X))\n",
121 | "print(X)\n"
122 | ],
123 | "execution_count": null,
124 | "outputs": [
125 | {
126 | "output_type": "stream",
127 | "name": "stdout",
128 | "text": [
129 | "[[0.0 0.0 1.0 165349.2 136897.8 471784.1]\n",
130 | " [1.0 0.0 0.0 162597.7 151377.59 443898.53]\n",
131 | " [0.0 1.0 0.0 153441.51 101145.55 407934.54]\n",
132 | " [0.0 0.0 1.0 144372.41 118671.85 383199.62]\n",
133 | " [0.0 1.0 0.0 142107.34 91391.77 366168.42]\n",
134 | " [0.0 0.0 1.0 131876.9 99814.71 362861.36]\n",
135 | " [1.0 0.0 0.0 134615.46 147198.87 127716.82]\n",
136 | " [0.0 1.0 0.0 130298.13 145530.06 323876.68]\n",
137 | " [0.0 0.0 1.0 120542.52 148718.95 311613.29]\n",
138 | " [1.0 0.0 0.0 123334.88 108679.17 304981.62]\n",
139 | " [0.0 1.0 0.0 101913.08 110594.11 229160.95]\n",
140 | " [1.0 0.0 0.0 100671.96 91790.61 249744.55]\n",
141 | " [0.0 1.0 0.0 93863.75 127320.38 249839.44]\n",
142 | " [1.0 0.0 0.0 91992.39 135495.07 252664.93]\n",
143 | " [0.0 1.0 0.0 119943.24 156547.42 256512.92]\n",
144 | " [0.0 0.0 1.0 114523.61 122616.84 261776.23]\n",
145 | " [1.0 0.0 0.0 78013.11 121597.55 264346.06]\n",
146 | " [0.0 0.0 1.0 94657.16 145077.58 282574.31]\n",
147 | " [0.0 1.0 0.0 91749.16 114175.79 294919.57]\n",
148 | " [0.0 0.0 1.0 86419.7 153514.11 0.0]\n",
149 | " [1.0 0.0 0.0 76253.86 113867.3 298664.47]\n",
150 | " [0.0 0.0 1.0 78389.47 153773.43 299737.29]\n",
151 | " [0.0 1.0 0.0 73994.56 122782.75 303319.26]\n",
152 | " [0.0 1.0 0.0 67532.53 105751.03 304768.73]\n",
153 | " [0.0 0.0 1.0 77044.01 99281.34 140574.81]\n",
154 | " [1.0 0.0 0.0 64664.71 139553.16 137962.62]\n",
155 | " [0.0 1.0 0.0 75328.87 144135.98 134050.07]\n",
156 | " [0.0 0.0 1.0 72107.6 127864.55 353183.81]\n",
157 | " [0.0 1.0 0.0 66051.52 182645.56 118148.2]\n",
158 | " [0.0 0.0 1.0 65605.48 153032.06 107138.38]\n",
159 | " [0.0 1.0 0.0 61994.48 115641.28 91131.24]\n",
160 | " [0.0 0.0 1.0 61136.38 152701.92 88218.23]\n",
161 | " [1.0 0.0 0.0 63408.86 129219.61 46085.25]\n",
162 | " [0.0 1.0 0.0 55493.95 103057.49 214634.81]\n",
163 | " [1.0 0.0 0.0 46426.07 157693.92 210797.67]\n",
164 | " [0.0 0.0 1.0 46014.02 85047.44 205517.64]\n",
165 | " [0.0 1.0 0.0 28663.76 127056.21 201126.82]\n",
166 | " [1.0 0.0 0.0 44069.95 51283.14 197029.42]\n",
167 | " [0.0 0.0 1.0 20229.59 65947.93 185265.1]\n",
168 | " [1.0 0.0 0.0 38558.51 82982.09 174999.3]\n",
169 | " [1.0 0.0 0.0 28754.33 118546.05 172795.67]\n",
170 | " [0.0 1.0 0.0 27892.92 84710.77 164470.71]\n",
171 | " [1.0 0.0 0.0 23640.93 96189.63 148001.11]\n",
172 | " [0.0 0.0 1.0 15505.73 127382.3 35534.17]\n",
173 | " [1.0 0.0 0.0 22177.74 154806.14 28334.72]\n",
174 | " [0.0 0.0 1.0 1000.23 124153.04 1903.93]\n",
175 | " [0.0 1.0 0.0 1315.46 115816.21 297114.46]\n",
176 | " [1.0 0.0 0.0 0.0 135426.92 0.0]\n",
177 | " [0.0 0.0 1.0 542.05 51743.15 0.0]\n",
178 | " [1.0 0.0 0.0 0.0 116983.8 45173.06]]\n"
179 | ]
180 | }
181 | ]
182 | },
183 | {
184 | "cell_type": "code",
185 | "metadata": {
186 | "id": "siMIkaSf9q1w"
187 | },
188 | "source": [
189 | "from sklearn.model_selection import train_test_split\n",
190 | "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2, random_state = 0)"
191 | ],
192 | "execution_count": null,
193 | "outputs": []
194 | },
195 | {
196 | "cell_type": "code",
197 | "metadata": {
198 | "colab": {
199 | "base_uri": "https://localhost:8080/"
200 | },
201 | "id": "f1I4Tmgv9rDk",
202 | "outputId": "6b67ef11-eafb-486f-eb46-d61348b6f675"
203 | },
204 | "source": [
205 | "from sklearn.linear_model import LinearRegression\n",
206 | "regressor = LinearRegression()\n",
207 | "regressor.fit(X_train, y_train)"
208 | ],
209 | "execution_count": null,
210 | "outputs": [
211 | {
212 | "output_type": "execute_result",
213 | "data": {
214 | "text/plain": [
215 | "LinearRegression(copy_X=True, fit_intercept=True, n_jobs=None, normalize=False)"
216 | ]
217 | },
218 | "metadata": {},
219 | "execution_count": 38
220 | }
221 | ]
222 | },
223 | {
224 | "cell_type": "code",
225 | "metadata": {
226 | "colab": {
227 | "base_uri": "https://localhost:8080/"
228 | },
229 | "id": "-qsaF-359rGx",
230 | "outputId": "434f9af2-efae-490c-e657-ffaee2e87ac8"
231 | },
232 | "source": [
233 | "y_pred = regressor.predict(X_test)\n",
234 | "np.set_printoptions(precision=2)\n",
235 | "print(np.concatenate((y_pred.reshape(len(y_pred),1), y_test.reshape(len(y_test),1)),1))"
236 | ],
237 | "execution_count": null,
238 | "outputs": [
239 | {
240 | "output_type": "stream",
241 | "name": "stdout",
242 | "text": [
243 | "[[103015.2 103282.38]\n",
244 | " [132582.28 144259.4 ]\n",
245 | " [132447.74 146121.95]\n",
246 | " [ 71976.1 77798.83]\n",
247 | " [178537.48 191050.39]\n",
248 | " [116161.24 105008.31]\n",
249 | " [ 67851.69 81229.06]\n",
250 | " [ 98791.73 97483.56]\n",
251 | " [113969.44 110352.25]\n",
252 | " [167921.07 166187.94]]\n"
253 | ]
254 | }
255 | ]
256 | }
257 | ]
258 | }
--------------------------------------------------------------------------------
/Logistic Regression/logistic_regression.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "logistic_regression.ipynb",
7 | "provenance": [],
8 | "collapsed_sections": [],
9 | "machine_shape": "hm"
10 | },
11 | "kernelspec": {
12 | "name": "python3",
13 | "display_name": "Python 3"
14 | }
15 | },
16 | "cells": [
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {
20 | "id": "0MRC0e0KhQ0S"
21 | },
22 | "source": [
23 | "# Logistic Regression"
24 | ]
25 | },
26 | {
27 | "cell_type": "markdown",
28 | "metadata": {
29 | "id": "LWd1UlMnhT2s"
30 | },
31 | "source": [
32 | "## Importing the libraries"
33 | ]
34 | },
35 | {
36 | "cell_type": "code",
37 | "metadata": {
38 | "id": "YvGPUQaHhXfL"
39 | },
40 | "source": [
41 | "import numpy as np\n",
42 | "import matplotlib.pyplot as plt\n",
43 | "import pandas as pd"
44 | ],
45 | "execution_count": null,
46 | "outputs": []
47 | },
48 | {
49 | "cell_type": "markdown",
50 | "metadata": {
51 | "id": "K1VMqkGvhc3-"
52 | },
53 | "source": [
54 | "## Importing the dataset"
55 | ]
56 | },
57 | {
58 | "cell_type": "code",
59 | "metadata": {
60 | "id": "M52QDmyzhh9s"
61 | },
62 | "source": [
63 | "dataset = pd.read_csv('/content/Data.csv')\n",
64 | "X = dataset.iloc[:, :-1].values\n",
65 | "y = dataset.iloc[:, -1].values"
66 | ],
67 | "execution_count": null,
68 | "outputs": []
69 | },
70 | {
71 | "cell_type": "markdown",
72 | "metadata": {
73 | "id": "YvxIPVyMhmKp"
74 | },
75 | "source": [
76 | "## Splitting the dataset into the Training set and Test set"
77 | ]
78 | },
79 | {
80 | "cell_type": "code",
81 | "metadata": {
82 | "id": "AVzJWAXIhxoC"
83 | },
84 | "source": [
85 | "from sklearn.model_selection import train_test_split\n",
86 | "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.25, random_state = 0)"
87 | ],
88 | "execution_count": null,
89 | "outputs": []
90 | },
91 | {
92 | "cell_type": "markdown",
93 | "metadata": {
94 | "id": "kW3c7UYih0hT"
95 | },
96 | "source": [
97 | "## Feature Scaling"
98 | ]
99 | },
100 | {
101 | "cell_type": "code",
102 | "metadata": {
103 | "id": "9fQlDPKCh8sc"
104 | },
105 | "source": [
106 | "from sklearn.linear_model import LogisticRegression\n",
107 | "sc = StandardScaler()\n",
108 | "X_train = sc.fit_transform(X_train)\n",
109 | "X_test = sc.transform(X_test)"
110 | ],
111 | "execution_count": null,
112 | "outputs": []
113 | },
114 | {
115 | "cell_type": "markdown",
116 | "metadata": {
117 | "id": "bb6jCOCQiAmP"
118 | },
119 | "source": [
120 | "## Training the Logistic Regression model on the Training set"
121 | ]
122 | },
123 | {
124 | "cell_type": "code",
125 | "metadata": {
126 | "id": "-_o-mE-x6M2p"
127 | },
128 | "source": [
129 | "from sklearn.linear_model import LogisticRegression\n",
130 | "classifier = LogisticRegression(random_state = 0)\n",
131 | "classifier.fit(X_train, y_train)"
132 | ],
133 | "execution_count": null,
134 | "outputs": []
135 | },
136 | {
137 | "cell_type": "markdown",
138 | "metadata": {
139 | "id": "h4Hwj34ziWQW"
140 | },
141 | "source": [
142 | "## Making the Confusion Matrix"
143 | ]
144 | },
145 | {
146 | "cell_type": "code",
147 | "metadata": {
148 | "id": "D6bpZwUiiXic"
149 | },
150 | "source": [
151 | "from sklearn.metrics import confusion_matrix, accuracy_score\n",
152 | "y_pred = classifier.predict(X_test)\n",
153 | "cm = confusion_matrix(y_test, y_pred)\n",
154 | "print(cm)\n",
155 | "accuracy_score(y_test, y_pred)"
156 | ],
157 | "execution_count": null,
158 | "outputs": []
159 | }
160 | ]
161 | }
--------------------------------------------------------------------------------
/Naive Bayes/Naive_Bayes.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "Naive_Bayes.ipynb",
7 | "provenance": [],
8 | "collapsed_sections": [],
9 | "machine_shape": "hm"
10 | },
11 | "kernelspec": {
12 | "name": "python3",
13 | "display_name": "Python 3"
14 | }
15 | },
16 | "cells": [
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {
20 | "id": "0MRC0e0KhQ0S"
21 | },
22 | "source": [
23 | "# Naive Bayes"
24 | ]
25 | },
26 | {
27 | "cell_type": "markdown",
28 | "metadata": {
29 | "id": "LWd1UlMnhT2s"
30 | },
31 | "source": [
32 | "## Importing the libraries"
33 | ]
34 | },
35 | {
36 | "cell_type": "code",
37 | "metadata": {
38 | "id": "YvGPUQaHhXfL"
39 | },
40 | "source": [
41 | "import numpy as np\n",
42 | "import matplotlib.pyplot as plt\n",
43 | "import pandas as pd"
44 | ],
45 | "execution_count": null,
46 | "outputs": []
47 | },
48 | {
49 | "cell_type": "markdown",
50 | "metadata": {
51 | "id": "K1VMqkGvhc3-"
52 | },
53 | "source": [
54 | "## Importing the dataset"
55 | ]
56 | },
57 | {
58 | "cell_type": "code",
59 | "metadata": {
60 | "id": "M52QDmyzhh9s"
61 | },
62 | "source": [
63 | "dataset = pd.read_csv('/content/diabetes.csv')\n",
64 | "X = dataset.iloc[:, :-1].values\n",
65 | "y = dataset.iloc[:, -1].values"
66 | ],
67 | "execution_count": null,
68 | "outputs": []
69 | },
70 | {
71 | "cell_type": "markdown",
72 | "metadata": {
73 | "id": "YvxIPVyMhmKp"
74 | },
75 | "source": [
76 | "## Splitting the dataset into the Training set and Test set"
77 | ]
78 | },
79 | {
80 | "cell_type": "code",
81 | "metadata": {
82 | "id": "AVzJWAXIhxoC"
83 | },
84 | "source": [
85 | "from sklearn.model_selection import train_test_split\n",
86 | "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.25, random_state = 0)"
87 | ],
88 | "execution_count": null,
89 | "outputs": []
90 | },
91 | {
92 | "cell_type": "markdown",
93 | "metadata": {
94 | "id": "kW3c7UYih0hT"
95 | },
96 | "source": [
97 | "## Feature Scaling"
98 | ]
99 | },
100 | {
101 | "cell_type": "code",
102 | "metadata": {
103 | "id": "9fQlDPKCh8sc"
104 | },
105 | "source": [
106 | "from sklearn.preprocessing import StandardScaler\n",
107 | "sc = StandardScaler()\n",
108 | "X_train = sc.fit_transform(X_train)\n",
109 | "X_test = sc.transform(X_test)"
110 | ],
111 | "execution_count": null,
112 | "outputs": []
113 | },
114 | {
115 | "cell_type": "markdown",
116 | "metadata": {
117 | "id": "bb6jCOCQiAmP"
118 | },
119 | "source": [
120 | "## Training the Naive Bayes model on the Training set"
121 | ]
122 | },
123 | {
124 | "cell_type": "code",
125 | "metadata": {
126 | "id": "e0pFVAmciHQs",
127 | "colab": {
128 | "base_uri": "https://localhost:8080/"
129 | },
130 | "outputId": "93b0aad9-27f5-45f9-afb6-c57350cab8c3"
131 | },
132 | "source": [
133 | "from sklearn.naive_bayes import GaussianNB\n",
134 | "classifier = GaussianNB()\n",
135 | "classifier.fit(X_train, y_train)"
136 | ],
137 | "execution_count": null,
138 | "outputs": [
139 | {
140 | "output_type": "execute_result",
141 | "data": {
142 | "text/plain": [
143 | "GaussianNB(priors=None, var_smoothing=1e-09)"
144 | ]
145 | },
146 | "metadata": {},
147 | "execution_count": 5
148 | }
149 | ]
150 | },
151 | {
152 | "cell_type": "markdown",
153 | "metadata": {
154 | "id": "h4Hwj34ziWQW"
155 | },
156 | "source": [
157 | "## Making the Confusion Matrix"
158 | ]
159 | },
160 | {
161 | "cell_type": "code",
162 | "metadata": {
163 | "id": "D6bpZwUiiXic",
164 | "colab": {
165 | "base_uri": "https://localhost:8080/"
166 | },
167 | "outputId": "3d877105-7cef-43aa-ea9d-3df3b7eaab9f"
168 | },
169 | "source": [
170 | "from sklearn.metrics import confusion_matrix, accuracy_score\n",
171 | "y_pred = classifier.predict(X_test)\n",
172 | "cm = confusion_matrix(y_test, y_pred)\n",
173 | "print(cm)\n",
174 | "accuracy_score(y_test, y_pred)"
175 | ],
176 | "execution_count": null,
177 | "outputs": [
178 | {
179 | "output_type": "stream",
180 | "name": "stdout",
181 | "text": [
182 | "[[114 16]\n",
183 | " [ 29 33]]\n"
184 | ]
185 | },
186 | {
187 | "output_type": "execute_result",
188 | "data": {
189 | "text/plain": [
190 | "0.765625"
191 | ]
192 | },
193 | "metadata": {},
194 | "execution_count": 6
195 | }
196 | ]
197 | }
198 | ]
199 | }
--------------------------------------------------------------------------------
/Naive Bayes/diabetes.csv:
--------------------------------------------------------------------------------
1 | Pregnancies,Glucose,BloodPressure,SkinThickness,Insulin,BMI,DiabetesPedigreeFunction,Age,Outcome
2 | 6,148,72,35,0,33.6,0.627,50,1
3 | 1,85,66,29,0,26.6,0.351,31,0
4 | 8,183,64,0,0,23.3,0.672,32,1
5 | 1,89,66,23,94,28.1,0.167,21,0
6 | 0,137,40,35,168,43.1,2.288,33,1
7 | 5,116,74,0,0,25.6,0.201,30,0
8 | 3,78,50,32,88,31,0.248,26,1
9 | 10,115,0,0,0,35.3,0.134,29,0
10 | 2,197,70,45,543,30.5,0.158,53,1
11 | 8,125,96,0,0,0,0.232,54,1
12 | 4,110,92,0,0,37.6,0.191,30,0
13 | 10,168,74,0,0,38,0.537,34,1
14 | 10,139,80,0,0,27.1,1.441,57,0
15 | 1,189,60,23,846,30.1,0.398,59,1
16 | 5,166,72,19,175,25.8,0.587,51,1
17 | 7,100,0,0,0,30,0.484,32,1
18 | 0,118,84,47,230,45.8,0.551,31,1
19 | 7,107,74,0,0,29.6,0.254,31,1
20 | 1,103,30,38,83,43.3,0.183,33,0
21 | 1,115,70,30,96,34.6,0.529,32,1
22 | 3,126,88,41,235,39.3,0.704,27,0
23 | 8,99,84,0,0,35.4,0.388,50,0
24 | 7,196,90,0,0,39.8,0.451,41,1
25 | 9,119,80,35,0,29,0.263,29,1
26 | 11,143,94,33,146,36.6,0.254,51,1
27 | 10,125,70,26,115,31.1,0.205,41,1
28 | 7,147,76,0,0,39.4,0.257,43,1
29 | 1,97,66,15,140,23.2,0.487,22,0
30 | 13,145,82,19,110,22.2,0.245,57,0
31 | 5,117,92,0,0,34.1,0.337,38,0
32 | 5,109,75,26,0,36,0.546,60,0
33 | 3,158,76,36,245,31.6,0.851,28,1
34 | 3,88,58,11,54,24.8,0.267,22,0
35 | 6,92,92,0,0,19.9,0.188,28,0
36 | 10,122,78,31,0,27.6,0.512,45,0
37 | 4,103,60,33,192,24,0.966,33,0
38 | 11,138,76,0,0,33.2,0.42,35,0
39 | 9,102,76,37,0,32.9,0.665,46,1
40 | 2,90,68,42,0,38.2,0.503,27,1
41 | 4,111,72,47,207,37.1,1.39,56,1
42 | 3,180,64,25,70,34,0.271,26,0
43 | 7,133,84,0,0,40.2,0.696,37,0
44 | 7,106,92,18,0,22.7,0.235,48,0
45 | 9,171,110,24,240,45.4,0.721,54,1
46 | 7,159,64,0,0,27.4,0.294,40,0
47 | 0,180,66,39,0,42,1.893,25,1
48 | 1,146,56,0,0,29.7,0.564,29,0
49 | 2,71,70,27,0,28,0.586,22,0
50 | 7,103,66,32,0,39.1,0.344,31,1
51 | 7,105,0,0,0,0,0.305,24,0
52 | 1,103,80,11,82,19.4,0.491,22,0
53 | 1,101,50,15,36,24.2,0.526,26,0
54 | 5,88,66,21,23,24.4,0.342,30,0
55 | 8,176,90,34,300,33.7,0.467,58,1
56 | 7,150,66,42,342,34.7,0.718,42,0
57 | 1,73,50,10,0,23,0.248,21,0
58 | 7,187,68,39,304,37.7,0.254,41,1
59 | 0,100,88,60,110,46.8,0.962,31,0
60 | 0,146,82,0,0,40.5,1.781,44,0
61 | 0,105,64,41,142,41.5,0.173,22,0
62 | 2,84,0,0,0,0,0.304,21,0
63 | 8,133,72,0,0,32.9,0.27,39,1
64 | 5,44,62,0,0,25,0.587,36,0
65 | 2,141,58,34,128,25.4,0.699,24,0
66 | 7,114,66,0,0,32.8,0.258,42,1
67 | 5,99,74,27,0,29,0.203,32,0
68 | 0,109,88,30,0,32.5,0.855,38,1
69 | 2,109,92,0,0,42.7,0.845,54,0
70 | 1,95,66,13,38,19.6,0.334,25,0
71 | 4,146,85,27,100,28.9,0.189,27,0
72 | 2,100,66,20,90,32.9,0.867,28,1
73 | 5,139,64,35,140,28.6,0.411,26,0
74 | 13,126,90,0,0,43.4,0.583,42,1
75 | 4,129,86,20,270,35.1,0.231,23,0
76 | 1,79,75,30,0,32,0.396,22,0
77 | 1,0,48,20,0,24.7,0.14,22,0
78 | 7,62,78,0,0,32.6,0.391,41,0
79 | 5,95,72,33,0,37.7,0.37,27,0
80 | 0,131,0,0,0,43.2,0.27,26,1
81 | 2,112,66,22,0,25,0.307,24,0
82 | 3,113,44,13,0,22.4,0.14,22,0
83 | 2,74,0,0,0,0,0.102,22,0
84 | 7,83,78,26,71,29.3,0.767,36,0
85 | 0,101,65,28,0,24.6,0.237,22,0
86 | 5,137,108,0,0,48.8,0.227,37,1
87 | 2,110,74,29,125,32.4,0.698,27,0
88 | 13,106,72,54,0,36.6,0.178,45,0
89 | 2,100,68,25,71,38.5,0.324,26,0
90 | 15,136,70,32,110,37.1,0.153,43,1
91 | 1,107,68,19,0,26.5,0.165,24,0
92 | 1,80,55,0,0,19.1,0.258,21,0
93 | 4,123,80,15,176,32,0.443,34,0
94 | 7,81,78,40,48,46.7,0.261,42,0
95 | 4,134,72,0,0,23.8,0.277,60,1
96 | 2,142,82,18,64,24.7,0.761,21,0
97 | 6,144,72,27,228,33.9,0.255,40,0
98 | 2,92,62,28,0,31.6,0.13,24,0
99 | 1,71,48,18,76,20.4,0.323,22,0
100 | 6,93,50,30,64,28.7,0.356,23,0
101 | 1,122,90,51,220,49.7,0.325,31,1
102 | 1,163,72,0,0,39,1.222,33,1
103 | 1,151,60,0,0,26.1,0.179,22,0
104 | 0,125,96,0,0,22.5,0.262,21,0
105 | 1,81,72,18,40,26.6,0.283,24,0
106 | 2,85,65,0,0,39.6,0.93,27,0
107 | 1,126,56,29,152,28.7,0.801,21,0
108 | 1,96,122,0,0,22.4,0.207,27,0
109 | 4,144,58,28,140,29.5,0.287,37,0
110 | 3,83,58,31,18,34.3,0.336,25,0
111 | 0,95,85,25,36,37.4,0.247,24,1
112 | 3,171,72,33,135,33.3,0.199,24,1
113 | 8,155,62,26,495,34,0.543,46,1
114 | 1,89,76,34,37,31.2,0.192,23,0
115 | 4,76,62,0,0,34,0.391,25,0
116 | 7,160,54,32,175,30.5,0.588,39,1
117 | 4,146,92,0,0,31.2,0.539,61,1
118 | 5,124,74,0,0,34,0.22,38,1
119 | 5,78,48,0,0,33.7,0.654,25,0
120 | 4,97,60,23,0,28.2,0.443,22,0
121 | 4,99,76,15,51,23.2,0.223,21,0
122 | 0,162,76,56,100,53.2,0.759,25,1
123 | 6,111,64,39,0,34.2,0.26,24,0
124 | 2,107,74,30,100,33.6,0.404,23,0
125 | 5,132,80,0,0,26.8,0.186,69,0
126 | 0,113,76,0,0,33.3,0.278,23,1
127 | 1,88,30,42,99,55,0.496,26,1
128 | 3,120,70,30,135,42.9,0.452,30,0
129 | 1,118,58,36,94,33.3,0.261,23,0
130 | 1,117,88,24,145,34.5,0.403,40,1
131 | 0,105,84,0,0,27.9,0.741,62,1
132 | 4,173,70,14,168,29.7,0.361,33,1
133 | 9,122,56,0,0,33.3,1.114,33,1
134 | 3,170,64,37,225,34.5,0.356,30,1
135 | 8,84,74,31,0,38.3,0.457,39,0
136 | 2,96,68,13,49,21.1,0.647,26,0
137 | 2,125,60,20,140,33.8,0.088,31,0
138 | 0,100,70,26,50,30.8,0.597,21,0
139 | 0,93,60,25,92,28.7,0.532,22,0
140 | 0,129,80,0,0,31.2,0.703,29,0
141 | 5,105,72,29,325,36.9,0.159,28,0
142 | 3,128,78,0,0,21.1,0.268,55,0
143 | 5,106,82,30,0,39.5,0.286,38,0
144 | 2,108,52,26,63,32.5,0.318,22,0
145 | 10,108,66,0,0,32.4,0.272,42,1
146 | 4,154,62,31,284,32.8,0.237,23,0
147 | 0,102,75,23,0,0,0.572,21,0
148 | 9,57,80,37,0,32.8,0.096,41,0
149 | 2,106,64,35,119,30.5,1.4,34,0
150 | 5,147,78,0,0,33.7,0.218,65,0
151 | 2,90,70,17,0,27.3,0.085,22,0
152 | 1,136,74,50,204,37.4,0.399,24,0
153 | 4,114,65,0,0,21.9,0.432,37,0
154 | 9,156,86,28,155,34.3,1.189,42,1
155 | 1,153,82,42,485,40.6,0.687,23,0
156 | 8,188,78,0,0,47.9,0.137,43,1
157 | 7,152,88,44,0,50,0.337,36,1
158 | 2,99,52,15,94,24.6,0.637,21,0
159 | 1,109,56,21,135,25.2,0.833,23,0
160 | 2,88,74,19,53,29,0.229,22,0
161 | 17,163,72,41,114,40.9,0.817,47,1
162 | 4,151,90,38,0,29.7,0.294,36,0
163 | 7,102,74,40,105,37.2,0.204,45,0
164 | 0,114,80,34,285,44.2,0.167,27,0
165 | 2,100,64,23,0,29.7,0.368,21,0
166 | 0,131,88,0,0,31.6,0.743,32,1
167 | 6,104,74,18,156,29.9,0.722,41,1
168 | 3,148,66,25,0,32.5,0.256,22,0
169 | 4,120,68,0,0,29.6,0.709,34,0
170 | 4,110,66,0,0,31.9,0.471,29,0
171 | 3,111,90,12,78,28.4,0.495,29,0
172 | 6,102,82,0,0,30.8,0.18,36,1
173 | 6,134,70,23,130,35.4,0.542,29,1
174 | 2,87,0,23,0,28.9,0.773,25,0
175 | 1,79,60,42,48,43.5,0.678,23,0
176 | 2,75,64,24,55,29.7,0.37,33,0
177 | 8,179,72,42,130,32.7,0.719,36,1
178 | 6,85,78,0,0,31.2,0.382,42,0
179 | 0,129,110,46,130,67.1,0.319,26,1
180 | 5,143,78,0,0,45,0.19,47,0
181 | 5,130,82,0,0,39.1,0.956,37,1
182 | 6,87,80,0,0,23.2,0.084,32,0
183 | 0,119,64,18,92,34.9,0.725,23,0
184 | 1,0,74,20,23,27.7,0.299,21,0
185 | 5,73,60,0,0,26.8,0.268,27,0
186 | 4,141,74,0,0,27.6,0.244,40,0
187 | 7,194,68,28,0,35.9,0.745,41,1
188 | 8,181,68,36,495,30.1,0.615,60,1
189 | 1,128,98,41,58,32,1.321,33,1
190 | 8,109,76,39,114,27.9,0.64,31,1
191 | 5,139,80,35,160,31.6,0.361,25,1
192 | 3,111,62,0,0,22.6,0.142,21,0
193 | 9,123,70,44,94,33.1,0.374,40,0
194 | 7,159,66,0,0,30.4,0.383,36,1
195 | 11,135,0,0,0,52.3,0.578,40,1
196 | 8,85,55,20,0,24.4,0.136,42,0
197 | 5,158,84,41,210,39.4,0.395,29,1
198 | 1,105,58,0,0,24.3,0.187,21,0
199 | 3,107,62,13,48,22.9,0.678,23,1
200 | 4,109,64,44,99,34.8,0.905,26,1
201 | 4,148,60,27,318,30.9,0.15,29,1
202 | 0,113,80,16,0,31,0.874,21,0
203 | 1,138,82,0,0,40.1,0.236,28,0
204 | 0,108,68,20,0,27.3,0.787,32,0
205 | 2,99,70,16,44,20.4,0.235,27,0
206 | 6,103,72,32,190,37.7,0.324,55,0
207 | 5,111,72,28,0,23.9,0.407,27,0
208 | 8,196,76,29,280,37.5,0.605,57,1
209 | 5,162,104,0,0,37.7,0.151,52,1
210 | 1,96,64,27,87,33.2,0.289,21,0
211 | 7,184,84,33,0,35.5,0.355,41,1
212 | 2,81,60,22,0,27.7,0.29,25,0
213 | 0,147,85,54,0,42.8,0.375,24,0
214 | 7,179,95,31,0,34.2,0.164,60,0
215 | 0,140,65,26,130,42.6,0.431,24,1
216 | 9,112,82,32,175,34.2,0.26,36,1
217 | 12,151,70,40,271,41.8,0.742,38,1
218 | 5,109,62,41,129,35.8,0.514,25,1
219 | 6,125,68,30,120,30,0.464,32,0
220 | 5,85,74,22,0,29,1.224,32,1
221 | 5,112,66,0,0,37.8,0.261,41,1
222 | 0,177,60,29,478,34.6,1.072,21,1
223 | 2,158,90,0,0,31.6,0.805,66,1
224 | 7,119,0,0,0,25.2,0.209,37,0
225 | 7,142,60,33,190,28.8,0.687,61,0
226 | 1,100,66,15,56,23.6,0.666,26,0
227 | 1,87,78,27,32,34.6,0.101,22,0
228 | 0,101,76,0,0,35.7,0.198,26,0
229 | 3,162,52,38,0,37.2,0.652,24,1
230 | 4,197,70,39,744,36.7,2.329,31,0
231 | 0,117,80,31,53,45.2,0.089,24,0
232 | 4,142,86,0,0,44,0.645,22,1
233 | 6,134,80,37,370,46.2,0.238,46,1
234 | 1,79,80,25,37,25.4,0.583,22,0
235 | 4,122,68,0,0,35,0.394,29,0
236 | 3,74,68,28,45,29.7,0.293,23,0
237 | 4,171,72,0,0,43.6,0.479,26,1
238 | 7,181,84,21,192,35.9,0.586,51,1
239 | 0,179,90,27,0,44.1,0.686,23,1
240 | 9,164,84,21,0,30.8,0.831,32,1
241 | 0,104,76,0,0,18.4,0.582,27,0
242 | 1,91,64,24,0,29.2,0.192,21,0
243 | 4,91,70,32,88,33.1,0.446,22,0
244 | 3,139,54,0,0,25.6,0.402,22,1
245 | 6,119,50,22,176,27.1,1.318,33,1
246 | 2,146,76,35,194,38.2,0.329,29,0
247 | 9,184,85,15,0,30,1.213,49,1
248 | 10,122,68,0,0,31.2,0.258,41,0
249 | 0,165,90,33,680,52.3,0.427,23,0
250 | 9,124,70,33,402,35.4,0.282,34,0
251 | 1,111,86,19,0,30.1,0.143,23,0
252 | 9,106,52,0,0,31.2,0.38,42,0
253 | 2,129,84,0,0,28,0.284,27,0
254 | 2,90,80,14,55,24.4,0.249,24,0
255 | 0,86,68,32,0,35.8,0.238,25,0
256 | 12,92,62,7,258,27.6,0.926,44,1
257 | 1,113,64,35,0,33.6,0.543,21,1
258 | 3,111,56,39,0,30.1,0.557,30,0
259 | 2,114,68,22,0,28.7,0.092,25,0
260 | 1,193,50,16,375,25.9,0.655,24,0
261 | 11,155,76,28,150,33.3,1.353,51,1
262 | 3,191,68,15,130,30.9,0.299,34,0
263 | 3,141,0,0,0,30,0.761,27,1
264 | 4,95,70,32,0,32.1,0.612,24,0
265 | 3,142,80,15,0,32.4,0.2,63,0
266 | 4,123,62,0,0,32,0.226,35,1
267 | 5,96,74,18,67,33.6,0.997,43,0
268 | 0,138,0,0,0,36.3,0.933,25,1
269 | 2,128,64,42,0,40,1.101,24,0
270 | 0,102,52,0,0,25.1,0.078,21,0
271 | 2,146,0,0,0,27.5,0.24,28,1
272 | 10,101,86,37,0,45.6,1.136,38,1
273 | 2,108,62,32,56,25.2,0.128,21,0
274 | 3,122,78,0,0,23,0.254,40,0
275 | 1,71,78,50,45,33.2,0.422,21,0
276 | 13,106,70,0,0,34.2,0.251,52,0
277 | 2,100,70,52,57,40.5,0.677,25,0
278 | 7,106,60,24,0,26.5,0.296,29,1
279 | 0,104,64,23,116,27.8,0.454,23,0
280 | 5,114,74,0,0,24.9,0.744,57,0
281 | 2,108,62,10,278,25.3,0.881,22,0
282 | 0,146,70,0,0,37.9,0.334,28,1
283 | 10,129,76,28,122,35.9,0.28,39,0
284 | 7,133,88,15,155,32.4,0.262,37,0
285 | 7,161,86,0,0,30.4,0.165,47,1
286 | 2,108,80,0,0,27,0.259,52,1
287 | 7,136,74,26,135,26,0.647,51,0
288 | 5,155,84,44,545,38.7,0.619,34,0
289 | 1,119,86,39,220,45.6,0.808,29,1
290 | 4,96,56,17,49,20.8,0.34,26,0
291 | 5,108,72,43,75,36.1,0.263,33,0
292 | 0,78,88,29,40,36.9,0.434,21,0
293 | 0,107,62,30,74,36.6,0.757,25,1
294 | 2,128,78,37,182,43.3,1.224,31,1
295 | 1,128,48,45,194,40.5,0.613,24,1
296 | 0,161,50,0,0,21.9,0.254,65,0
297 | 6,151,62,31,120,35.5,0.692,28,0
298 | 2,146,70,38,360,28,0.337,29,1
299 | 0,126,84,29,215,30.7,0.52,24,0
300 | 14,100,78,25,184,36.6,0.412,46,1
301 | 8,112,72,0,0,23.6,0.84,58,0
302 | 0,167,0,0,0,32.3,0.839,30,1
303 | 2,144,58,33,135,31.6,0.422,25,1
304 | 5,77,82,41,42,35.8,0.156,35,0
305 | 5,115,98,0,0,52.9,0.209,28,1
306 | 3,150,76,0,0,21,0.207,37,0
307 | 2,120,76,37,105,39.7,0.215,29,0
308 | 10,161,68,23,132,25.5,0.326,47,1
309 | 0,137,68,14,148,24.8,0.143,21,0
310 | 0,128,68,19,180,30.5,1.391,25,1
311 | 2,124,68,28,205,32.9,0.875,30,1
312 | 6,80,66,30,0,26.2,0.313,41,0
313 | 0,106,70,37,148,39.4,0.605,22,0
314 | 2,155,74,17,96,26.6,0.433,27,1
315 | 3,113,50,10,85,29.5,0.626,25,0
316 | 7,109,80,31,0,35.9,1.127,43,1
317 | 2,112,68,22,94,34.1,0.315,26,0
318 | 3,99,80,11,64,19.3,0.284,30,0
319 | 3,182,74,0,0,30.5,0.345,29,1
320 | 3,115,66,39,140,38.1,0.15,28,0
321 | 6,194,78,0,0,23.5,0.129,59,1
322 | 4,129,60,12,231,27.5,0.527,31,0
323 | 3,112,74,30,0,31.6,0.197,25,1
324 | 0,124,70,20,0,27.4,0.254,36,1
325 | 13,152,90,33,29,26.8,0.731,43,1
326 | 2,112,75,32,0,35.7,0.148,21,0
327 | 1,157,72,21,168,25.6,0.123,24,0
328 | 1,122,64,32,156,35.1,0.692,30,1
329 | 10,179,70,0,0,35.1,0.2,37,0
330 | 2,102,86,36,120,45.5,0.127,23,1
331 | 6,105,70,32,68,30.8,0.122,37,0
332 | 8,118,72,19,0,23.1,1.476,46,0
333 | 2,87,58,16,52,32.7,0.166,25,0
334 | 1,180,0,0,0,43.3,0.282,41,1
335 | 12,106,80,0,0,23.6,0.137,44,0
336 | 1,95,60,18,58,23.9,0.26,22,0
337 | 0,165,76,43,255,47.9,0.259,26,0
338 | 0,117,0,0,0,33.8,0.932,44,0
339 | 5,115,76,0,0,31.2,0.343,44,1
340 | 9,152,78,34,171,34.2,0.893,33,1
341 | 7,178,84,0,0,39.9,0.331,41,1
342 | 1,130,70,13,105,25.9,0.472,22,0
343 | 1,95,74,21,73,25.9,0.673,36,0
344 | 1,0,68,35,0,32,0.389,22,0
345 | 5,122,86,0,0,34.7,0.29,33,0
346 | 8,95,72,0,0,36.8,0.485,57,0
347 | 8,126,88,36,108,38.5,0.349,49,0
348 | 1,139,46,19,83,28.7,0.654,22,0
349 | 3,116,0,0,0,23.5,0.187,23,0
350 | 3,99,62,19,74,21.8,0.279,26,0
351 | 5,0,80,32,0,41,0.346,37,1
352 | 4,92,80,0,0,42.2,0.237,29,0
353 | 4,137,84,0,0,31.2,0.252,30,0
354 | 3,61,82,28,0,34.4,0.243,46,0
355 | 1,90,62,12,43,27.2,0.58,24,0
356 | 3,90,78,0,0,42.7,0.559,21,0
357 | 9,165,88,0,0,30.4,0.302,49,1
358 | 1,125,50,40,167,33.3,0.962,28,1
359 | 13,129,0,30,0,39.9,0.569,44,1
360 | 12,88,74,40,54,35.3,0.378,48,0
361 | 1,196,76,36,249,36.5,0.875,29,1
362 | 5,189,64,33,325,31.2,0.583,29,1
363 | 5,158,70,0,0,29.8,0.207,63,0
364 | 5,103,108,37,0,39.2,0.305,65,0
365 | 4,146,78,0,0,38.5,0.52,67,1
366 | 4,147,74,25,293,34.9,0.385,30,0
367 | 5,99,54,28,83,34,0.499,30,0
368 | 6,124,72,0,0,27.6,0.368,29,1
369 | 0,101,64,17,0,21,0.252,21,0
370 | 3,81,86,16,66,27.5,0.306,22,0
371 | 1,133,102,28,140,32.8,0.234,45,1
372 | 3,173,82,48,465,38.4,2.137,25,1
373 | 0,118,64,23,89,0,1.731,21,0
374 | 0,84,64,22,66,35.8,0.545,21,0
375 | 2,105,58,40,94,34.9,0.225,25,0
376 | 2,122,52,43,158,36.2,0.816,28,0
377 | 12,140,82,43,325,39.2,0.528,58,1
378 | 0,98,82,15,84,25.2,0.299,22,0
379 | 1,87,60,37,75,37.2,0.509,22,0
380 | 4,156,75,0,0,48.3,0.238,32,1
381 | 0,93,100,39,72,43.4,1.021,35,0
382 | 1,107,72,30,82,30.8,0.821,24,0
383 | 0,105,68,22,0,20,0.236,22,0
384 | 1,109,60,8,182,25.4,0.947,21,0
385 | 1,90,62,18,59,25.1,1.268,25,0
386 | 1,125,70,24,110,24.3,0.221,25,0
387 | 1,119,54,13,50,22.3,0.205,24,0
388 | 5,116,74,29,0,32.3,0.66,35,1
389 | 8,105,100,36,0,43.3,0.239,45,1
390 | 5,144,82,26,285,32,0.452,58,1
391 | 3,100,68,23,81,31.6,0.949,28,0
392 | 1,100,66,29,196,32,0.444,42,0
393 | 5,166,76,0,0,45.7,0.34,27,1
394 | 1,131,64,14,415,23.7,0.389,21,0
395 | 4,116,72,12,87,22.1,0.463,37,0
396 | 4,158,78,0,0,32.9,0.803,31,1
397 | 2,127,58,24,275,27.7,1.6,25,0
398 | 3,96,56,34,115,24.7,0.944,39,0
399 | 0,131,66,40,0,34.3,0.196,22,1
400 | 3,82,70,0,0,21.1,0.389,25,0
401 | 3,193,70,31,0,34.9,0.241,25,1
402 | 4,95,64,0,0,32,0.161,31,1
403 | 6,137,61,0,0,24.2,0.151,55,0
404 | 5,136,84,41,88,35,0.286,35,1
405 | 9,72,78,25,0,31.6,0.28,38,0
406 | 5,168,64,0,0,32.9,0.135,41,1
407 | 2,123,48,32,165,42.1,0.52,26,0
408 | 4,115,72,0,0,28.9,0.376,46,1
409 | 0,101,62,0,0,21.9,0.336,25,0
410 | 8,197,74,0,0,25.9,1.191,39,1
411 | 1,172,68,49,579,42.4,0.702,28,1
412 | 6,102,90,39,0,35.7,0.674,28,0
413 | 1,112,72,30,176,34.4,0.528,25,0
414 | 1,143,84,23,310,42.4,1.076,22,0
415 | 1,143,74,22,61,26.2,0.256,21,0
416 | 0,138,60,35,167,34.6,0.534,21,1
417 | 3,173,84,33,474,35.7,0.258,22,1
418 | 1,97,68,21,0,27.2,1.095,22,0
419 | 4,144,82,32,0,38.5,0.554,37,1
420 | 1,83,68,0,0,18.2,0.624,27,0
421 | 3,129,64,29,115,26.4,0.219,28,1
422 | 1,119,88,41,170,45.3,0.507,26,0
423 | 2,94,68,18,76,26,0.561,21,0
424 | 0,102,64,46,78,40.6,0.496,21,0
425 | 2,115,64,22,0,30.8,0.421,21,0
426 | 8,151,78,32,210,42.9,0.516,36,1
427 | 4,184,78,39,277,37,0.264,31,1
428 | 0,94,0,0,0,0,0.256,25,0
429 | 1,181,64,30,180,34.1,0.328,38,1
430 | 0,135,94,46,145,40.6,0.284,26,0
431 | 1,95,82,25,180,35,0.233,43,1
432 | 2,99,0,0,0,22.2,0.108,23,0
433 | 3,89,74,16,85,30.4,0.551,38,0
434 | 1,80,74,11,60,30,0.527,22,0
435 | 2,139,75,0,0,25.6,0.167,29,0
436 | 1,90,68,8,0,24.5,1.138,36,0
437 | 0,141,0,0,0,42.4,0.205,29,1
438 | 12,140,85,33,0,37.4,0.244,41,0
439 | 5,147,75,0,0,29.9,0.434,28,0
440 | 1,97,70,15,0,18.2,0.147,21,0
441 | 6,107,88,0,0,36.8,0.727,31,0
442 | 0,189,104,25,0,34.3,0.435,41,1
443 | 2,83,66,23,50,32.2,0.497,22,0
444 | 4,117,64,27,120,33.2,0.23,24,0
445 | 8,108,70,0,0,30.5,0.955,33,1
446 | 4,117,62,12,0,29.7,0.38,30,1
447 | 0,180,78,63,14,59.4,2.42,25,1
448 | 1,100,72,12,70,25.3,0.658,28,0
449 | 0,95,80,45,92,36.5,0.33,26,0
450 | 0,104,64,37,64,33.6,0.51,22,1
451 | 0,120,74,18,63,30.5,0.285,26,0
452 | 1,82,64,13,95,21.2,0.415,23,0
453 | 2,134,70,0,0,28.9,0.542,23,1
454 | 0,91,68,32,210,39.9,0.381,25,0
455 | 2,119,0,0,0,19.6,0.832,72,0
456 | 2,100,54,28,105,37.8,0.498,24,0
457 | 14,175,62,30,0,33.6,0.212,38,1
458 | 1,135,54,0,0,26.7,0.687,62,0
459 | 5,86,68,28,71,30.2,0.364,24,0
460 | 10,148,84,48,237,37.6,1.001,51,1
461 | 9,134,74,33,60,25.9,0.46,81,0
462 | 9,120,72,22,56,20.8,0.733,48,0
463 | 1,71,62,0,0,21.8,0.416,26,0
464 | 8,74,70,40,49,35.3,0.705,39,0
465 | 5,88,78,30,0,27.6,0.258,37,0
466 | 10,115,98,0,0,24,1.022,34,0
467 | 0,124,56,13,105,21.8,0.452,21,0
468 | 0,74,52,10,36,27.8,0.269,22,0
469 | 0,97,64,36,100,36.8,0.6,25,0
470 | 8,120,0,0,0,30,0.183,38,1
471 | 6,154,78,41,140,46.1,0.571,27,0
472 | 1,144,82,40,0,41.3,0.607,28,0
473 | 0,137,70,38,0,33.2,0.17,22,0
474 | 0,119,66,27,0,38.8,0.259,22,0
475 | 7,136,90,0,0,29.9,0.21,50,0
476 | 4,114,64,0,0,28.9,0.126,24,0
477 | 0,137,84,27,0,27.3,0.231,59,0
478 | 2,105,80,45,191,33.7,0.711,29,1
479 | 7,114,76,17,110,23.8,0.466,31,0
480 | 8,126,74,38,75,25.9,0.162,39,0
481 | 4,132,86,31,0,28,0.419,63,0
482 | 3,158,70,30,328,35.5,0.344,35,1
483 | 0,123,88,37,0,35.2,0.197,29,0
484 | 4,85,58,22,49,27.8,0.306,28,0
485 | 0,84,82,31,125,38.2,0.233,23,0
486 | 0,145,0,0,0,44.2,0.63,31,1
487 | 0,135,68,42,250,42.3,0.365,24,1
488 | 1,139,62,41,480,40.7,0.536,21,0
489 | 0,173,78,32,265,46.5,1.159,58,0
490 | 4,99,72,17,0,25.6,0.294,28,0
491 | 8,194,80,0,0,26.1,0.551,67,0
492 | 2,83,65,28,66,36.8,0.629,24,0
493 | 2,89,90,30,0,33.5,0.292,42,0
494 | 4,99,68,38,0,32.8,0.145,33,0
495 | 4,125,70,18,122,28.9,1.144,45,1
496 | 3,80,0,0,0,0,0.174,22,0
497 | 6,166,74,0,0,26.6,0.304,66,0
498 | 5,110,68,0,0,26,0.292,30,0
499 | 2,81,72,15,76,30.1,0.547,25,0
500 | 7,195,70,33,145,25.1,0.163,55,1
501 | 6,154,74,32,193,29.3,0.839,39,0
502 | 2,117,90,19,71,25.2,0.313,21,0
503 | 3,84,72,32,0,37.2,0.267,28,0
504 | 6,0,68,41,0,39,0.727,41,1
505 | 7,94,64,25,79,33.3,0.738,41,0
506 | 3,96,78,39,0,37.3,0.238,40,0
507 | 10,75,82,0,0,33.3,0.263,38,0
508 | 0,180,90,26,90,36.5,0.314,35,1
509 | 1,130,60,23,170,28.6,0.692,21,0
510 | 2,84,50,23,76,30.4,0.968,21,0
511 | 8,120,78,0,0,25,0.409,64,0
512 | 12,84,72,31,0,29.7,0.297,46,1
513 | 0,139,62,17,210,22.1,0.207,21,0
514 | 9,91,68,0,0,24.2,0.2,58,0
515 | 2,91,62,0,0,27.3,0.525,22,0
516 | 3,99,54,19,86,25.6,0.154,24,0
517 | 3,163,70,18,105,31.6,0.268,28,1
518 | 9,145,88,34,165,30.3,0.771,53,1
519 | 7,125,86,0,0,37.6,0.304,51,0
520 | 13,76,60,0,0,32.8,0.18,41,0
521 | 6,129,90,7,326,19.6,0.582,60,0
522 | 2,68,70,32,66,25,0.187,25,0
523 | 3,124,80,33,130,33.2,0.305,26,0
524 | 6,114,0,0,0,0,0.189,26,0
525 | 9,130,70,0,0,34.2,0.652,45,1
526 | 3,125,58,0,0,31.6,0.151,24,0
527 | 3,87,60,18,0,21.8,0.444,21,0
528 | 1,97,64,19,82,18.2,0.299,21,0
529 | 3,116,74,15,105,26.3,0.107,24,0
530 | 0,117,66,31,188,30.8,0.493,22,0
531 | 0,111,65,0,0,24.6,0.66,31,0
532 | 2,122,60,18,106,29.8,0.717,22,0
533 | 0,107,76,0,0,45.3,0.686,24,0
534 | 1,86,66,52,65,41.3,0.917,29,0
535 | 6,91,0,0,0,29.8,0.501,31,0
536 | 1,77,56,30,56,33.3,1.251,24,0
537 | 4,132,0,0,0,32.9,0.302,23,1
538 | 0,105,90,0,0,29.6,0.197,46,0
539 | 0,57,60,0,0,21.7,0.735,67,0
540 | 0,127,80,37,210,36.3,0.804,23,0
541 | 3,129,92,49,155,36.4,0.968,32,1
542 | 8,100,74,40,215,39.4,0.661,43,1
543 | 3,128,72,25,190,32.4,0.549,27,1
544 | 10,90,85,32,0,34.9,0.825,56,1
545 | 4,84,90,23,56,39.5,0.159,25,0
546 | 1,88,78,29,76,32,0.365,29,0
547 | 8,186,90,35,225,34.5,0.423,37,1
548 | 5,187,76,27,207,43.6,1.034,53,1
549 | 4,131,68,21,166,33.1,0.16,28,0
550 | 1,164,82,43,67,32.8,0.341,50,0
551 | 4,189,110,31,0,28.5,0.68,37,0
552 | 1,116,70,28,0,27.4,0.204,21,0
553 | 3,84,68,30,106,31.9,0.591,25,0
554 | 6,114,88,0,0,27.8,0.247,66,0
555 | 1,88,62,24,44,29.9,0.422,23,0
556 | 1,84,64,23,115,36.9,0.471,28,0
557 | 7,124,70,33,215,25.5,0.161,37,0
558 | 1,97,70,40,0,38.1,0.218,30,0
559 | 8,110,76,0,0,27.8,0.237,58,0
560 | 11,103,68,40,0,46.2,0.126,42,0
561 | 11,85,74,0,0,30.1,0.3,35,0
562 | 6,125,76,0,0,33.8,0.121,54,1
563 | 0,198,66,32,274,41.3,0.502,28,1
564 | 1,87,68,34,77,37.6,0.401,24,0
565 | 6,99,60,19,54,26.9,0.497,32,0
566 | 0,91,80,0,0,32.4,0.601,27,0
567 | 2,95,54,14,88,26.1,0.748,22,0
568 | 1,99,72,30,18,38.6,0.412,21,0
569 | 6,92,62,32,126,32,0.085,46,0
570 | 4,154,72,29,126,31.3,0.338,37,0
571 | 0,121,66,30,165,34.3,0.203,33,1
572 | 3,78,70,0,0,32.5,0.27,39,0
573 | 2,130,96,0,0,22.6,0.268,21,0
574 | 3,111,58,31,44,29.5,0.43,22,0
575 | 2,98,60,17,120,34.7,0.198,22,0
576 | 1,143,86,30,330,30.1,0.892,23,0
577 | 1,119,44,47,63,35.5,0.28,25,0
578 | 6,108,44,20,130,24,0.813,35,0
579 | 2,118,80,0,0,42.9,0.693,21,1
580 | 10,133,68,0,0,27,0.245,36,0
581 | 2,197,70,99,0,34.7,0.575,62,1
582 | 0,151,90,46,0,42.1,0.371,21,1
583 | 6,109,60,27,0,25,0.206,27,0
584 | 12,121,78,17,0,26.5,0.259,62,0
585 | 8,100,76,0,0,38.7,0.19,42,0
586 | 8,124,76,24,600,28.7,0.687,52,1
587 | 1,93,56,11,0,22.5,0.417,22,0
588 | 8,143,66,0,0,34.9,0.129,41,1
589 | 6,103,66,0,0,24.3,0.249,29,0
590 | 3,176,86,27,156,33.3,1.154,52,1
591 | 0,73,0,0,0,21.1,0.342,25,0
592 | 11,111,84,40,0,46.8,0.925,45,1
593 | 2,112,78,50,140,39.4,0.175,24,0
594 | 3,132,80,0,0,34.4,0.402,44,1
595 | 2,82,52,22,115,28.5,1.699,25,0
596 | 6,123,72,45,230,33.6,0.733,34,0
597 | 0,188,82,14,185,32,0.682,22,1
598 | 0,67,76,0,0,45.3,0.194,46,0
599 | 1,89,24,19,25,27.8,0.559,21,0
600 | 1,173,74,0,0,36.8,0.088,38,1
601 | 1,109,38,18,120,23.1,0.407,26,0
602 | 1,108,88,19,0,27.1,0.4,24,0
603 | 6,96,0,0,0,23.7,0.19,28,0
604 | 1,124,74,36,0,27.8,0.1,30,0
605 | 7,150,78,29,126,35.2,0.692,54,1
606 | 4,183,0,0,0,28.4,0.212,36,1
607 | 1,124,60,32,0,35.8,0.514,21,0
608 | 1,181,78,42,293,40,1.258,22,1
609 | 1,92,62,25,41,19.5,0.482,25,0
610 | 0,152,82,39,272,41.5,0.27,27,0
611 | 1,111,62,13,182,24,0.138,23,0
612 | 3,106,54,21,158,30.9,0.292,24,0
613 | 3,174,58,22,194,32.9,0.593,36,1
614 | 7,168,88,42,321,38.2,0.787,40,1
615 | 6,105,80,28,0,32.5,0.878,26,0
616 | 11,138,74,26,144,36.1,0.557,50,1
617 | 3,106,72,0,0,25.8,0.207,27,0
618 | 6,117,96,0,0,28.7,0.157,30,0
619 | 2,68,62,13,15,20.1,0.257,23,0
620 | 9,112,82,24,0,28.2,1.282,50,1
621 | 0,119,0,0,0,32.4,0.141,24,1
622 | 2,112,86,42,160,38.4,0.246,28,0
623 | 2,92,76,20,0,24.2,1.698,28,0
624 | 6,183,94,0,0,40.8,1.461,45,0
625 | 0,94,70,27,115,43.5,0.347,21,0
626 | 2,108,64,0,0,30.8,0.158,21,0
627 | 4,90,88,47,54,37.7,0.362,29,0
628 | 0,125,68,0,0,24.7,0.206,21,0
629 | 0,132,78,0,0,32.4,0.393,21,0
630 | 5,128,80,0,0,34.6,0.144,45,0
631 | 4,94,65,22,0,24.7,0.148,21,0
632 | 7,114,64,0,0,27.4,0.732,34,1
633 | 0,102,78,40,90,34.5,0.238,24,0
634 | 2,111,60,0,0,26.2,0.343,23,0
635 | 1,128,82,17,183,27.5,0.115,22,0
636 | 10,92,62,0,0,25.9,0.167,31,0
637 | 13,104,72,0,0,31.2,0.465,38,1
638 | 5,104,74,0,0,28.8,0.153,48,0
639 | 2,94,76,18,66,31.6,0.649,23,0
640 | 7,97,76,32,91,40.9,0.871,32,1
641 | 1,100,74,12,46,19.5,0.149,28,0
642 | 0,102,86,17,105,29.3,0.695,27,0
643 | 4,128,70,0,0,34.3,0.303,24,0
644 | 6,147,80,0,0,29.5,0.178,50,1
645 | 4,90,0,0,0,28,0.61,31,0
646 | 3,103,72,30,152,27.6,0.73,27,0
647 | 2,157,74,35,440,39.4,0.134,30,0
648 | 1,167,74,17,144,23.4,0.447,33,1
649 | 0,179,50,36,159,37.8,0.455,22,1
650 | 11,136,84,35,130,28.3,0.26,42,1
651 | 0,107,60,25,0,26.4,0.133,23,0
652 | 1,91,54,25,100,25.2,0.234,23,0
653 | 1,117,60,23,106,33.8,0.466,27,0
654 | 5,123,74,40,77,34.1,0.269,28,0
655 | 2,120,54,0,0,26.8,0.455,27,0
656 | 1,106,70,28,135,34.2,0.142,22,0
657 | 2,155,52,27,540,38.7,0.24,25,1
658 | 2,101,58,35,90,21.8,0.155,22,0
659 | 1,120,80,48,200,38.9,1.162,41,0
660 | 11,127,106,0,0,39,0.19,51,0
661 | 3,80,82,31,70,34.2,1.292,27,1
662 | 10,162,84,0,0,27.7,0.182,54,0
663 | 1,199,76,43,0,42.9,1.394,22,1
664 | 8,167,106,46,231,37.6,0.165,43,1
665 | 9,145,80,46,130,37.9,0.637,40,1
666 | 6,115,60,39,0,33.7,0.245,40,1
667 | 1,112,80,45,132,34.8,0.217,24,0
668 | 4,145,82,18,0,32.5,0.235,70,1
669 | 10,111,70,27,0,27.5,0.141,40,1
670 | 6,98,58,33,190,34,0.43,43,0
671 | 9,154,78,30,100,30.9,0.164,45,0
672 | 6,165,68,26,168,33.6,0.631,49,0
673 | 1,99,58,10,0,25.4,0.551,21,0
674 | 10,68,106,23,49,35.5,0.285,47,0
675 | 3,123,100,35,240,57.3,0.88,22,0
676 | 8,91,82,0,0,35.6,0.587,68,0
677 | 6,195,70,0,0,30.9,0.328,31,1
678 | 9,156,86,0,0,24.8,0.23,53,1
679 | 0,93,60,0,0,35.3,0.263,25,0
680 | 3,121,52,0,0,36,0.127,25,1
681 | 2,101,58,17,265,24.2,0.614,23,0
682 | 2,56,56,28,45,24.2,0.332,22,0
683 | 0,162,76,36,0,49.6,0.364,26,1
684 | 0,95,64,39,105,44.6,0.366,22,0
685 | 4,125,80,0,0,32.3,0.536,27,1
686 | 5,136,82,0,0,0,0.64,69,0
687 | 2,129,74,26,205,33.2,0.591,25,0
688 | 3,130,64,0,0,23.1,0.314,22,0
689 | 1,107,50,19,0,28.3,0.181,29,0
690 | 1,140,74,26,180,24.1,0.828,23,0
691 | 1,144,82,46,180,46.1,0.335,46,1
692 | 8,107,80,0,0,24.6,0.856,34,0
693 | 13,158,114,0,0,42.3,0.257,44,1
694 | 2,121,70,32,95,39.1,0.886,23,0
695 | 7,129,68,49,125,38.5,0.439,43,1
696 | 2,90,60,0,0,23.5,0.191,25,0
697 | 7,142,90,24,480,30.4,0.128,43,1
698 | 3,169,74,19,125,29.9,0.268,31,1
699 | 0,99,0,0,0,25,0.253,22,0
700 | 4,127,88,11,155,34.5,0.598,28,0
701 | 4,118,70,0,0,44.5,0.904,26,0
702 | 2,122,76,27,200,35.9,0.483,26,0
703 | 6,125,78,31,0,27.6,0.565,49,1
704 | 1,168,88,29,0,35,0.905,52,1
705 | 2,129,0,0,0,38.5,0.304,41,0
706 | 4,110,76,20,100,28.4,0.118,27,0
707 | 6,80,80,36,0,39.8,0.177,28,0
708 | 10,115,0,0,0,0,0.261,30,1
709 | 2,127,46,21,335,34.4,0.176,22,0
710 | 9,164,78,0,0,32.8,0.148,45,1
711 | 2,93,64,32,160,38,0.674,23,1
712 | 3,158,64,13,387,31.2,0.295,24,0
713 | 5,126,78,27,22,29.6,0.439,40,0
714 | 10,129,62,36,0,41.2,0.441,38,1
715 | 0,134,58,20,291,26.4,0.352,21,0
716 | 3,102,74,0,0,29.5,0.121,32,0
717 | 7,187,50,33,392,33.9,0.826,34,1
718 | 3,173,78,39,185,33.8,0.97,31,1
719 | 10,94,72,18,0,23.1,0.595,56,0
720 | 1,108,60,46,178,35.5,0.415,24,0
721 | 5,97,76,27,0,35.6,0.378,52,1
722 | 4,83,86,19,0,29.3,0.317,34,0
723 | 1,114,66,36,200,38.1,0.289,21,0
724 | 1,149,68,29,127,29.3,0.349,42,1
725 | 5,117,86,30,105,39.1,0.251,42,0
726 | 1,111,94,0,0,32.8,0.265,45,0
727 | 4,112,78,40,0,39.4,0.236,38,0
728 | 1,116,78,29,180,36.1,0.496,25,0
729 | 0,141,84,26,0,32.4,0.433,22,0
730 | 2,175,88,0,0,22.9,0.326,22,0
731 | 2,92,52,0,0,30.1,0.141,22,0
732 | 3,130,78,23,79,28.4,0.323,34,1
733 | 8,120,86,0,0,28.4,0.259,22,1
734 | 2,174,88,37,120,44.5,0.646,24,1
735 | 2,106,56,27,165,29,0.426,22,0
736 | 2,105,75,0,0,23.3,0.56,53,0
737 | 4,95,60,32,0,35.4,0.284,28,0
738 | 0,126,86,27,120,27.4,0.515,21,0
739 | 8,65,72,23,0,32,0.6,42,0
740 | 2,99,60,17,160,36.6,0.453,21,0
741 | 1,102,74,0,0,39.5,0.293,42,1
742 | 11,120,80,37,150,42.3,0.785,48,1
743 | 3,102,44,20,94,30.8,0.4,26,0
744 | 1,109,58,18,116,28.5,0.219,22,0
745 | 9,140,94,0,0,32.7,0.734,45,1
746 | 13,153,88,37,140,40.6,1.174,39,0
747 | 12,100,84,33,105,30,0.488,46,0
748 | 1,147,94,41,0,49.3,0.358,27,1
749 | 1,81,74,41,57,46.3,1.096,32,0
750 | 3,187,70,22,200,36.4,0.408,36,1
751 | 6,162,62,0,0,24.3,0.178,50,1
752 | 4,136,70,0,0,31.2,1.182,22,1
753 | 1,121,78,39,74,39,0.261,28,0
754 | 3,108,62,24,0,26,0.223,25,0
755 | 0,181,88,44,510,43.3,0.222,26,1
756 | 8,154,78,32,0,32.4,0.443,45,1
757 | 1,128,88,39,110,36.5,1.057,37,1
758 | 7,137,90,41,0,32,0.391,39,0
759 | 0,123,72,0,0,36.3,0.258,52,1
760 | 1,106,76,0,0,37.5,0.197,26,0
761 | 6,190,92,0,0,35.5,0.278,66,1
762 | 2,88,58,26,16,28.4,0.766,22,0
763 | 9,170,74,31,0,44,0.403,43,1
764 | 9,89,62,0,0,22.5,0.142,33,0
765 | 10,101,76,48,180,32.9,0.171,63,0
766 | 2,122,70,27,0,36.8,0.34,27,0
767 | 5,121,72,23,112,26.2,0.245,30,0
768 | 1,126,60,0,0,30.1,0.349,47,1
769 | 1,93,70,31,0,30.4,0.315,23,0
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
Machine Learning Lab
3 |

4 |
5 |
Here is my contribution where I implemented multiple Machine Learning algorithms
6 |
7 |
8 |
9 | ## License
10 |
11 | This repository is under The MIT License. Read the [LICENSE](https://github.com/RiteshPuvvada/Machine-Learning-Lab/blob/main/LICENSE) file for more information.
12 |
--------------------------------------------------------------------------------
/Support Vector Machine/Linear_Support_Vector_Machine.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "Linear_Support_Vector_Machine.ipynb",
7 | "provenance": [],
8 | "collapsed_sections": [],
9 | "machine_shape": "hm"
10 | },
11 | "kernelspec": {
12 | "name": "python3",
13 | "display_name": "Python 3"
14 | }
15 | },
16 | "cells": [
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {
20 | "id": "0MRC0e0KhQ0S"
21 | },
22 | "source": [
23 | "# Support Vector Machine (SVM)"
24 | ]
25 | },
26 | {
27 | "cell_type": "markdown",
28 | "metadata": {
29 | "id": "LWd1UlMnhT2s"
30 | },
31 | "source": [
32 | "## Importing the libraries"
33 | ]
34 | },
35 | {
36 | "cell_type": "code",
37 | "metadata": {
38 | "id": "YvGPUQaHhXfL"
39 | },
40 | "source": [
41 | "import numpy as np\n",
42 | "import matplotlib.pyplot as plt\n",
43 | "import pandas as pd"
44 | ],
45 | "execution_count": null,
46 | "outputs": []
47 | },
48 | {
49 | "cell_type": "markdown",
50 | "metadata": {
51 | "id": "K1VMqkGvhc3-"
52 | },
53 | "source": [
54 | "## Importing the dataset"
55 | ]
56 | },
57 | {
58 | "cell_type": "code",
59 | "metadata": {
60 | "id": "M52QDmyzhh9s",
61 | "colab": {
62 | "base_uri": "https://localhost:8080/"
63 | },
64 | "outputId": "96786043-d89d-4499-d796-3a8ba9018e52"
65 | },
66 | "source": [
67 | "dataset = pd.read_csv('/content/diabetes.csv')\n",
68 | "X = dataset.iloc[:, :-1].values\n",
69 | "y = dataset.iloc[:, -1].values\n",
70 | "print(dataset)"
71 | ],
72 | "execution_count": null,
73 | "outputs": [
74 | {
75 | "output_type": "stream",
76 | "name": "stdout",
77 | "text": [
78 | " Pregnancies Glucose ... Age Outcome\n",
79 | "0 6 148 ... 50 1\n",
80 | "1 1 85 ... 31 0\n",
81 | "2 8 183 ... 32 1\n",
82 | "3 1 89 ... 21 0\n",
83 | "4 0 137 ... 33 1\n",
84 | ".. ... ... ... ... ...\n",
85 | "763 10 101 ... 63 0\n",
86 | "764 2 122 ... 27 0\n",
87 | "765 5 121 ... 30 0\n",
88 | "766 1 126 ... 47 1\n",
89 | "767 1 93 ... 23 0\n",
90 | "\n",
91 | "[768 rows x 9 columns]\n"
92 | ]
93 | }
94 | ]
95 | },
96 | {
97 | "cell_type": "markdown",
98 | "metadata": {
99 | "id": "YvxIPVyMhmKp"
100 | },
101 | "source": [
102 | "## Splitting the dataset into the Training set and Test set"
103 | ]
104 | },
105 | {
106 | "cell_type": "code",
107 | "metadata": {
108 | "id": "AVzJWAXIhxoC"
109 | },
110 | "source": [
111 | "from sklearn.model_selection import train_test_split\n",
112 | "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.25, random_state = 0)"
113 | ],
114 | "execution_count": null,
115 | "outputs": []
116 | },
117 | {
118 | "cell_type": "markdown",
119 | "metadata": {
120 | "id": "kW3c7UYih0hT"
121 | },
122 | "source": [
123 | "## Feature Scaling"
124 | ]
125 | },
126 | {
127 | "cell_type": "code",
128 | "metadata": {
129 | "id": "9fQlDPKCh8sc"
130 | },
131 | "source": [
132 | "from sklearn.preprocessing import StandardScaler\n",
133 | "sc = StandardScaler()\n",
134 | "X_train = sc.fit_transform(X_train)\n",
135 | "X_test = sc.transform(X_test)"
136 | ],
137 | "execution_count": null,
138 | "outputs": []
139 | },
140 | {
141 | "cell_type": "markdown",
142 | "metadata": {
143 | "id": "bb6jCOCQiAmP"
144 | },
145 | "source": [
146 | "## Training the SVM model on the Training set"
147 | ]
148 | },
149 | {
150 | "cell_type": "code",
151 | "metadata": {
152 | "id": "e0pFVAmciHQs",
153 | "colab": {
154 | "base_uri": "https://localhost:8080/"
155 | },
156 | "outputId": "e49c10ad-eb2b-48db-8b46-21fd00fcbd1d"
157 | },
158 | "source": [
159 | "from sklearn.svm import SVC\n",
160 | "classifier = SVC(kernel = 'linear', random_state = 0)\n",
161 | "classifier.fit(X_train, y_train)"
162 | ],
163 | "execution_count": null,
164 | "outputs": [
165 | {
166 | "output_type": "execute_result",
167 | "data": {
168 | "text/plain": [
169 | "SVC(C=1.0, break_ties=False, cache_size=200, class_weight=None, coef0=0.0,\n",
170 | " decision_function_shape='ovr', degree=3, gamma='scale', kernel='linear',\n",
171 | " max_iter=-1, probability=False, random_state=0, shrinking=True, tol=0.001,\n",
172 | " verbose=False)"
173 | ]
174 | },
175 | "metadata": {},
176 | "execution_count": 8
177 | }
178 | ]
179 | },
180 | {
181 | "cell_type": "markdown",
182 | "metadata": {
183 | "id": "h4Hwj34ziWQW"
184 | },
185 | "source": [
186 | "## Making the Confusion Matrix"
187 | ]
188 | },
189 | {
190 | "cell_type": "code",
191 | "metadata": {
192 | "id": "D6bpZwUiiXic",
193 | "colab": {
194 | "base_uri": "https://localhost:8080/"
195 | },
196 | "outputId": "15f93713-3665-4c2b-caca-d932469561fc"
197 | },
198 | "source": [
199 | "from sklearn.metrics import confusion_matrix, accuracy_score\n",
200 | "y_pred = classifier.predict(X_test)\n",
201 | "cm = confusion_matrix(y_test, y_pred)\n",
202 | "print(cm)\n",
203 | "accuracy_score(y_test, y_pred)"
204 | ],
205 | "execution_count": null,
206 | "outputs": [
207 | {
208 | "output_type": "stream",
209 | "name": "stdout",
210 | "text": [
211 | "[[117 13]\n",
212 | " [ 25 37]]\n",
213 | "\n"
214 | ]
215 | }
216 | ]
217 | }
218 | ]
219 | }
--------------------------------------------------------------------------------
/Support Vector Machine/diabetes.csv:
--------------------------------------------------------------------------------
1 | Pregnancies,Glucose,BloodPressure,SkinThickness,Insulin,BMI,DiabetesPedigreeFunction,Age,Outcome
2 | 6,148,72,35,0,33.6,0.627,50,1
3 | 1,85,66,29,0,26.6,0.351,31,0
4 | 8,183,64,0,0,23.3,0.672,32,1
5 | 1,89,66,23,94,28.1,0.167,21,0
6 | 0,137,40,35,168,43.1,2.288,33,1
7 | 5,116,74,0,0,25.6,0.201,30,0
8 | 3,78,50,32,88,31,0.248,26,1
9 | 10,115,0,0,0,35.3,0.134,29,0
10 | 2,197,70,45,543,30.5,0.158,53,1
11 | 8,125,96,0,0,0,0.232,54,1
12 | 4,110,92,0,0,37.6,0.191,30,0
13 | 10,168,74,0,0,38,0.537,34,1
14 | 10,139,80,0,0,27.1,1.441,57,0
15 | 1,189,60,23,846,30.1,0.398,59,1
16 | 5,166,72,19,175,25.8,0.587,51,1
17 | 7,100,0,0,0,30,0.484,32,1
18 | 0,118,84,47,230,45.8,0.551,31,1
19 | 7,107,74,0,0,29.6,0.254,31,1
20 | 1,103,30,38,83,43.3,0.183,33,0
21 | 1,115,70,30,96,34.6,0.529,32,1
22 | 3,126,88,41,235,39.3,0.704,27,0
23 | 8,99,84,0,0,35.4,0.388,50,0
24 | 7,196,90,0,0,39.8,0.451,41,1
25 | 9,119,80,35,0,29,0.263,29,1
26 | 11,143,94,33,146,36.6,0.254,51,1
27 | 10,125,70,26,115,31.1,0.205,41,1
28 | 7,147,76,0,0,39.4,0.257,43,1
29 | 1,97,66,15,140,23.2,0.487,22,0
30 | 13,145,82,19,110,22.2,0.245,57,0
31 | 5,117,92,0,0,34.1,0.337,38,0
32 | 5,109,75,26,0,36,0.546,60,0
33 | 3,158,76,36,245,31.6,0.851,28,1
34 | 3,88,58,11,54,24.8,0.267,22,0
35 | 6,92,92,0,0,19.9,0.188,28,0
36 | 10,122,78,31,0,27.6,0.512,45,0
37 | 4,103,60,33,192,24,0.966,33,0
38 | 11,138,76,0,0,33.2,0.42,35,0
39 | 9,102,76,37,0,32.9,0.665,46,1
40 | 2,90,68,42,0,38.2,0.503,27,1
41 | 4,111,72,47,207,37.1,1.39,56,1
42 | 3,180,64,25,70,34,0.271,26,0
43 | 7,133,84,0,0,40.2,0.696,37,0
44 | 7,106,92,18,0,22.7,0.235,48,0
45 | 9,171,110,24,240,45.4,0.721,54,1
46 | 7,159,64,0,0,27.4,0.294,40,0
47 | 0,180,66,39,0,42,1.893,25,1
48 | 1,146,56,0,0,29.7,0.564,29,0
49 | 2,71,70,27,0,28,0.586,22,0
50 | 7,103,66,32,0,39.1,0.344,31,1
51 | 7,105,0,0,0,0,0.305,24,0
52 | 1,103,80,11,82,19.4,0.491,22,0
53 | 1,101,50,15,36,24.2,0.526,26,0
54 | 5,88,66,21,23,24.4,0.342,30,0
55 | 8,176,90,34,300,33.7,0.467,58,1
56 | 7,150,66,42,342,34.7,0.718,42,0
57 | 1,73,50,10,0,23,0.248,21,0
58 | 7,187,68,39,304,37.7,0.254,41,1
59 | 0,100,88,60,110,46.8,0.962,31,0
60 | 0,146,82,0,0,40.5,1.781,44,0
61 | 0,105,64,41,142,41.5,0.173,22,0
62 | 2,84,0,0,0,0,0.304,21,0
63 | 8,133,72,0,0,32.9,0.27,39,1
64 | 5,44,62,0,0,25,0.587,36,0
65 | 2,141,58,34,128,25.4,0.699,24,0
66 | 7,114,66,0,0,32.8,0.258,42,1
67 | 5,99,74,27,0,29,0.203,32,0
68 | 0,109,88,30,0,32.5,0.855,38,1
69 | 2,109,92,0,0,42.7,0.845,54,0
70 | 1,95,66,13,38,19.6,0.334,25,0
71 | 4,146,85,27,100,28.9,0.189,27,0
72 | 2,100,66,20,90,32.9,0.867,28,1
73 | 5,139,64,35,140,28.6,0.411,26,0
74 | 13,126,90,0,0,43.4,0.583,42,1
75 | 4,129,86,20,270,35.1,0.231,23,0
76 | 1,79,75,30,0,32,0.396,22,0
77 | 1,0,48,20,0,24.7,0.14,22,0
78 | 7,62,78,0,0,32.6,0.391,41,0
79 | 5,95,72,33,0,37.7,0.37,27,0
80 | 0,131,0,0,0,43.2,0.27,26,1
81 | 2,112,66,22,0,25,0.307,24,0
82 | 3,113,44,13,0,22.4,0.14,22,0
83 | 2,74,0,0,0,0,0.102,22,0
84 | 7,83,78,26,71,29.3,0.767,36,0
85 | 0,101,65,28,0,24.6,0.237,22,0
86 | 5,137,108,0,0,48.8,0.227,37,1
87 | 2,110,74,29,125,32.4,0.698,27,0
88 | 13,106,72,54,0,36.6,0.178,45,0
89 | 2,100,68,25,71,38.5,0.324,26,0
90 | 15,136,70,32,110,37.1,0.153,43,1
91 | 1,107,68,19,0,26.5,0.165,24,0
92 | 1,80,55,0,0,19.1,0.258,21,0
93 | 4,123,80,15,176,32,0.443,34,0
94 | 7,81,78,40,48,46.7,0.261,42,0
95 | 4,134,72,0,0,23.8,0.277,60,1
96 | 2,142,82,18,64,24.7,0.761,21,0
97 | 6,144,72,27,228,33.9,0.255,40,0
98 | 2,92,62,28,0,31.6,0.13,24,0
99 | 1,71,48,18,76,20.4,0.323,22,0
100 | 6,93,50,30,64,28.7,0.356,23,0
101 | 1,122,90,51,220,49.7,0.325,31,1
102 | 1,163,72,0,0,39,1.222,33,1
103 | 1,151,60,0,0,26.1,0.179,22,0
104 | 0,125,96,0,0,22.5,0.262,21,0
105 | 1,81,72,18,40,26.6,0.283,24,0
106 | 2,85,65,0,0,39.6,0.93,27,0
107 | 1,126,56,29,152,28.7,0.801,21,0
108 | 1,96,122,0,0,22.4,0.207,27,0
109 | 4,144,58,28,140,29.5,0.287,37,0
110 | 3,83,58,31,18,34.3,0.336,25,0
111 | 0,95,85,25,36,37.4,0.247,24,1
112 | 3,171,72,33,135,33.3,0.199,24,1
113 | 8,155,62,26,495,34,0.543,46,1
114 | 1,89,76,34,37,31.2,0.192,23,0
115 | 4,76,62,0,0,34,0.391,25,0
116 | 7,160,54,32,175,30.5,0.588,39,1
117 | 4,146,92,0,0,31.2,0.539,61,1
118 | 5,124,74,0,0,34,0.22,38,1
119 | 5,78,48,0,0,33.7,0.654,25,0
120 | 4,97,60,23,0,28.2,0.443,22,0
121 | 4,99,76,15,51,23.2,0.223,21,0
122 | 0,162,76,56,100,53.2,0.759,25,1
123 | 6,111,64,39,0,34.2,0.26,24,0
124 | 2,107,74,30,100,33.6,0.404,23,0
125 | 5,132,80,0,0,26.8,0.186,69,0
126 | 0,113,76,0,0,33.3,0.278,23,1
127 | 1,88,30,42,99,55,0.496,26,1
128 | 3,120,70,30,135,42.9,0.452,30,0
129 | 1,118,58,36,94,33.3,0.261,23,0
130 | 1,117,88,24,145,34.5,0.403,40,1
131 | 0,105,84,0,0,27.9,0.741,62,1
132 | 4,173,70,14,168,29.7,0.361,33,1
133 | 9,122,56,0,0,33.3,1.114,33,1
134 | 3,170,64,37,225,34.5,0.356,30,1
135 | 8,84,74,31,0,38.3,0.457,39,0
136 | 2,96,68,13,49,21.1,0.647,26,0
137 | 2,125,60,20,140,33.8,0.088,31,0
138 | 0,100,70,26,50,30.8,0.597,21,0
139 | 0,93,60,25,92,28.7,0.532,22,0
140 | 0,129,80,0,0,31.2,0.703,29,0
141 | 5,105,72,29,325,36.9,0.159,28,0
142 | 3,128,78,0,0,21.1,0.268,55,0
143 | 5,106,82,30,0,39.5,0.286,38,0
144 | 2,108,52,26,63,32.5,0.318,22,0
145 | 10,108,66,0,0,32.4,0.272,42,1
146 | 4,154,62,31,284,32.8,0.237,23,0
147 | 0,102,75,23,0,0,0.572,21,0
148 | 9,57,80,37,0,32.8,0.096,41,0
149 | 2,106,64,35,119,30.5,1.4,34,0
150 | 5,147,78,0,0,33.7,0.218,65,0
151 | 2,90,70,17,0,27.3,0.085,22,0
152 | 1,136,74,50,204,37.4,0.399,24,0
153 | 4,114,65,0,0,21.9,0.432,37,0
154 | 9,156,86,28,155,34.3,1.189,42,1
155 | 1,153,82,42,485,40.6,0.687,23,0
156 | 8,188,78,0,0,47.9,0.137,43,1
157 | 7,152,88,44,0,50,0.337,36,1
158 | 2,99,52,15,94,24.6,0.637,21,0
159 | 1,109,56,21,135,25.2,0.833,23,0
160 | 2,88,74,19,53,29,0.229,22,0
161 | 17,163,72,41,114,40.9,0.817,47,1
162 | 4,151,90,38,0,29.7,0.294,36,0
163 | 7,102,74,40,105,37.2,0.204,45,0
164 | 0,114,80,34,285,44.2,0.167,27,0
165 | 2,100,64,23,0,29.7,0.368,21,0
166 | 0,131,88,0,0,31.6,0.743,32,1
167 | 6,104,74,18,156,29.9,0.722,41,1
168 | 3,148,66,25,0,32.5,0.256,22,0
169 | 4,120,68,0,0,29.6,0.709,34,0
170 | 4,110,66,0,0,31.9,0.471,29,0
171 | 3,111,90,12,78,28.4,0.495,29,0
172 | 6,102,82,0,0,30.8,0.18,36,1
173 | 6,134,70,23,130,35.4,0.542,29,1
174 | 2,87,0,23,0,28.9,0.773,25,0
175 | 1,79,60,42,48,43.5,0.678,23,0
176 | 2,75,64,24,55,29.7,0.37,33,0
177 | 8,179,72,42,130,32.7,0.719,36,1
178 | 6,85,78,0,0,31.2,0.382,42,0
179 | 0,129,110,46,130,67.1,0.319,26,1
180 | 5,143,78,0,0,45,0.19,47,0
181 | 5,130,82,0,0,39.1,0.956,37,1
182 | 6,87,80,0,0,23.2,0.084,32,0
183 | 0,119,64,18,92,34.9,0.725,23,0
184 | 1,0,74,20,23,27.7,0.299,21,0
185 | 5,73,60,0,0,26.8,0.268,27,0
186 | 4,141,74,0,0,27.6,0.244,40,0
187 | 7,194,68,28,0,35.9,0.745,41,1
188 | 8,181,68,36,495,30.1,0.615,60,1
189 | 1,128,98,41,58,32,1.321,33,1
190 | 8,109,76,39,114,27.9,0.64,31,1
191 | 5,139,80,35,160,31.6,0.361,25,1
192 | 3,111,62,0,0,22.6,0.142,21,0
193 | 9,123,70,44,94,33.1,0.374,40,0
194 | 7,159,66,0,0,30.4,0.383,36,1
195 | 11,135,0,0,0,52.3,0.578,40,1
196 | 8,85,55,20,0,24.4,0.136,42,0
197 | 5,158,84,41,210,39.4,0.395,29,1
198 | 1,105,58,0,0,24.3,0.187,21,0
199 | 3,107,62,13,48,22.9,0.678,23,1
200 | 4,109,64,44,99,34.8,0.905,26,1
201 | 4,148,60,27,318,30.9,0.15,29,1
202 | 0,113,80,16,0,31,0.874,21,0
203 | 1,138,82,0,0,40.1,0.236,28,0
204 | 0,108,68,20,0,27.3,0.787,32,0
205 | 2,99,70,16,44,20.4,0.235,27,0
206 | 6,103,72,32,190,37.7,0.324,55,0
207 | 5,111,72,28,0,23.9,0.407,27,0
208 | 8,196,76,29,280,37.5,0.605,57,1
209 | 5,162,104,0,0,37.7,0.151,52,1
210 | 1,96,64,27,87,33.2,0.289,21,0
211 | 7,184,84,33,0,35.5,0.355,41,1
212 | 2,81,60,22,0,27.7,0.29,25,0
213 | 0,147,85,54,0,42.8,0.375,24,0
214 | 7,179,95,31,0,34.2,0.164,60,0
215 | 0,140,65,26,130,42.6,0.431,24,1
216 | 9,112,82,32,175,34.2,0.26,36,1
217 | 12,151,70,40,271,41.8,0.742,38,1
218 | 5,109,62,41,129,35.8,0.514,25,1
219 | 6,125,68,30,120,30,0.464,32,0
220 | 5,85,74,22,0,29,1.224,32,1
221 | 5,112,66,0,0,37.8,0.261,41,1
222 | 0,177,60,29,478,34.6,1.072,21,1
223 | 2,158,90,0,0,31.6,0.805,66,1
224 | 7,119,0,0,0,25.2,0.209,37,0
225 | 7,142,60,33,190,28.8,0.687,61,0
226 | 1,100,66,15,56,23.6,0.666,26,0
227 | 1,87,78,27,32,34.6,0.101,22,0
228 | 0,101,76,0,0,35.7,0.198,26,0
229 | 3,162,52,38,0,37.2,0.652,24,1
230 | 4,197,70,39,744,36.7,2.329,31,0
231 | 0,117,80,31,53,45.2,0.089,24,0
232 | 4,142,86,0,0,44,0.645,22,1
233 | 6,134,80,37,370,46.2,0.238,46,1
234 | 1,79,80,25,37,25.4,0.583,22,0
235 | 4,122,68,0,0,35,0.394,29,0
236 | 3,74,68,28,45,29.7,0.293,23,0
237 | 4,171,72,0,0,43.6,0.479,26,1
238 | 7,181,84,21,192,35.9,0.586,51,1
239 | 0,179,90,27,0,44.1,0.686,23,1
240 | 9,164,84,21,0,30.8,0.831,32,1
241 | 0,104,76,0,0,18.4,0.582,27,0
242 | 1,91,64,24,0,29.2,0.192,21,0
243 | 4,91,70,32,88,33.1,0.446,22,0
244 | 3,139,54,0,0,25.6,0.402,22,1
245 | 6,119,50,22,176,27.1,1.318,33,1
246 | 2,146,76,35,194,38.2,0.329,29,0
247 | 9,184,85,15,0,30,1.213,49,1
248 | 10,122,68,0,0,31.2,0.258,41,0
249 | 0,165,90,33,680,52.3,0.427,23,0
250 | 9,124,70,33,402,35.4,0.282,34,0
251 | 1,111,86,19,0,30.1,0.143,23,0
252 | 9,106,52,0,0,31.2,0.38,42,0
253 | 2,129,84,0,0,28,0.284,27,0
254 | 2,90,80,14,55,24.4,0.249,24,0
255 | 0,86,68,32,0,35.8,0.238,25,0
256 | 12,92,62,7,258,27.6,0.926,44,1
257 | 1,113,64,35,0,33.6,0.543,21,1
258 | 3,111,56,39,0,30.1,0.557,30,0
259 | 2,114,68,22,0,28.7,0.092,25,0
260 | 1,193,50,16,375,25.9,0.655,24,0
261 | 11,155,76,28,150,33.3,1.353,51,1
262 | 3,191,68,15,130,30.9,0.299,34,0
263 | 3,141,0,0,0,30,0.761,27,1
264 | 4,95,70,32,0,32.1,0.612,24,0
265 | 3,142,80,15,0,32.4,0.2,63,0
266 | 4,123,62,0,0,32,0.226,35,1
267 | 5,96,74,18,67,33.6,0.997,43,0
268 | 0,138,0,0,0,36.3,0.933,25,1
269 | 2,128,64,42,0,40,1.101,24,0
270 | 0,102,52,0,0,25.1,0.078,21,0
271 | 2,146,0,0,0,27.5,0.24,28,1
272 | 10,101,86,37,0,45.6,1.136,38,1
273 | 2,108,62,32,56,25.2,0.128,21,0
274 | 3,122,78,0,0,23,0.254,40,0
275 | 1,71,78,50,45,33.2,0.422,21,0
276 | 13,106,70,0,0,34.2,0.251,52,0
277 | 2,100,70,52,57,40.5,0.677,25,0
278 | 7,106,60,24,0,26.5,0.296,29,1
279 | 0,104,64,23,116,27.8,0.454,23,0
280 | 5,114,74,0,0,24.9,0.744,57,0
281 | 2,108,62,10,278,25.3,0.881,22,0
282 | 0,146,70,0,0,37.9,0.334,28,1
283 | 10,129,76,28,122,35.9,0.28,39,0
284 | 7,133,88,15,155,32.4,0.262,37,0
285 | 7,161,86,0,0,30.4,0.165,47,1
286 | 2,108,80,0,0,27,0.259,52,1
287 | 7,136,74,26,135,26,0.647,51,0
288 | 5,155,84,44,545,38.7,0.619,34,0
289 | 1,119,86,39,220,45.6,0.808,29,1
290 | 4,96,56,17,49,20.8,0.34,26,0
291 | 5,108,72,43,75,36.1,0.263,33,0
292 | 0,78,88,29,40,36.9,0.434,21,0
293 | 0,107,62,30,74,36.6,0.757,25,1
294 | 2,128,78,37,182,43.3,1.224,31,1
295 | 1,128,48,45,194,40.5,0.613,24,1
296 | 0,161,50,0,0,21.9,0.254,65,0
297 | 6,151,62,31,120,35.5,0.692,28,0
298 | 2,146,70,38,360,28,0.337,29,1
299 | 0,126,84,29,215,30.7,0.52,24,0
300 | 14,100,78,25,184,36.6,0.412,46,1
301 | 8,112,72,0,0,23.6,0.84,58,0
302 | 0,167,0,0,0,32.3,0.839,30,1
303 | 2,144,58,33,135,31.6,0.422,25,1
304 | 5,77,82,41,42,35.8,0.156,35,0
305 | 5,115,98,0,0,52.9,0.209,28,1
306 | 3,150,76,0,0,21,0.207,37,0
307 | 2,120,76,37,105,39.7,0.215,29,0
308 | 10,161,68,23,132,25.5,0.326,47,1
309 | 0,137,68,14,148,24.8,0.143,21,0
310 | 0,128,68,19,180,30.5,1.391,25,1
311 | 2,124,68,28,205,32.9,0.875,30,1
312 | 6,80,66,30,0,26.2,0.313,41,0
313 | 0,106,70,37,148,39.4,0.605,22,0
314 | 2,155,74,17,96,26.6,0.433,27,1
315 | 3,113,50,10,85,29.5,0.626,25,0
316 | 7,109,80,31,0,35.9,1.127,43,1
317 | 2,112,68,22,94,34.1,0.315,26,0
318 | 3,99,80,11,64,19.3,0.284,30,0
319 | 3,182,74,0,0,30.5,0.345,29,1
320 | 3,115,66,39,140,38.1,0.15,28,0
321 | 6,194,78,0,0,23.5,0.129,59,1
322 | 4,129,60,12,231,27.5,0.527,31,0
323 | 3,112,74,30,0,31.6,0.197,25,1
324 | 0,124,70,20,0,27.4,0.254,36,1
325 | 13,152,90,33,29,26.8,0.731,43,1
326 | 2,112,75,32,0,35.7,0.148,21,0
327 | 1,157,72,21,168,25.6,0.123,24,0
328 | 1,122,64,32,156,35.1,0.692,30,1
329 | 10,179,70,0,0,35.1,0.2,37,0
330 | 2,102,86,36,120,45.5,0.127,23,1
331 | 6,105,70,32,68,30.8,0.122,37,0
332 | 8,118,72,19,0,23.1,1.476,46,0
333 | 2,87,58,16,52,32.7,0.166,25,0
334 | 1,180,0,0,0,43.3,0.282,41,1
335 | 12,106,80,0,0,23.6,0.137,44,0
336 | 1,95,60,18,58,23.9,0.26,22,0
337 | 0,165,76,43,255,47.9,0.259,26,0
338 | 0,117,0,0,0,33.8,0.932,44,0
339 | 5,115,76,0,0,31.2,0.343,44,1
340 | 9,152,78,34,171,34.2,0.893,33,1
341 | 7,178,84,0,0,39.9,0.331,41,1
342 | 1,130,70,13,105,25.9,0.472,22,0
343 | 1,95,74,21,73,25.9,0.673,36,0
344 | 1,0,68,35,0,32,0.389,22,0
345 | 5,122,86,0,0,34.7,0.29,33,0
346 | 8,95,72,0,0,36.8,0.485,57,0
347 | 8,126,88,36,108,38.5,0.349,49,0
348 | 1,139,46,19,83,28.7,0.654,22,0
349 | 3,116,0,0,0,23.5,0.187,23,0
350 | 3,99,62,19,74,21.8,0.279,26,0
351 | 5,0,80,32,0,41,0.346,37,1
352 | 4,92,80,0,0,42.2,0.237,29,0
353 | 4,137,84,0,0,31.2,0.252,30,0
354 | 3,61,82,28,0,34.4,0.243,46,0
355 | 1,90,62,12,43,27.2,0.58,24,0
356 | 3,90,78,0,0,42.7,0.559,21,0
357 | 9,165,88,0,0,30.4,0.302,49,1
358 | 1,125,50,40,167,33.3,0.962,28,1
359 | 13,129,0,30,0,39.9,0.569,44,1
360 | 12,88,74,40,54,35.3,0.378,48,0
361 | 1,196,76,36,249,36.5,0.875,29,1
362 | 5,189,64,33,325,31.2,0.583,29,1
363 | 5,158,70,0,0,29.8,0.207,63,0
364 | 5,103,108,37,0,39.2,0.305,65,0
365 | 4,146,78,0,0,38.5,0.52,67,1
366 | 4,147,74,25,293,34.9,0.385,30,0
367 | 5,99,54,28,83,34,0.499,30,0
368 | 6,124,72,0,0,27.6,0.368,29,1
369 | 0,101,64,17,0,21,0.252,21,0
370 | 3,81,86,16,66,27.5,0.306,22,0
371 | 1,133,102,28,140,32.8,0.234,45,1
372 | 3,173,82,48,465,38.4,2.137,25,1
373 | 0,118,64,23,89,0,1.731,21,0
374 | 0,84,64,22,66,35.8,0.545,21,0
375 | 2,105,58,40,94,34.9,0.225,25,0
376 | 2,122,52,43,158,36.2,0.816,28,0
377 | 12,140,82,43,325,39.2,0.528,58,1
378 | 0,98,82,15,84,25.2,0.299,22,0
379 | 1,87,60,37,75,37.2,0.509,22,0
380 | 4,156,75,0,0,48.3,0.238,32,1
381 | 0,93,100,39,72,43.4,1.021,35,0
382 | 1,107,72,30,82,30.8,0.821,24,0
383 | 0,105,68,22,0,20,0.236,22,0
384 | 1,109,60,8,182,25.4,0.947,21,0
385 | 1,90,62,18,59,25.1,1.268,25,0
386 | 1,125,70,24,110,24.3,0.221,25,0
387 | 1,119,54,13,50,22.3,0.205,24,0
388 | 5,116,74,29,0,32.3,0.66,35,1
389 | 8,105,100,36,0,43.3,0.239,45,1
390 | 5,144,82,26,285,32,0.452,58,1
391 | 3,100,68,23,81,31.6,0.949,28,0
392 | 1,100,66,29,196,32,0.444,42,0
393 | 5,166,76,0,0,45.7,0.34,27,1
394 | 1,131,64,14,415,23.7,0.389,21,0
395 | 4,116,72,12,87,22.1,0.463,37,0
396 | 4,158,78,0,0,32.9,0.803,31,1
397 | 2,127,58,24,275,27.7,1.6,25,0
398 | 3,96,56,34,115,24.7,0.944,39,0
399 | 0,131,66,40,0,34.3,0.196,22,1
400 | 3,82,70,0,0,21.1,0.389,25,0
401 | 3,193,70,31,0,34.9,0.241,25,1
402 | 4,95,64,0,0,32,0.161,31,1
403 | 6,137,61,0,0,24.2,0.151,55,0
404 | 5,136,84,41,88,35,0.286,35,1
405 | 9,72,78,25,0,31.6,0.28,38,0
406 | 5,168,64,0,0,32.9,0.135,41,1
407 | 2,123,48,32,165,42.1,0.52,26,0
408 | 4,115,72,0,0,28.9,0.376,46,1
409 | 0,101,62,0,0,21.9,0.336,25,0
410 | 8,197,74,0,0,25.9,1.191,39,1
411 | 1,172,68,49,579,42.4,0.702,28,1
412 | 6,102,90,39,0,35.7,0.674,28,0
413 | 1,112,72,30,176,34.4,0.528,25,0
414 | 1,143,84,23,310,42.4,1.076,22,0
415 | 1,143,74,22,61,26.2,0.256,21,0
416 | 0,138,60,35,167,34.6,0.534,21,1
417 | 3,173,84,33,474,35.7,0.258,22,1
418 | 1,97,68,21,0,27.2,1.095,22,0
419 | 4,144,82,32,0,38.5,0.554,37,1
420 | 1,83,68,0,0,18.2,0.624,27,0
421 | 3,129,64,29,115,26.4,0.219,28,1
422 | 1,119,88,41,170,45.3,0.507,26,0
423 | 2,94,68,18,76,26,0.561,21,0
424 | 0,102,64,46,78,40.6,0.496,21,0
425 | 2,115,64,22,0,30.8,0.421,21,0
426 | 8,151,78,32,210,42.9,0.516,36,1
427 | 4,184,78,39,277,37,0.264,31,1
428 | 0,94,0,0,0,0,0.256,25,0
429 | 1,181,64,30,180,34.1,0.328,38,1
430 | 0,135,94,46,145,40.6,0.284,26,0
431 | 1,95,82,25,180,35,0.233,43,1
432 | 2,99,0,0,0,22.2,0.108,23,0
433 | 3,89,74,16,85,30.4,0.551,38,0
434 | 1,80,74,11,60,30,0.527,22,0
435 | 2,139,75,0,0,25.6,0.167,29,0
436 | 1,90,68,8,0,24.5,1.138,36,0
437 | 0,141,0,0,0,42.4,0.205,29,1
438 | 12,140,85,33,0,37.4,0.244,41,0
439 | 5,147,75,0,0,29.9,0.434,28,0
440 | 1,97,70,15,0,18.2,0.147,21,0
441 | 6,107,88,0,0,36.8,0.727,31,0
442 | 0,189,104,25,0,34.3,0.435,41,1
443 | 2,83,66,23,50,32.2,0.497,22,0
444 | 4,117,64,27,120,33.2,0.23,24,0
445 | 8,108,70,0,0,30.5,0.955,33,1
446 | 4,117,62,12,0,29.7,0.38,30,1
447 | 0,180,78,63,14,59.4,2.42,25,1
448 | 1,100,72,12,70,25.3,0.658,28,0
449 | 0,95,80,45,92,36.5,0.33,26,0
450 | 0,104,64,37,64,33.6,0.51,22,1
451 | 0,120,74,18,63,30.5,0.285,26,0
452 | 1,82,64,13,95,21.2,0.415,23,0
453 | 2,134,70,0,0,28.9,0.542,23,1
454 | 0,91,68,32,210,39.9,0.381,25,0
455 | 2,119,0,0,0,19.6,0.832,72,0
456 | 2,100,54,28,105,37.8,0.498,24,0
457 | 14,175,62,30,0,33.6,0.212,38,1
458 | 1,135,54,0,0,26.7,0.687,62,0
459 | 5,86,68,28,71,30.2,0.364,24,0
460 | 10,148,84,48,237,37.6,1.001,51,1
461 | 9,134,74,33,60,25.9,0.46,81,0
462 | 9,120,72,22,56,20.8,0.733,48,0
463 | 1,71,62,0,0,21.8,0.416,26,0
464 | 8,74,70,40,49,35.3,0.705,39,0
465 | 5,88,78,30,0,27.6,0.258,37,0
466 | 10,115,98,0,0,24,1.022,34,0
467 | 0,124,56,13,105,21.8,0.452,21,0
468 | 0,74,52,10,36,27.8,0.269,22,0
469 | 0,97,64,36,100,36.8,0.6,25,0
470 | 8,120,0,0,0,30,0.183,38,1
471 | 6,154,78,41,140,46.1,0.571,27,0
472 | 1,144,82,40,0,41.3,0.607,28,0
473 | 0,137,70,38,0,33.2,0.17,22,0
474 | 0,119,66,27,0,38.8,0.259,22,0
475 | 7,136,90,0,0,29.9,0.21,50,0
476 | 4,114,64,0,0,28.9,0.126,24,0
477 | 0,137,84,27,0,27.3,0.231,59,0
478 | 2,105,80,45,191,33.7,0.711,29,1
479 | 7,114,76,17,110,23.8,0.466,31,0
480 | 8,126,74,38,75,25.9,0.162,39,0
481 | 4,132,86,31,0,28,0.419,63,0
482 | 3,158,70,30,328,35.5,0.344,35,1
483 | 0,123,88,37,0,35.2,0.197,29,0
484 | 4,85,58,22,49,27.8,0.306,28,0
485 | 0,84,82,31,125,38.2,0.233,23,0
486 | 0,145,0,0,0,44.2,0.63,31,1
487 | 0,135,68,42,250,42.3,0.365,24,1
488 | 1,139,62,41,480,40.7,0.536,21,0
489 | 0,173,78,32,265,46.5,1.159,58,0
490 | 4,99,72,17,0,25.6,0.294,28,0
491 | 8,194,80,0,0,26.1,0.551,67,0
492 | 2,83,65,28,66,36.8,0.629,24,0
493 | 2,89,90,30,0,33.5,0.292,42,0
494 | 4,99,68,38,0,32.8,0.145,33,0
495 | 4,125,70,18,122,28.9,1.144,45,1
496 | 3,80,0,0,0,0,0.174,22,0
497 | 6,166,74,0,0,26.6,0.304,66,0
498 | 5,110,68,0,0,26,0.292,30,0
499 | 2,81,72,15,76,30.1,0.547,25,0
500 | 7,195,70,33,145,25.1,0.163,55,1
501 | 6,154,74,32,193,29.3,0.839,39,0
502 | 2,117,90,19,71,25.2,0.313,21,0
503 | 3,84,72,32,0,37.2,0.267,28,0
504 | 6,0,68,41,0,39,0.727,41,1
505 | 7,94,64,25,79,33.3,0.738,41,0
506 | 3,96,78,39,0,37.3,0.238,40,0
507 | 10,75,82,0,0,33.3,0.263,38,0
508 | 0,180,90,26,90,36.5,0.314,35,1
509 | 1,130,60,23,170,28.6,0.692,21,0
510 | 2,84,50,23,76,30.4,0.968,21,0
511 | 8,120,78,0,0,25,0.409,64,0
512 | 12,84,72,31,0,29.7,0.297,46,1
513 | 0,139,62,17,210,22.1,0.207,21,0
514 | 9,91,68,0,0,24.2,0.2,58,0
515 | 2,91,62,0,0,27.3,0.525,22,0
516 | 3,99,54,19,86,25.6,0.154,24,0
517 | 3,163,70,18,105,31.6,0.268,28,1
518 | 9,145,88,34,165,30.3,0.771,53,1
519 | 7,125,86,0,0,37.6,0.304,51,0
520 | 13,76,60,0,0,32.8,0.18,41,0
521 | 6,129,90,7,326,19.6,0.582,60,0
522 | 2,68,70,32,66,25,0.187,25,0
523 | 3,124,80,33,130,33.2,0.305,26,0
524 | 6,114,0,0,0,0,0.189,26,0
525 | 9,130,70,0,0,34.2,0.652,45,1
526 | 3,125,58,0,0,31.6,0.151,24,0
527 | 3,87,60,18,0,21.8,0.444,21,0
528 | 1,97,64,19,82,18.2,0.299,21,0
529 | 3,116,74,15,105,26.3,0.107,24,0
530 | 0,117,66,31,188,30.8,0.493,22,0
531 | 0,111,65,0,0,24.6,0.66,31,0
532 | 2,122,60,18,106,29.8,0.717,22,0
533 | 0,107,76,0,0,45.3,0.686,24,0
534 | 1,86,66,52,65,41.3,0.917,29,0
535 | 6,91,0,0,0,29.8,0.501,31,0
536 | 1,77,56,30,56,33.3,1.251,24,0
537 | 4,132,0,0,0,32.9,0.302,23,1
538 | 0,105,90,0,0,29.6,0.197,46,0
539 | 0,57,60,0,0,21.7,0.735,67,0
540 | 0,127,80,37,210,36.3,0.804,23,0
541 | 3,129,92,49,155,36.4,0.968,32,1
542 | 8,100,74,40,215,39.4,0.661,43,1
543 | 3,128,72,25,190,32.4,0.549,27,1
544 | 10,90,85,32,0,34.9,0.825,56,1
545 | 4,84,90,23,56,39.5,0.159,25,0
546 | 1,88,78,29,76,32,0.365,29,0
547 | 8,186,90,35,225,34.5,0.423,37,1
548 | 5,187,76,27,207,43.6,1.034,53,1
549 | 4,131,68,21,166,33.1,0.16,28,0
550 | 1,164,82,43,67,32.8,0.341,50,0
551 | 4,189,110,31,0,28.5,0.68,37,0
552 | 1,116,70,28,0,27.4,0.204,21,0
553 | 3,84,68,30,106,31.9,0.591,25,0
554 | 6,114,88,0,0,27.8,0.247,66,0
555 | 1,88,62,24,44,29.9,0.422,23,0
556 | 1,84,64,23,115,36.9,0.471,28,0
557 | 7,124,70,33,215,25.5,0.161,37,0
558 | 1,97,70,40,0,38.1,0.218,30,0
559 | 8,110,76,0,0,27.8,0.237,58,0
560 | 11,103,68,40,0,46.2,0.126,42,0
561 | 11,85,74,0,0,30.1,0.3,35,0
562 | 6,125,76,0,0,33.8,0.121,54,1
563 | 0,198,66,32,274,41.3,0.502,28,1
564 | 1,87,68,34,77,37.6,0.401,24,0
565 | 6,99,60,19,54,26.9,0.497,32,0
566 | 0,91,80,0,0,32.4,0.601,27,0
567 | 2,95,54,14,88,26.1,0.748,22,0
568 | 1,99,72,30,18,38.6,0.412,21,0
569 | 6,92,62,32,126,32,0.085,46,0
570 | 4,154,72,29,126,31.3,0.338,37,0
571 | 0,121,66,30,165,34.3,0.203,33,1
572 | 3,78,70,0,0,32.5,0.27,39,0
573 | 2,130,96,0,0,22.6,0.268,21,0
574 | 3,111,58,31,44,29.5,0.43,22,0
575 | 2,98,60,17,120,34.7,0.198,22,0
576 | 1,143,86,30,330,30.1,0.892,23,0
577 | 1,119,44,47,63,35.5,0.28,25,0
578 | 6,108,44,20,130,24,0.813,35,0
579 | 2,118,80,0,0,42.9,0.693,21,1
580 | 10,133,68,0,0,27,0.245,36,0
581 | 2,197,70,99,0,34.7,0.575,62,1
582 | 0,151,90,46,0,42.1,0.371,21,1
583 | 6,109,60,27,0,25,0.206,27,0
584 | 12,121,78,17,0,26.5,0.259,62,0
585 | 8,100,76,0,0,38.7,0.19,42,0
586 | 8,124,76,24,600,28.7,0.687,52,1
587 | 1,93,56,11,0,22.5,0.417,22,0
588 | 8,143,66,0,0,34.9,0.129,41,1
589 | 6,103,66,0,0,24.3,0.249,29,0
590 | 3,176,86,27,156,33.3,1.154,52,1
591 | 0,73,0,0,0,21.1,0.342,25,0
592 | 11,111,84,40,0,46.8,0.925,45,1
593 | 2,112,78,50,140,39.4,0.175,24,0
594 | 3,132,80,0,0,34.4,0.402,44,1
595 | 2,82,52,22,115,28.5,1.699,25,0
596 | 6,123,72,45,230,33.6,0.733,34,0
597 | 0,188,82,14,185,32,0.682,22,1
598 | 0,67,76,0,0,45.3,0.194,46,0
599 | 1,89,24,19,25,27.8,0.559,21,0
600 | 1,173,74,0,0,36.8,0.088,38,1
601 | 1,109,38,18,120,23.1,0.407,26,0
602 | 1,108,88,19,0,27.1,0.4,24,0
603 | 6,96,0,0,0,23.7,0.19,28,0
604 | 1,124,74,36,0,27.8,0.1,30,0
605 | 7,150,78,29,126,35.2,0.692,54,1
606 | 4,183,0,0,0,28.4,0.212,36,1
607 | 1,124,60,32,0,35.8,0.514,21,0
608 | 1,181,78,42,293,40,1.258,22,1
609 | 1,92,62,25,41,19.5,0.482,25,0
610 | 0,152,82,39,272,41.5,0.27,27,0
611 | 1,111,62,13,182,24,0.138,23,0
612 | 3,106,54,21,158,30.9,0.292,24,0
613 | 3,174,58,22,194,32.9,0.593,36,1
614 | 7,168,88,42,321,38.2,0.787,40,1
615 | 6,105,80,28,0,32.5,0.878,26,0
616 | 11,138,74,26,144,36.1,0.557,50,1
617 | 3,106,72,0,0,25.8,0.207,27,0
618 | 6,117,96,0,0,28.7,0.157,30,0
619 | 2,68,62,13,15,20.1,0.257,23,0
620 | 9,112,82,24,0,28.2,1.282,50,1
621 | 0,119,0,0,0,32.4,0.141,24,1
622 | 2,112,86,42,160,38.4,0.246,28,0
623 | 2,92,76,20,0,24.2,1.698,28,0
624 | 6,183,94,0,0,40.8,1.461,45,0
625 | 0,94,70,27,115,43.5,0.347,21,0
626 | 2,108,64,0,0,30.8,0.158,21,0
627 | 4,90,88,47,54,37.7,0.362,29,0
628 | 0,125,68,0,0,24.7,0.206,21,0
629 | 0,132,78,0,0,32.4,0.393,21,0
630 | 5,128,80,0,0,34.6,0.144,45,0
631 | 4,94,65,22,0,24.7,0.148,21,0
632 | 7,114,64,0,0,27.4,0.732,34,1
633 | 0,102,78,40,90,34.5,0.238,24,0
634 | 2,111,60,0,0,26.2,0.343,23,0
635 | 1,128,82,17,183,27.5,0.115,22,0
636 | 10,92,62,0,0,25.9,0.167,31,0
637 | 13,104,72,0,0,31.2,0.465,38,1
638 | 5,104,74,0,0,28.8,0.153,48,0
639 | 2,94,76,18,66,31.6,0.649,23,0
640 | 7,97,76,32,91,40.9,0.871,32,1
641 | 1,100,74,12,46,19.5,0.149,28,0
642 | 0,102,86,17,105,29.3,0.695,27,0
643 | 4,128,70,0,0,34.3,0.303,24,0
644 | 6,147,80,0,0,29.5,0.178,50,1
645 | 4,90,0,0,0,28,0.61,31,0
646 | 3,103,72,30,152,27.6,0.73,27,0
647 | 2,157,74,35,440,39.4,0.134,30,0
648 | 1,167,74,17,144,23.4,0.447,33,1
649 | 0,179,50,36,159,37.8,0.455,22,1
650 | 11,136,84,35,130,28.3,0.26,42,1
651 | 0,107,60,25,0,26.4,0.133,23,0
652 | 1,91,54,25,100,25.2,0.234,23,0
653 | 1,117,60,23,106,33.8,0.466,27,0
654 | 5,123,74,40,77,34.1,0.269,28,0
655 | 2,120,54,0,0,26.8,0.455,27,0
656 | 1,106,70,28,135,34.2,0.142,22,0
657 | 2,155,52,27,540,38.7,0.24,25,1
658 | 2,101,58,35,90,21.8,0.155,22,0
659 | 1,120,80,48,200,38.9,1.162,41,0
660 | 11,127,106,0,0,39,0.19,51,0
661 | 3,80,82,31,70,34.2,1.292,27,1
662 | 10,162,84,0,0,27.7,0.182,54,0
663 | 1,199,76,43,0,42.9,1.394,22,1
664 | 8,167,106,46,231,37.6,0.165,43,1
665 | 9,145,80,46,130,37.9,0.637,40,1
666 | 6,115,60,39,0,33.7,0.245,40,1
667 | 1,112,80,45,132,34.8,0.217,24,0
668 | 4,145,82,18,0,32.5,0.235,70,1
669 | 10,111,70,27,0,27.5,0.141,40,1
670 | 6,98,58,33,190,34,0.43,43,0
671 | 9,154,78,30,100,30.9,0.164,45,0
672 | 6,165,68,26,168,33.6,0.631,49,0
673 | 1,99,58,10,0,25.4,0.551,21,0
674 | 10,68,106,23,49,35.5,0.285,47,0
675 | 3,123,100,35,240,57.3,0.88,22,0
676 | 8,91,82,0,0,35.6,0.587,68,0
677 | 6,195,70,0,0,30.9,0.328,31,1
678 | 9,156,86,0,0,24.8,0.23,53,1
679 | 0,93,60,0,0,35.3,0.263,25,0
680 | 3,121,52,0,0,36,0.127,25,1
681 | 2,101,58,17,265,24.2,0.614,23,0
682 | 2,56,56,28,45,24.2,0.332,22,0
683 | 0,162,76,36,0,49.6,0.364,26,1
684 | 0,95,64,39,105,44.6,0.366,22,0
685 | 4,125,80,0,0,32.3,0.536,27,1
686 | 5,136,82,0,0,0,0.64,69,0
687 | 2,129,74,26,205,33.2,0.591,25,0
688 | 3,130,64,0,0,23.1,0.314,22,0
689 | 1,107,50,19,0,28.3,0.181,29,0
690 | 1,140,74,26,180,24.1,0.828,23,0
691 | 1,144,82,46,180,46.1,0.335,46,1
692 | 8,107,80,0,0,24.6,0.856,34,0
693 | 13,158,114,0,0,42.3,0.257,44,1
694 | 2,121,70,32,95,39.1,0.886,23,0
695 | 7,129,68,49,125,38.5,0.439,43,1
696 | 2,90,60,0,0,23.5,0.191,25,0
697 | 7,142,90,24,480,30.4,0.128,43,1
698 | 3,169,74,19,125,29.9,0.268,31,1
699 | 0,99,0,0,0,25,0.253,22,0
700 | 4,127,88,11,155,34.5,0.598,28,0
701 | 4,118,70,0,0,44.5,0.904,26,0
702 | 2,122,76,27,200,35.9,0.483,26,0
703 | 6,125,78,31,0,27.6,0.565,49,1
704 | 1,168,88,29,0,35,0.905,52,1
705 | 2,129,0,0,0,38.5,0.304,41,0
706 | 4,110,76,20,100,28.4,0.118,27,0
707 | 6,80,80,36,0,39.8,0.177,28,0
708 | 10,115,0,0,0,0,0.261,30,1
709 | 2,127,46,21,335,34.4,0.176,22,0
710 | 9,164,78,0,0,32.8,0.148,45,1
711 | 2,93,64,32,160,38,0.674,23,1
712 | 3,158,64,13,387,31.2,0.295,24,0
713 | 5,126,78,27,22,29.6,0.439,40,0
714 | 10,129,62,36,0,41.2,0.441,38,1
715 | 0,134,58,20,291,26.4,0.352,21,0
716 | 3,102,74,0,0,29.5,0.121,32,0
717 | 7,187,50,33,392,33.9,0.826,34,1
718 | 3,173,78,39,185,33.8,0.97,31,1
719 | 10,94,72,18,0,23.1,0.595,56,0
720 | 1,108,60,46,178,35.5,0.415,24,0
721 | 5,97,76,27,0,35.6,0.378,52,1
722 | 4,83,86,19,0,29.3,0.317,34,0
723 | 1,114,66,36,200,38.1,0.289,21,0
724 | 1,149,68,29,127,29.3,0.349,42,1
725 | 5,117,86,30,105,39.1,0.251,42,0
726 | 1,111,94,0,0,32.8,0.265,45,0
727 | 4,112,78,40,0,39.4,0.236,38,0
728 | 1,116,78,29,180,36.1,0.496,25,0
729 | 0,141,84,26,0,32.4,0.433,22,0
730 | 2,175,88,0,0,22.9,0.326,22,0
731 | 2,92,52,0,0,30.1,0.141,22,0
732 | 3,130,78,23,79,28.4,0.323,34,1
733 | 8,120,86,0,0,28.4,0.259,22,1
734 | 2,174,88,37,120,44.5,0.646,24,1
735 | 2,106,56,27,165,29,0.426,22,0
736 | 2,105,75,0,0,23.3,0.56,53,0
737 | 4,95,60,32,0,35.4,0.284,28,0
738 | 0,126,86,27,120,27.4,0.515,21,0
739 | 8,65,72,23,0,32,0.6,42,0
740 | 2,99,60,17,160,36.6,0.453,21,0
741 | 1,102,74,0,0,39.5,0.293,42,1
742 | 11,120,80,37,150,42.3,0.785,48,1
743 | 3,102,44,20,94,30.8,0.4,26,0
744 | 1,109,58,18,116,28.5,0.219,22,0
745 | 9,140,94,0,0,32.7,0.734,45,1
746 | 13,153,88,37,140,40.6,1.174,39,0
747 | 12,100,84,33,105,30,0.488,46,0
748 | 1,147,94,41,0,49.3,0.358,27,1
749 | 1,81,74,41,57,46.3,1.096,32,0
750 | 3,187,70,22,200,36.4,0.408,36,1
751 | 6,162,62,0,0,24.3,0.178,50,1
752 | 4,136,70,0,0,31.2,1.182,22,1
753 | 1,121,78,39,74,39,0.261,28,0
754 | 3,108,62,24,0,26,0.223,25,0
755 | 0,181,88,44,510,43.3,0.222,26,1
756 | 8,154,78,32,0,32.4,0.443,45,1
757 | 1,128,88,39,110,36.5,1.057,37,1
758 | 7,137,90,41,0,32,0.391,39,0
759 | 0,123,72,0,0,36.3,0.258,52,1
760 | 1,106,76,0,0,37.5,0.197,26,0
761 | 6,190,92,0,0,35.5,0.278,66,1
762 | 2,88,58,26,16,28.4,0.766,22,0
763 | 9,170,74,31,0,44,0.403,43,1
764 | 9,89,62,0,0,22.5,0.142,33,0
765 | 10,101,76,48,180,32.9,0.171,63,0
766 | 2,122,70,27,0,36.8,0.34,27,0
767 | 5,121,72,23,112,26.2,0.245,30,0
768 | 1,126,60,0,0,30.1,0.349,47,1
769 | 1,93,70,31,0,30.4,0.315,23,0
--------------------------------------------------------------------------------