├── 1-Introduction
├── 1_Welcome_to_Colaboratory.ipynb
├── 2_pandas.ipynb
├── 3_data_clearning.ipynb
├── 4_Basic_EDA.ipynb
├── data_sets
│ ├── Iris.csv
│ ├── cars.csv
│ ├── property_data.csv
│ └── property_data_clean.csv
├── pandas_practice.ipynb
└── solution_pandas_practice.ipynb
├── Classification
├── 1.decision_tree.ipynb
├── 2.diabetes_DT.ipynb
├── 3.Naive_Bayes_exercise.ipynb
├── 4.GaussianNB_Classifier.ipynb
├── 5.KNN.ipynb
├── SVM.ipynb
├── datasets
│ ├── PlayTennis.csv
│ └── diabetes.csv
└── naive_bayes_exercise_solution.ipynb
├── Clustering
├── HierarchicalClustering.ipynb
└── K_means.ipynb
├── EnsembleLearning
├── Ensemble_Learning.ipynb
├── RandomForests.ipynb
├── XGBoost.ipynb
└── datasets
│ ├── breast-cancer.csv
│ ├── pima-indians-diabetes.data.csv
│ └── readme.txt
├── MLOPS
├── Hello_MLflow.ipynb
└── LR__MLflow.ipynb
├── ModelEvaluation
├── CrossValidation.ipynb
├── EvaluationMetrics.ipynb
├── Silhouette_Coefficient.ipynb
└── datasets
│ ├── candy-data.csv
│ ├── melb_data.csv
│ └── tic-tac-toe.csv
├── README.md
├── Regression
├── 1.Simple_Linear_Regression_With_scikit_learn.ipynb
├── 2.Predict_Housing_Prices_Simple_Linear_Regression.ipynb
├── 3_exercise_salary_prediction.ipynb
├── 4.Multiple_Linear_Regression.ipynb
├── datasets
│ ├── kc_house_data.csv
│ └── test_scores.csv
└── exercise_solution_salary_regression.ipynb
├── property_data.csv
└── statistical inference
├── 1_Correlation.ipynb
├── 2_Intro_Statistical_Significance.ipynb
├── 3_Hypothesis_Testing_on_House_Price_Dataset.ipynb
└── datasets
├── MoviesOnStreamingPlatforms_updated.csv
└── house_price.csv
/1-Introduction/data_sets/Iris.csv:
--------------------------------------------------------------------------------
1 | Id,SepalLengthCm,SepalWidthCm,PetalLengthCm,PetalWidthCm,Species
2 | 1,5.1,3.5,1.4,0.2,Iris-setosa
3 | 2,4.9,3.0,1.4,0.2,Iris-setosa
4 | 3,4.7,3.2,1.3,0.2,Iris-setosa
5 | 4,4.6,3.1,1.5,0.2,Iris-setosa
6 | 5,5.0,3.6,1.4,0.2,Iris-setosa
7 | 6,5.4,3.9,1.7,0.4,Iris-setosa
8 | 7,4.6,3.4,1.4,0.3,Iris-setosa
9 | 8,5.0,3.4,1.5,0.2,Iris-setosa
10 | 9,4.4,2.9,1.4,0.2,Iris-setosa
11 | 10,4.9,3.1,1.5,0.1,Iris-setosa
12 | 11,5.4,3.7,1.5,0.2,Iris-setosa
13 | 12,4.8,3.4,1.6,0.2,Iris-setosa
14 | 13,4.8,3.0,1.4,0.1,Iris-setosa
15 | 14,4.3,3.0,1.1,0.1,Iris-setosa
16 | 15,5.8,4.0,1.2,0.2,Iris-setosa
17 | 16,5.7,4.4,1.5,0.4,Iris-setosa
18 | 17,5.4,3.9,1.3,0.4,Iris-setosa
19 | 18,5.1,3.5,1.4,0.3,Iris-setosa
20 | 19,5.7,3.8,1.7,0.3,Iris-setosa
21 | 20,5.1,3.8,1.5,0.3,Iris-setosa
22 | 21,5.4,3.4,1.7,0.2,Iris-setosa
23 | 22,5.1,3.7,1.5,0.4,Iris-setosa
24 | 23,4.6,3.6,1.0,0.2,Iris-setosa
25 | 24,5.1,3.3,1.7,0.5,Iris-setosa
26 | 25,4.8,3.4,1.9,0.2,Iris-setosa
27 | 26,5.0,3.0,1.6,0.2,Iris-setosa
28 | 27,5.0,3.4,1.6,0.4,Iris-setosa
29 | 28,5.2,3.5,1.5,0.2,Iris-setosa
30 | 29,5.2,3.4,1.4,0.2,Iris-setosa
31 | 30,4.7,3.2,1.6,0.2,Iris-setosa
32 | 31,4.8,3.1,1.6,0.2,Iris-setosa
33 | 32,5.4,3.4,1.5,0.4,Iris-setosa
34 | 33,5.2,4.1,1.5,0.1,Iris-setosa
35 | 34,5.5,4.2,1.4,0.2,Iris-setosa
36 | 35,4.9,3.1,1.5,0.1,Iris-setosa
37 | 36,5.0,3.2,1.2,0.2,Iris-setosa
38 | 37,5.5,3.5,1.3,0.2,Iris-setosa
39 | 38,4.9,3.1,1.5,0.1,Iris-setosa
40 | 39,4.4,3.0,1.3,0.2,Iris-setosa
41 | 40,5.1,3.4,1.5,0.2,Iris-setosa
42 | 41,5.0,3.5,1.3,0.3,Iris-setosa
43 | 42,4.5,2.3,1.3,0.3,Iris-setosa
44 | 43,4.4,3.2,1.3,0.2,Iris-setosa
45 | 44,5.0,3.5,1.6,0.6,Iris-setosa
46 | 45,5.1,3.8,1.9,0.4,Iris-setosa
47 | 46,4.8,3.0,1.4,0.3,Iris-setosa
48 | 47,5.1,3.8,1.6,0.2,Iris-setosa
49 | 48,4.6,3.2,1.4,0.2,Iris-setosa
50 | 49,5.3,3.7,1.5,0.2,Iris-setosa
51 | 50,5.0,3.3,1.4,0.2,Iris-setosa
52 | 51,7.0,3.2,4.7,1.4,Iris-versicolor
53 | 52,6.4,3.2,4.5,1.5,Iris-versicolor
54 | 53,6.9,3.1,4.9,1.5,Iris-versicolor
55 | 54,5.5,2.3,4.0,1.3,Iris-versicolor
56 | 55,6.5,2.8,4.6,1.5,Iris-versicolor
57 | 56,5.7,2.8,4.5,1.3,Iris-versicolor
58 | 57,6.3,3.3,4.7,1.6,Iris-versicolor
59 | 58,4.9,2.4,3.3,1.0,Iris-versicolor
60 | 59,6.6,2.9,4.6,1.3,Iris-versicolor
61 | 60,5.2,2.7,3.9,1.4,Iris-versicolor
62 | 61,5.0,2.0,3.5,1.0,Iris-versicolor
63 | 62,5.9,3.0,4.2,1.5,Iris-versicolor
64 | 63,6.0,2.2,4.0,1.0,Iris-versicolor
65 | 64,6.1,2.9,4.7,1.4,Iris-versicolor
66 | 65,5.6,2.9,3.6,1.3,Iris-versicolor
67 | 66,6.7,3.1,4.4,1.4,Iris-versicolor
68 | 67,5.6,3.0,4.5,1.5,Iris-versicolor
69 | 68,5.8,2.7,4.1,1.0,Iris-versicolor
70 | 69,6.2,2.2,4.5,1.5,Iris-versicolor
71 | 70,5.6,2.5,3.9,1.1,Iris-versicolor
72 | 71,5.9,3.2,4.8,1.8,Iris-versicolor
73 | 72,6.1,2.8,4.0,1.3,Iris-versicolor
74 | 73,6.3,2.5,4.9,1.5,Iris-versicolor
75 | 74,6.1,2.8,4.7,1.2,Iris-versicolor
76 | 75,6.4,2.9,4.3,1.3,Iris-versicolor
77 | 76,6.6,3.0,4.4,1.4,Iris-versicolor
78 | 77,6.8,2.8,4.8,1.4,Iris-versicolor
79 | 78,6.7,3.0,5.0,1.7,Iris-versicolor
80 | 79,6.0,2.9,4.5,1.5,Iris-versicolor
81 | 80,5.7,2.6,3.5,1.0,Iris-versicolor
82 | 81,5.5,2.4,3.8,1.1,Iris-versicolor
83 | 82,5.5,2.4,3.7,1.0,Iris-versicolor
84 | 83,5.8,2.7,3.9,1.2,Iris-versicolor
85 | 84,6.0,2.7,5.1,1.6,Iris-versicolor
86 | 85,5.4,3.0,4.5,1.5,Iris-versicolor
87 | 86,6.0,3.4,4.5,1.6,Iris-versicolor
88 | 87,6.7,3.1,4.7,1.5,Iris-versicolor
89 | 88,6.3,2.3,4.4,1.3,Iris-versicolor
90 | 89,5.6,3.0,4.1,1.3,Iris-versicolor
91 | 90,5.5,2.5,4.0,1.3,Iris-versicolor
92 | 91,5.5,2.6,4.4,1.2,Iris-versicolor
93 | 92,6.1,3.0,4.6,1.4,Iris-versicolor
94 | 93,5.8,2.6,4.0,1.2,Iris-versicolor
95 | 94,5.0,2.3,3.3,1.0,Iris-versicolor
96 | 95,5.6,2.7,4.2,1.3,Iris-versicolor
97 | 96,5.7,3.0,4.2,1.2,Iris-versicolor
98 | 97,5.7,2.9,4.2,1.3,Iris-versicolor
99 | 98,6.2,2.9,4.3,1.3,Iris-versicolor
100 | 99,5.1,2.5,3.0,1.1,Iris-versicolor
101 | 100,5.7,2.8,4.1,1.3,Iris-versicolor
102 | 101,6.3,3.3,6.0,2.5,Iris-virginica
103 | 102,5.8,2.7,5.1,1.9,Iris-virginica
104 | 103,7.1,3.0,5.9,2.1,Iris-virginica
105 | 104,6.3,2.9,5.6,1.8,Iris-virginica
106 | 105,6.5,3.0,5.8,2.2,Iris-virginica
107 | 106,7.6,3.0,6.6,2.1,Iris-virginica
108 | 107,4.9,2.5,4.5,1.7,Iris-virginica
109 | 108,7.3,2.9,6.3,1.8,Iris-virginica
110 | 109,6.7,2.5,5.8,1.8,Iris-virginica
111 | 110,7.2,3.6,6.1,2.5,Iris-virginica
112 | 111,6.5,3.2,5.1,2.0,Iris-virginica
113 | 112,6.4,2.7,5.3,1.9,Iris-virginica
114 | 113,6.8,3.0,5.5,2.1,Iris-virginica
115 | 114,5.7,2.5,5.0,2.0,Iris-virginica
116 | 115,5.8,2.8,5.1,2.4,Iris-virginica
117 | 116,6.4,3.2,5.3,2.3,Iris-virginica
118 | 117,6.5,3.0,5.5,1.8,Iris-virginica
119 | 118,7.7,3.8,6.7,2.2,Iris-virginica
120 | 119,7.7,2.6,6.9,2.3,Iris-virginica
121 | 120,6.0,2.2,5.0,1.5,Iris-virginica
122 | 121,6.9,3.2,5.7,2.3,Iris-virginica
123 | 122,5.6,2.8,4.9,2.0,Iris-virginica
124 | 123,7.7,2.8,6.7,2.0,Iris-virginica
125 | 124,6.3,2.7,4.9,1.8,Iris-virginica
126 | 125,6.7,3.3,5.7,2.1,Iris-virginica
127 | 126,7.2,3.2,6.0,1.8,Iris-virginica
128 | 127,6.2,2.8,4.8,1.8,Iris-virginica
129 | 128,6.1,3.0,4.9,1.8,Iris-virginica
130 | 129,6.4,2.8,5.6,2.1,Iris-virginica
131 | 130,7.2,3.0,5.8,1.6,Iris-virginica
132 | 131,7.4,2.8,6.1,1.9,Iris-virginica
133 | 132,7.9,3.8,6.4,2.0,Iris-virginica
134 | 133,6.4,2.8,5.6,2.2,Iris-virginica
135 | 134,6.3,2.8,5.1,1.5,Iris-virginica
136 | 135,6.1,2.6,5.6,1.4,Iris-virginica
137 | 136,7.7,3.0,6.1,2.3,Iris-virginica
138 | 137,6.3,3.4,5.6,2.4,Iris-virginica
139 | 138,6.4,3.1,5.5,1.8,Iris-virginica
140 | 139,6.0,3.0,4.8,1.8,Iris-virginica
141 | 140,6.9,3.1,5.4,2.1,Iris-virginica
142 | 141,6.7,3.1,5.6,2.4,Iris-virginica
143 | 142,6.9,3.1,5.1,2.3,Iris-virginica
144 | 143,5.8,2.7,5.1,1.9,Iris-virginica
145 | 144,6.8,3.2,5.9,2.3,Iris-virginica
146 | 145,6.7,3.3,5.7,2.5,Iris-virginica
147 | 146,6.7,3.0,5.2,2.3,Iris-virginica
148 | 147,6.3,2.5,5.0,1.9,Iris-virginica
149 | 148,6.5,3.0,5.2,2.0,Iris-virginica
150 | 149,6.2,3.4,5.4,2.3,Iris-virginica
151 | 150,5.9,3.0,5.1,1.8,Iris-virginica
152 |
--------------------------------------------------------------------------------
/1-Introduction/data_sets/property_data.csv:
--------------------------------------------------------------------------------
1 | PID,ST_NUM,ST_NAME,OWN_OCCUPIED,NUM_BEDROOMS,NUM_BATH,SQ_FT
2 | 100001000,104,PUTNAM,Y,3,1,1000
3 | 100002000,197,LEXINGTON,N,3,1.5,--
4 | 100003000,,LEXINGTON,N,n/a,1,850
5 | 100004000,201,BERKELEY,12,1,NaN,700
6 | ,203,BERKELEY,Y,3,2,1600
7 | 100006000,207,BERKELEY,Y,NA,1,800
8 | 100007000,NA,WASHINGTON,,2,HURLEY,950
9 | 100008000,213,TREMONT,Y,--,1,
10 | 100009000,215,TREMONT,Y,na,2,1800
11 |
--------------------------------------------------------------------------------
/1-Introduction/data_sets/property_data_clean.csv:
--------------------------------------------------------------------------------
1 | PID,ST_NUM,ST_NAME,OWN_OCCUPIED,NUM_BEDROOMS,NUM_BATH,SQ_FT
2 | 100001000,104,PUTNAM,Y,3,1,1000
3 | 100002000,197,LEXINGTON,N,3,1,690
4 | 100003000,111,LEXINGTON,N,2,1,850
5 | 100004000,201,BERKELEY,Y,1,1,700
6 | 100004321,203,BERKELEY,Y,3,2,1600
7 | 100006000,207,BERKELEY,Y,3,1,800
8 | 100007000,211,WASHINGTON,Y,2,2,950
9 | 100008000,213,TREMONT,Y,1,1,900
10 | 100009000,215,TREMONT,Y,6,5,1800
11 |
--------------------------------------------------------------------------------
/1-Introduction/pandas_practice.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "pandas_practice.ipynb",
7 | "provenance": [],
8 | "authorship_tag": "ABX9TyNGZUHLuINgRUEU4L8es7Kj",
9 | "include_colab_link": true
10 | },
11 | "kernelspec": {
12 | "name": "python3",
13 | "display_name": "Python 3"
14 | }
15 | },
16 | "cells": [
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {
20 | "id": "view-in-github",
21 | "colab_type": "text"
22 | },
23 | "source": [
24 | "
"
25 | ]
26 | },
27 | {
28 | "cell_type": "code",
29 | "metadata": {
30 | "id": "LO0NlTzeNv_6"
31 | },
32 | "source": [
33 | "import pandas as pd\n",
34 | "import numpy as np"
35 | ],
36 | "execution_count": null,
37 | "outputs": []
38 | },
39 | {
40 | "cell_type": "code",
41 | "metadata": {
42 | "id": "MRgZAubOOdlt",
43 | "outputId": "c70b99c8-2804-4a97-aa4a-f8ddce23669d",
44 | "colab": {
45 | "base_uri": "https://localhost:8080/",
46 | "height": 172
47 | }
48 | },
49 | "source": [
50 | "df = pd.DataFrame({\n",
51 | " 'col1': ['Item0', 'Item0', 'Item1', 'Item1'],\n",
52 | " 'col2': ['Gold', 'Bronze', 'Gold', 'Silver'],\n",
53 | " 'col3': [1, 2, np.nan, 4]\n",
54 | "})\n",
55 | "\n",
56 | "df"
57 | ],
58 | "execution_count": null,
59 | "outputs": [
60 | {
61 | "output_type": "execute_result",
62 | "data": {
63 | "text/html": [
64 | "
\n",
65 | "\n",
78 | "
\n",
79 | " \n",
80 | " \n",
81 | " | \n",
82 | " col1 | \n",
83 | " col2 | \n",
84 | " col3 | \n",
85 | "
\n",
86 | " \n",
87 | " \n",
88 | " \n",
89 | " 0 | \n",
90 | " Item0 | \n",
91 | " Gold | \n",
92 | " 1.0 | \n",
93 | "
\n",
94 | " \n",
95 | " 1 | \n",
96 | " Item0 | \n",
97 | " Bronze | \n",
98 | " 2.0 | \n",
99 | "
\n",
100 | " \n",
101 | " 2 | \n",
102 | " Item1 | \n",
103 | " Gold | \n",
104 | " NaN | \n",
105 | "
\n",
106 | " \n",
107 | " 3 | \n",
108 | " Item1 | \n",
109 | " Silver | \n",
110 | " 4.0 | \n",
111 | "
\n",
112 | " \n",
113 | "
\n",
114 | "
"
115 | ],
116 | "text/plain": [
117 | " col1 col2 col3\n",
118 | "0 Item0 Gold 1.0\n",
119 | "1 Item0 Bronze 2.0\n",
120 | "2 Item1 Gold NaN\n",
121 | "3 Item1 Silver 4.0"
122 | ]
123 | },
124 | "metadata": {
125 | "tags": []
126 | },
127 | "execution_count": 2
128 | }
129 | ]
130 | },
131 | {
132 | "cell_type": "markdown",
133 | "metadata": {
134 | "id": "ssPZ6pixN0OQ"
135 | },
136 | "source": [
137 | "Previewing Data\n",
138 | "To preview the data and the metadata of a dataframe you can use the following functions:\n",
139 | "\n"
140 | ]
141 | },
142 | {
143 | "cell_type": "code",
144 | "metadata": {
145 | "id": "Yk1eudbUNnsx"
146 | },
147 | "source": [
148 | "# Displays the top 5 rows.\n"
149 | ],
150 | "execution_count": null,
151 | "outputs": []
152 | },
153 | {
154 | "cell_type": "code",
155 | "metadata": {
156 | "id": "P0SRbmVFPNo2"
157 | },
158 | "source": [
159 | "# displays the last rows\n",
160 | "\n"
161 | ],
162 | "execution_count": null,
163 | "outputs": []
164 | },
165 | {
166 | "cell_type": "code",
167 | "metadata": {
168 | "id": "25REGv1GPRWA"
169 | },
170 | "source": [
171 | "# The number of columns\n",
172 | "\n"
173 | ],
174 | "execution_count": null,
175 | "outputs": []
176 | },
177 | {
178 | "cell_type": "markdown",
179 | "metadata": {
180 | "id": "metBTF-PPkVF"
181 | },
182 | "source": [
183 | "#Sorting\n",
184 | "\n",
185 | "sort values by col1, then col2 in ascending order\n"
186 | ]
187 | },
188 | {
189 | "cell_type": "code",
190 | "metadata": {
191 | "id": "rwmUqfUOPo3W"
192 | },
193 | "source": [
194 | "#sort values\n"
195 | ],
196 | "execution_count": null,
197 | "outputs": []
198 | },
199 | {
200 | "cell_type": "markdown",
201 | "metadata": {
202 | "id": "v80le55PQ5oC"
203 | },
204 | "source": [
205 | "# Selecting/Querying\n",
206 | "Individual columns can be selected with the [] operator or directly as attributes:\n",
207 | "# Selects only the column named 'col1';\n",
208 | "# Select two columns col1,col2\n",
209 | "\n"
210 | ]
211 | },
212 | {
213 | "cell_type": "code",
214 | "metadata": {
215 | "id": "svg688lTQ9NF"
216 | },
217 | "source": [
218 | "#select columns"
219 | ],
220 | "execution_count": null,
221 | "outputs": []
222 | },
223 | {
224 | "cell_type": "markdown",
225 | "metadata": {
226 | "id": "OXTgBfMwV-pb"
227 | },
228 | "source": [
229 | "You can also select by absolute coordinates/position in the frame. Indices are zero based:\n",
230 | "\n",
231 | "# Selects second row\n",
232 | "# Selects rows 1-to-3\n"
233 | ]
234 | },
235 | {
236 | "cell_type": "code",
237 | "metadata": {
238 | "id": "WuP7YuKIWCXo"
239 | },
240 | "source": [
241 | ""
242 | ],
243 | "execution_count": null,
244 | "outputs": []
245 | },
246 | {
247 | "cell_type": "markdown",
248 | "metadata": {
249 | "id": "5kvq1_YtWYI3"
250 | },
251 | "source": [
252 | "\n",
253 | "# Query by a single column value\n",
254 | "\n",
255 | "# Query by a single column, if it is in a list of predefined values\n",
256 | "\n",
257 | "# A conjunction query using two columns\n",
258 | "\n",
259 | "# A disjunction query using two columns\n",
260 | "\n",
261 | "# A query checking the textual content of the cells\n"
262 | ]
263 | },
264 | {
265 | "cell_type": "code",
266 | "metadata": {
267 | "id": "ghDUcggWWbTf"
268 | },
269 | "source": [
270 | "#use the code from above cell to see the results of each query"
271 | ],
272 | "execution_count": null,
273 | "outputs": []
274 | },
275 | {
276 | "cell_type": "markdown",
277 | "metadata": {
278 | "id": "MhXCyXzNY317"
279 | },
280 | "source": [
281 | "#Modifying Data Frames\n",
282 | "\n",
283 | "# Modifies the cell at 1,1, assign vaue 'Bronze again'\n",
284 | "\n",
285 | "\n",
286 | "# change the values in col3 to 'HelloPD'\n",
287 | "\n",
288 | "# Removes all rows with any missing values.\n",
289 | "\n"
290 | ]
291 | },
292 | {
293 | "cell_type": "code",
294 | "metadata": {
295 | "id": "SnbgFp8OZJRL"
296 | },
297 | "source": [
298 | "#your code here\n",
299 | "\n",
300 | "\n"
301 | ],
302 | "execution_count": null,
303 | "outputs": []
304 | },
305 | {
306 | "cell_type": "markdown",
307 | "metadata": {
308 | "id": "jNdTo3iMzefS"
309 | },
310 | "source": [
311 | "#Basic plotting\n"
312 | ]
313 | },
314 | {
315 | "cell_type": "code",
316 | "metadata": {
317 | "id": "J_eIodBfzhZW",
318 | "outputId": "bf452001-31cc-4e61-de21-c131eee08290",
319 | "colab": {
320 | "base_uri": "https://localhost:8080/",
321 | "height": 164
322 | }
323 | },
324 | "source": [
325 | "#run the following code to create a new data frame\n",
326 | "plot_df = pd.DataFrame({\n",
327 | " 'col1': [1, 3, 2, 4],\n",
328 | " 'col2': [3, 6, 5, 1],\n",
329 | " 'col3': [4, 7, 6, 2],\n",
330 | "})\n",
331 | "\n",
332 | "plot_df"
333 | ],
334 | "execution_count": null,
335 | "outputs": [
336 | {
337 | "output_type": "execute_result",
338 | "data": {
339 | "text/html": [
340 | "\n",
341 | "\n",
354 | "
\n",
355 | " \n",
356 | " \n",
357 | " | \n",
358 | " col1 | \n",
359 | " col2 | \n",
360 | " col3 | \n",
361 | "
\n",
362 | " \n",
363 | " \n",
364 | " \n",
365 | " 0 | \n",
366 | " 1 | \n",
367 | " 3 | \n",
368 | " 4 | \n",
369 | "
\n",
370 | " \n",
371 | " 1 | \n",
372 | " 3 | \n",
373 | " 6 | \n",
374 | " 7 | \n",
375 | "
\n",
376 | " \n",
377 | " 2 | \n",
378 | " 2 | \n",
379 | " 5 | \n",
380 | " 6 | \n",
381 | "
\n",
382 | " \n",
383 | " 3 | \n",
384 | " 4 | \n",
385 | " 1 | \n",
386 | " 2 | \n",
387 | "
\n",
388 | " \n",
389 | "
\n",
390 | "
"
391 | ],
392 | "text/plain": [
393 | " col1 col2 col3\n",
394 | "0 1 3 4\n",
395 | "1 3 6 7\n",
396 | "2 2 5 6\n",
397 | "3 4 1 2"
398 | ]
399 | },
400 | "metadata": {
401 | "tags": []
402 | },
403 | "execution_count": 10
404 | }
405 | ]
406 | },
407 | {
408 | "cell_type": "code",
409 | "metadata": {
410 | "id": "HyO53SkN0x3F"
411 | },
412 | "source": [
413 | "#use plot function to plot plot_df"
414 | ],
415 | "execution_count": null,
416 | "outputs": []
417 | },
418 | {
419 | "cell_type": "code",
420 | "metadata": {
421 | "id": "F3A1sZH606i2"
422 | },
423 | "source": [
424 | "#plot bar chart for plot_df\n",
425 | "# Use kind='hbar' for horizontal bars, and stacked=True to stack the groups\n",
426 | "\n"
427 | ],
428 | "execution_count": null,
429 | "outputs": []
430 | }
431 | ]
432 | }
--------------------------------------------------------------------------------
/Classification/3.Naive_Bayes_exercise.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "naive_bayes_exercise.ipynb",
7 | "provenance": [],
8 | "authorship_tag": "ABX9TyM9bmI515C75f2N1XjNBfg1",
9 | "include_colab_link": true
10 | },
11 | "kernelspec": {
12 | "name": "python3",
13 | "display_name": "Python 3"
14 | }
15 | },
16 | "cells": [
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {
20 | "id": "view-in-github",
21 | "colab_type": "text"
22 | },
23 | "source": [
24 | "
"
25 | ]
26 | },
27 | {
28 | "cell_type": "markdown",
29 | "metadata": {
30 | "id": "I-IT1tSXRiER"
31 | },
32 | "source": [
33 | "Use wine dataset from sklearn.datasets to classify wines into 3 categories. Load the dataset and split it into test and train. After that train the model using Gaussian and Multinominal classifier and post which model performs better. Use the trained model to perform some predictions on test data.\n",
34 | "\n"
35 | ]
36 | },
37 | {
38 | "cell_type": "code",
39 | "metadata": {
40 | "id": "_EaoLXLVRmOY"
41 | },
42 | "source": [
43 | "#load the dataset\n",
44 | "from sklearn import datasets\n",
45 | "\n",
46 | "#your code here , I will do the first line :)\n",
47 | "wine = datasets.load_wine()\n",
48 | "\n"
49 | ],
50 | "execution_count": null,
51 | "outputs": []
52 | },
53 | {
54 | "cell_type": "code",
55 | "metadata": {
56 | "colab": {
57 | "base_uri": "https://localhost:8080/"
58 | },
59 | "id": "IfkoAayzRuLR",
60 | "outputId": "10481aa1-c39a-4bd1-b2b2-fb768190565b"
61 | },
62 | "source": [
63 | "wine.feature_names\n"
64 | ],
65 | "execution_count": null,
66 | "outputs": [
67 | {
68 | "output_type": "execute_result",
69 | "data": {
70 | "text/plain": [
71 | "['alcohol',\n",
72 | " 'malic_acid',\n",
73 | " 'ash',\n",
74 | " 'alcalinity_of_ash',\n",
75 | " 'magnesium',\n",
76 | " 'total_phenols',\n",
77 | " 'flavanoids',\n",
78 | " 'nonflavanoid_phenols',\n",
79 | " 'proanthocyanins',\n",
80 | " 'color_intensity',\n",
81 | " 'hue',\n",
82 | " 'od280/od315_of_diluted_wines',\n",
83 | " 'proline']"
84 | ]
85 | },
86 | "metadata": {
87 | "tags": []
88 | },
89 | "execution_count": 4
90 | }
91 | ]
92 | },
93 | {
94 | "cell_type": "code",
95 | "metadata": {
96 | "colab": {
97 | "base_uri": "https://localhost:8080/"
98 | },
99 | "id": "-o91t2QQR6dl",
100 | "outputId": "fa4ad320-3616-4763-ee1f-e28ab1cef16f"
101 | },
102 | "source": [
103 | "#check the target column in the dataset\n",
104 | "#your code goes here\n"
105 | ],
106 | "execution_count": null,
107 | "outputs": [
108 | {
109 | "output_type": "execute_result",
110 | "data": {
111 | "text/plain": [
112 | "array(['class_0', 'class_1', 'class_2'], dtype='
"
25 | ]
26 | },
27 | {
28 | "cell_type": "code",
29 | "metadata": {
30 | "id": "_WA-t2i3M5bv"
31 | },
32 | "source": [
33 | "# load the iris dataset \n",
34 | "from sklearn.datasets import load_iris \n",
35 | "iris = load_iris() \n"
36 | ],
37 | "execution_count": 2,
38 | "outputs": []
39 | },
40 | {
41 | "cell_type": "code",
42 | "metadata": {
43 | "colab": {
44 | "base_uri": "https://localhost:8080/",
45 | "height": 176
46 | },
47 | "id": "zQjY2eE2NN10",
48 | "outputId": "d323509f-cd2b-4757-d236-3f16158bf088"
49 | },
50 | "source": [
51 | "iris.DESCR"
52 | ],
53 | "execution_count": 12,
54 | "outputs": [
55 | {
56 | "output_type": "execute_result",
57 | "data": {
58 | "application/vnd.google.colaboratory.intrinsic+json": {
59 | "type": "string"
60 | },
61 | "text/plain": [
62 | "'.. _iris_dataset:\\n\\nIris plants dataset\\n--------------------\\n\\n**Data Set Characteristics:**\\n\\n :Number of Instances: 150 (50 in each of three classes)\\n :Number of Attributes: 4 numeric, predictive attributes and the class\\n :Attribute Information:\\n - sepal length in cm\\n - sepal width in cm\\n - petal length in cm\\n - petal width in cm\\n - class:\\n - Iris-Setosa\\n - Iris-Versicolour\\n - Iris-Virginica\\n \\n :Summary Statistics:\\n\\n ============== ==== ==== ======= ===== ====================\\n Min Max Mean SD Class Correlation\\n ============== ==== ==== ======= ===== ====================\\n sepal length: 4.3 7.9 5.84 0.83 0.7826\\n sepal width: 2.0 4.4 3.05 0.43 -0.4194\\n petal length: 1.0 6.9 3.76 1.76 0.9490 (high!)\\n petal width: 0.1 2.5 1.20 0.76 0.9565 (high!)\\n ============== ==== ==== ======= ===== ====================\\n\\n :Missing Attribute Values: None\\n :Class Distribution: 33.3% for each of 3 classes.\\n :Creator: R.A. Fisher\\n :Donor: Michael Marshall (MARSHALL%PLU@io.arc.nasa.gov)\\n :Date: July, 1988\\n\\nThe famous Iris database, first used by Sir R.A. Fisher. The dataset is taken\\nfrom Fisher\\'s paper. Note that it\\'s the same as in R, but not as in the UCI\\nMachine Learning Repository, which has two wrong data points.\\n\\nThis is perhaps the best known database to be found in the\\npattern recognition literature. Fisher\\'s paper is a classic in the field and\\nis referenced frequently to this day. (See Duda & Hart, for example.) The\\ndata set contains 3 classes of 50 instances each, where each class refers to a\\ntype of iris plant. One class is linearly separable from the other 2; the\\nlatter are NOT linearly separable from each other.\\n\\n.. topic:: References\\n\\n - Fisher, R.A. \"The use of multiple measurements in taxonomic problems\"\\n Annual Eugenics, 7, Part II, 179-188 (1936); also in \"Contributions to\\n Mathematical Statistics\" (John Wiley, NY, 1950).\\n - Duda, R.O., & Hart, P.E. (1973) Pattern Classification and Scene Analysis.\\n (Q327.D83) John Wiley & Sons. ISBN 0-471-22361-1. See page 218.\\n - Dasarathy, B.V. (1980) \"Nosing Around the Neighborhood: A New System\\n Structure and Classification Rule for Recognition in Partially Exposed\\n Environments\". IEEE Transactions on Pattern Analysis and Machine\\n Intelligence, Vol. PAMI-2, No. 1, 67-71.\\n - Gates, G.W. (1972) \"The Reduced Nearest Neighbor Rule\". IEEE Transactions\\n on Information Theory, May 1972, 431-433.\\n - See also: 1988 MLC Proceedings, 54-64. Cheeseman et al\"s AUTOCLASS II\\n conceptual clustering system finds 3 classes in the data.\\n - Many, many more ...'"
63 | ]
64 | },
65 | "metadata": {
66 | "tags": []
67 | },
68 | "execution_count": 12
69 | }
70 | ]
71 | },
72 | {
73 | "cell_type": "code",
74 | "metadata": {
75 | "colab": {
76 | "base_uri": "https://localhost:8080/"
77 | },
78 | "id": "W8hkhv_WNZ1f",
79 | "outputId": "d1c7b22d-548c-4454-f7c0-f5143642d729"
80 | },
81 | "source": [
82 | "iris.target_names"
83 | ],
84 | "execution_count": 14,
85 | "outputs": [
86 | {
87 | "output_type": "execute_result",
88 | "data": {
89 | "text/plain": [
90 | "array(['setosa', 'versicolor', 'virginica'], dtype='
"
25 | ]
26 | },
27 | {
28 | "cell_type": "markdown",
29 | "metadata": {
30 | "id": "I-IT1tSXRiER"
31 | },
32 | "source": [
33 | "Use wine dataset from sklearn.datasets to classify wines into 3 categories. Load the dataset and split it into test and train. After that train the model using Gaussian and Multinominal classifier and post which model performs better. Use the trained model to perform some predictions on test data.\n",
34 | "\n"
35 | ]
36 | },
37 | {
38 | "cell_type": "code",
39 | "metadata": {
40 | "id": "_EaoLXLVRmOY"
41 | },
42 | "source": [
43 | "#load the dataset\n",
44 | "from sklearn import datasets\n",
45 | "\n",
46 | "#your code here , I will do the first line :)\n",
47 | "wine = datasets.load_wine()\n",
48 | "\n"
49 | ],
50 | "execution_count": null,
51 | "outputs": []
52 | },
53 | {
54 | "cell_type": "code",
55 | "metadata": {
56 | "colab": {
57 | "base_uri": "https://localhost:8080/"
58 | },
59 | "id": "IfkoAayzRuLR",
60 | "outputId": "10481aa1-c39a-4bd1-b2b2-fb768190565b"
61 | },
62 | "source": [
63 | "wine.feature_names\n"
64 | ],
65 | "execution_count": null,
66 | "outputs": [
67 | {
68 | "output_type": "execute_result",
69 | "data": {
70 | "text/plain": [
71 | "['alcohol',\n",
72 | " 'malic_acid',\n",
73 | " 'ash',\n",
74 | " 'alcalinity_of_ash',\n",
75 | " 'magnesium',\n",
76 | " 'total_phenols',\n",
77 | " 'flavanoids',\n",
78 | " 'nonflavanoid_phenols',\n",
79 | " 'proanthocyanins',\n",
80 | " 'color_intensity',\n",
81 | " 'hue',\n",
82 | " 'od280/od315_of_diluted_wines',\n",
83 | " 'proline']"
84 | ]
85 | },
86 | "metadata": {
87 | "tags": []
88 | },
89 | "execution_count": 4
90 | }
91 | ]
92 | },
93 | {
94 | "cell_type": "code",
95 | "metadata": {
96 | "colab": {
97 | "base_uri": "https://localhost:8080/"
98 | },
99 | "id": "-o91t2QQR6dl",
100 | "outputId": "fa4ad320-3616-4763-ee1f-e28ab1cef16f"
101 | },
102 | "source": [
103 | "wine.target_names\n"
104 | ],
105 | "execution_count": null,
106 | "outputs": [
107 | {
108 | "output_type": "execute_result",
109 | "data": {
110 | "text/plain": [
111 | "array(['class_0', 'class_1', 'class_2'], dtype='
"
26 | ]
27 | },
28 | {
29 | "cell_type": "markdown",
30 | "metadata": {
31 | "id": "ZN5eTP_SU9D8"
32 | },
33 | "source": [
34 | "In this lab we are going to use the Pima Indians onset of diabetes dataset.\n",
35 | "\n",
36 | "This dataset is comprised of 8 input variables that describe medical details of patients and one output variable to indicate whether the patient will have an onset of diabetes within 5 years.\n",
37 | "\n",
38 | "You can learn more about this dataset on the UCI Machine Learning Repository website.\n",
39 | "\n",
40 | "This is a good dataset for a first XGBoost model because all of the input variables are numeric and the problem is a simple binary classification problem. It is not necessarily a good problem for the XGBoost algorithm because it is a relatively small dataset and an easy problem to model.\n",
41 | "\n",
42 | "Download this dataset and place it into your current working directory with the file name “diabetes.csv” (https://raw.githubusercontent.com/besherh/Machine-Learning-Course/master/EnsembleLearning/datasets/pima-indians-diabetes.data.csv).\n",
43 | "\n"
44 | ]
45 | },
46 | {
47 | "cell_type": "markdown",
48 | "metadata": {
49 | "id": "dWIi6lfBVJ4v"
50 | },
51 | "source": [
52 | "#Load and Prepare Data\n",
53 | "In this section we will load the data from file and prepare it for use for training and evaluating an XGBoost model.\n",
54 | "\n",
55 | "We will start off by importing the classes and functions we intend to use in this tutorial."
56 | ]
57 | },
58 | {
59 | "cell_type": "code",
60 | "metadata": {
61 | "id": "MBrTdWEKSvmd"
62 | },
63 | "source": [
64 | "from numpy import loadtxt\n",
65 | "from xgboost import XGBClassifier\n",
66 | "from sklearn.model_selection import train_test_split\n",
67 | "from sklearn.metrics import accuracy_score"
68 | ],
69 | "execution_count": 1,
70 | "outputs": []
71 | },
72 | {
73 | "cell_type": "markdown",
74 | "metadata": {
75 | "id": "5fMqiIZZVSdu"
76 | },
77 | "source": [
78 | "Next, we can load the CSV file as a NumPy array using the NumPy function loadtext().\n",
79 | "\n"
80 | ]
81 | },
82 | {
83 | "cell_type": "code",
84 | "metadata": {
85 | "id": "8YsVXwwxVS7d"
86 | },
87 | "source": [
88 | "# load data\n",
89 | "dataset = loadtxt('pima-indians-diabetes.data.csv', delimiter=\",\")"
90 | ],
91 | "execution_count": 6,
92 | "outputs": []
93 | },
94 | {
95 | "cell_type": "markdown",
96 | "metadata": {
97 | "id": "jcuc7W8JXBNh"
98 | },
99 | "source": [
100 | "We must separate the columns (attributes or features) of the dataset into input patterns (X) and output patterns (Y). We can do this easily by specifying the column indices in the NumPy array format.\n",
101 | "\n"
102 | ]
103 | },
104 | {
105 | "cell_type": "code",
106 | "metadata": {
107 | "id": "IQFtaPoQXEH-"
108 | },
109 | "source": [
110 | "# split data into X and y\n",
111 | "X = dataset[:,0:8]\n",
112 | "Y = dataset[:,8]"
113 | ],
114 | "execution_count": 7,
115 | "outputs": []
116 | },
117 | {
118 | "cell_type": "markdown",
119 | "metadata": {
120 | "id": "YJ9d2l9tXGKq"
121 | },
122 | "source": [
123 | "Finally, we must split the X and Y data into a training and test dataset. The training set will be used to prepare the XGBoost model and the test set will be used to make new predictions, from which we can evaluate the performance of the model.\n",
124 | "\n",
125 | "For this we will use the train_test_split() function from the scikit-learn library. We also specify a seed for the random number generator so that we always get the same split of data each time this example is executed.\n",
126 | "\n"
127 | ]
128 | },
129 | {
130 | "cell_type": "code",
131 | "metadata": {
132 | "id": "XFagq03kXK7q"
133 | },
134 | "source": [
135 | "# split data into train and test sets\n",
136 | "seed = 7\n",
137 | "test_size = 0.33\n",
138 | "X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=test_size, random_state=seed)"
139 | ],
140 | "execution_count": 8,
141 | "outputs": []
142 | },
143 | {
144 | "cell_type": "markdown",
145 | "metadata": {
146 | "id": "kekg-JEcXNgp"
147 | },
148 | "source": [
149 | "#Train the XGBoost Model\n",
150 | "XGBoost provides a wrapper class to allow models to be treated like classifiers or regressors in the scikit-learn framework.\n",
151 | "\n",
152 | "This means we can use the full scikit-learn library with XGBoost models.\n",
153 | "\n",
154 | "The XGBoost model for classification is called XGBClassifier. We can create and and fit it to our training dataset. Models are fit using the scikit-learn API and the model.fit() function.\n",
155 | "\n",
156 | "Parameters for training the model can be passed to the model in the constructor. Here, we use the sensible defaults.\n",
157 | "\n"
158 | ]
159 | },
160 | {
161 | "cell_type": "code",
162 | "metadata": {
163 | "colab": {
164 | "base_uri": "https://localhost:8080/"
165 | },
166 | "id": "nxyADMKhXQpS",
167 | "outputId": "e40b9fa0-85d1-4a77-c09a-ae373dfb5f14"
168 | },
169 | "source": [
170 | "# fit model no training data\n",
171 | "model = XGBClassifier()\n",
172 | "model.fit(X_train, y_train)"
173 | ],
174 | "execution_count": 9,
175 | "outputs": [
176 | {
177 | "output_type": "execute_result",
178 | "data": {
179 | "text/plain": [
180 | "XGBClassifier(base_score=0.5, booster='gbtree', colsample_bylevel=1,\n",
181 | " colsample_bynode=1, colsample_bytree=1, gamma=0,\n",
182 | " learning_rate=0.1, max_delta_step=0, max_depth=3,\n",
183 | " min_child_weight=1, missing=None, n_estimators=100, n_jobs=1,\n",
184 | " nthread=None, objective='binary:logistic', random_state=0,\n",
185 | " reg_alpha=0, reg_lambda=1, scale_pos_weight=1, seed=None,\n",
186 | " silent=None, subsample=1, verbosity=1)"
187 | ]
188 | },
189 | "metadata": {
190 | "tags": []
191 | },
192 | "execution_count": 9
193 | }
194 | ]
195 | },
196 | {
197 | "cell_type": "markdown",
198 | "metadata": {
199 | "id": "E7m9QdYnXTAO"
200 | },
201 | "source": [
202 | "You can see the parameters used in a trained model by printing the model, for example:\n",
203 | "\n"
204 | ]
205 | },
206 | {
207 | "cell_type": "code",
208 | "metadata": {
209 | "colab": {
210 | "base_uri": "https://localhost:8080/"
211 | },
212 | "id": "J9ofhSkXXV9O",
213 | "outputId": "759a1f5c-86b3-49d9-c5c1-67244128bbd6"
214 | },
215 | "source": [
216 | "print(model)"
217 | ],
218 | "execution_count": 10,
219 | "outputs": [
220 | {
221 | "output_type": "stream",
222 | "text": [
223 | "XGBClassifier(base_score=0.5, booster='gbtree', colsample_bylevel=1,\n",
224 | " colsample_bynode=1, colsample_bytree=1, gamma=0,\n",
225 | " learning_rate=0.1, max_delta_step=0, max_depth=3,\n",
226 | " min_child_weight=1, missing=None, n_estimators=100, n_jobs=1,\n",
227 | " nthread=None, objective='binary:logistic', random_state=0,\n",
228 | " reg_alpha=0, reg_lambda=1, scale_pos_weight=1, seed=None,\n",
229 | " silent=None, subsample=1, verbosity=1)\n"
230 | ],
231 | "name": "stdout"
232 | }
233 | ]
234 | },
235 | {
236 | "cell_type": "markdown",
237 | "metadata": {
238 | "id": "RtTcPSHDXZgC"
239 | },
240 | "source": [
241 | "You can learn more about the defaults for the XGBClassifier and XGBRegressor classes in the XGBoost Python scikit-learn API.\n",
242 | "https://xgboost.readthedocs.io/en/latest/python/python_api.html#module-xgboost.sklearn\n",
243 | "\n",
244 | "You can learn more about the meaning of each parameter and how to configure them on the XGBoost parameters page.\n",
245 | "https://xgboost.readthedocs.io/en/latest//parameter.html\n",
246 | "\n",
247 | "\n",
248 | "We are now ready to use the trained model to make predictions.\n",
249 | "\n"
250 | ]
251 | },
252 | {
253 | "cell_type": "markdown",
254 | "metadata": {
255 | "id": "hOy9w928Xlsv"
256 | },
257 | "source": [
258 | "#Make Predictions with XGBoost Model\n",
259 | "We can make predictions using the fit model on the test dataset.\n",
260 | "\n",
261 | "To make predictions we use the scikit-learn function model.predict().\n",
262 | "\n",
263 | "By default, the predictions made by XGBoost are probabilities. Because this is a binary classification problem, each prediction is the probability of the input pattern belonging to the first class. We can easily convert them to binary class values by rounding them to 0 or 1.\n",
264 | "\n"
265 | ]
266 | },
267 | {
268 | "cell_type": "code",
269 | "metadata": {
270 | "id": "VRqMw4ArXqlU"
271 | },
272 | "source": [
273 | "# make predictions for test data\n",
274 | "y_pred = model.predict(X_test)\n",
275 | "predictions = [round(value) for value in y_pred]"
276 | ],
277 | "execution_count": 11,
278 | "outputs": []
279 | },
280 | {
281 | "cell_type": "markdown",
282 | "metadata": {
283 | "id": "c08yUloQXskj"
284 | },
285 | "source": [
286 | "Now that we have used the fit model to make predictions on new data, we can evaluate the performance of the predictions by comparing them to the expected values. For this we will use the built in accuracy_score() function in scikit-learn.\n",
287 | "\n"
288 | ]
289 | },
290 | {
291 | "cell_type": "code",
292 | "metadata": {
293 | "colab": {
294 | "base_uri": "https://localhost:8080/"
295 | },
296 | "id": "vtEOtTONXvBz",
297 | "outputId": "afad4b8d-2297-4ad6-c791-eb9083d0698f"
298 | },
299 | "source": [
300 | "# evaluate predictions\n",
301 | "accuracy = accuracy_score(y_test, predictions)\n",
302 | "print(\"Accuracy: %.2f%%\" % (accuracy * 100.0))"
303 | ],
304 | "execution_count": 12,
305 | "outputs": [
306 | {
307 | "output_type": "stream",
308 | "text": [
309 | "Accuracy: 77.95%\n"
310 | ],
311 | "name": "stdout"
312 | }
313 | ]
314 | }
315 | ]
316 | }
--------------------------------------------------------------------------------
/EnsembleLearning/datasets/breast-cancer.csv:
--------------------------------------------------------------------------------
1 | Sample code number,Clump Thickness,Uniformity of Cell Size,Uniformity of Cell Shape,Marginal Adhesion ,Single Epithelial Cell Size,Bare Nuclei,Bland Chromatin,Normal Nucleoli,Mitoses,Class
2 | 1000025,5,1,1,1,2,1,3,1,1,2
3 | 1002945,5,4,4,5,7,10,3,2,1,2
4 | 1015425,3,1,1,1,2,2,3,1,1,2
5 | 1016277,6,8,8,1,3,4,3,7,1,2
6 | 1017023,4,1,1,3,2,1,3,1,1,2
7 | 1017122,8,10,10,8,7,10,9,7,1,4
8 | 1018099,1,1,1,1,2,10,3,1,1,2
9 | 1018561,2,1,2,1,2,1,3,1,1,2
10 | 1033078,2,1,1,1,2,1,1,1,5,2
11 | 1033078,4,2,1,1,2,1,2,1,1,2
12 | 1035283,1,1,1,1,1,1,3,1,1,2
13 | 1036172,2,1,1,1,2,1,2,1,1,2
14 | 1041801,5,3,3,3,2,3,4,4,1,4
15 | 1043999,1,1,1,1,2,3,3,1,1,2
16 | 1044572,8,7,5,10,7,9,5,5,4,4
17 | 1047630,7,4,6,4,6,1,4,3,1,4
18 | 1048672,4,1,1,1,2,1,2,1,1,2
19 | 1049815,4,1,1,1,2,1,3,1,1,2
20 | 1050670,10,7,7,6,4,10,4,1,2,4
21 | 1050718,6,1,1,1,2,1,3,1,1,2
22 | 1054590,7,3,2,10,5,10,5,4,4,4
23 | 1054593,10,5,5,3,6,7,7,10,1,4
24 | 1056784,3,1,1,1,2,1,2,1,1,2
25 | 1057013,8,4,5,1,2,?,7,3,1,4
26 | 1059552,1,1,1,1,2,1,3,1,1,2
27 | 1065726,5,2,3,4,2,7,3,6,1,4
28 | 1066373,3,2,1,1,1,1,2,1,1,2
29 | 1066979,5,1,1,1,2,1,2,1,1,2
30 | 1067444,2,1,1,1,2,1,2,1,1,2
31 | 1070935,1,1,3,1,2,1,1,1,1,2
32 | 1070935,3,1,1,1,1,1,2,1,1,2
33 | 1071760,2,1,1,1,2,1,3,1,1,2
34 | 1072179,10,7,7,3,8,5,7,4,3,4
35 | 1074610,2,1,1,2,2,1,3,1,1,2
36 | 1075123,3,1,2,1,2,1,2,1,1,2
37 | 1079304,2,1,1,1,2,1,2,1,1,2
38 | 1080185,10,10,10,8,6,1,8,9,1,4
39 | 1081791,6,2,1,1,1,1,7,1,1,2
40 | 1084584,5,4,4,9,2,10,5,6,1,4
41 | 1091262,2,5,3,3,6,7,7,5,1,4
42 | 1096800,6,6,6,9,6,?,7,8,1,2
43 | 1099510,10,4,3,1,3,3,6,5,2,4
44 | 1100524,6,10,10,2,8,10,7,3,3,4
45 | 1102573,5,6,5,6,10,1,3,1,1,4
46 | 1103608,10,10,10,4,8,1,8,10,1,4
47 | 1103722,1,1,1,1,2,1,2,1,2,2
48 | 1105257,3,7,7,4,4,9,4,8,1,4
49 | 1105524,1,1,1,1,2,1,2,1,1,2
50 | 1106095,4,1,1,3,2,1,3,1,1,2
51 | 1106829,7,8,7,2,4,8,3,8,2,4
52 | 1108370,9,5,8,1,2,3,2,1,5,4
53 | 1108449,5,3,3,4,2,4,3,4,1,4
54 | 1110102,10,3,6,2,3,5,4,10,2,4
55 | 1110503,5,5,5,8,10,8,7,3,7,4
56 | 1110524,10,5,5,6,8,8,7,1,1,4
57 | 1111249,10,6,6,3,4,5,3,6,1,4
58 | 1112209,8,10,10,1,3,6,3,9,1,4
59 | 1113038,8,2,4,1,5,1,5,4,4,4
60 | 1113483,5,2,3,1,6,10,5,1,1,4
61 | 1113906,9,5,5,2,2,2,5,1,1,4
62 | 1115282,5,3,5,5,3,3,4,10,1,4
63 | 1115293,1,1,1,1,2,2,2,1,1,2
64 | 1116116,9,10,10,1,10,8,3,3,1,4
65 | 1116132,6,3,4,1,5,2,3,9,1,4
66 | 1116192,1,1,1,1,2,1,2,1,1,2
67 | 1116998,10,4,2,1,3,2,4,3,10,4
68 | 1117152,4,1,1,1,2,1,3,1,1,2
69 | 1118039,5,3,4,1,8,10,4,9,1,4
70 | 1120559,8,3,8,3,4,9,8,9,8,4
71 | 1121732,1,1,1,1,2,1,3,2,1,2
72 | 1121919,5,1,3,1,2,1,2,1,1,2
73 | 1123061,6,10,2,8,10,2,7,8,10,4
74 | 1124651,1,3,3,2,2,1,7,2,1,2
75 | 1125035,9,4,5,10,6,10,4,8,1,4
76 | 1126417,10,6,4,1,3,4,3,2,3,4
77 | 1131294,1,1,2,1,2,2,4,2,1,2
78 | 1132347,1,1,4,1,2,1,2,1,1,2
79 | 1133041,5,3,1,2,2,1,2,1,1,2
80 | 1133136,3,1,1,1,2,3,3,1,1,2
81 | 1136142,2,1,1,1,3,1,2,1,1,2
82 | 1137156,2,2,2,1,1,1,7,1,1,2
83 | 1143978,4,1,1,2,2,1,2,1,1,2
84 | 1143978,5,2,1,1,2,1,3,1,1,2
85 | 1147044,3,1,1,1,2,2,7,1,1,2
86 | 1147699,3,5,7,8,8,9,7,10,7,4
87 | 1147748,5,10,6,1,10,4,4,10,10,4
88 | 1148278,3,3,6,4,5,8,4,4,1,4
89 | 1148873,3,6,6,6,5,10,6,8,3,4
90 | 1152331,4,1,1,1,2,1,3,1,1,2
91 | 1155546,2,1,1,2,3,1,2,1,1,2
92 | 1156272,1,1,1,1,2,1,3,1,1,2
93 | 1156948,3,1,1,2,2,1,1,1,1,2
94 | 1157734,4,1,1,1,2,1,3,1,1,2
95 | 1158247,1,1,1,1,2,1,2,1,1,2
96 | 1160476,2,1,1,1,2,1,3,1,1,2
97 | 1164066,1,1,1,1,2,1,3,1,1,2
98 | 1165297,2,1,1,2,2,1,1,1,1,2
99 | 1165790,5,1,1,1,2,1,3,1,1,2
100 | 1165926,9,6,9,2,10,6,2,9,10,4
101 | 1166630,7,5,6,10,5,10,7,9,4,4
102 | 1166654,10,3,5,1,10,5,3,10,2,4
103 | 1167439,2,3,4,4,2,5,2,5,1,4
104 | 1167471,4,1,2,1,2,1,3,1,1,2
105 | 1168359,8,2,3,1,6,3,7,1,1,4
106 | 1168736,10,10,10,10,10,1,8,8,8,4
107 | 1169049,7,3,4,4,3,3,3,2,7,4
108 | 1170419,10,10,10,8,2,10,4,1,1,4
109 | 1170420,1,6,8,10,8,10,5,7,1,4
110 | 1171710,1,1,1,1,2,1,2,3,1,2
111 | 1171710,6,5,4,4,3,9,7,8,3,4
112 | 1171795,1,3,1,2,2,2,5,3,2,2
113 | 1171845,8,6,4,3,5,9,3,1,1,4
114 | 1172152,10,3,3,10,2,10,7,3,3,4
115 | 1173216,10,10,10,3,10,8,8,1,1,4
116 | 1173235,3,3,2,1,2,3,3,1,1,2
117 | 1173347,1,1,1,1,2,5,1,1,1,2
118 | 1173347,8,3,3,1,2,2,3,2,1,2
119 | 1173509,4,5,5,10,4,10,7,5,8,4
120 | 1173514,1,1,1,1,4,3,1,1,1,2
121 | 1173681,3,2,1,1,2,2,3,1,1,2
122 | 1174057,1,1,2,2,2,1,3,1,1,2
123 | 1174057,4,2,1,1,2,2,3,1,1,2
124 | 1174131,10,10,10,2,10,10,5,3,3,4
125 | 1174428,5,3,5,1,8,10,5,3,1,4
126 | 1175937,5,4,6,7,9,7,8,10,1,4
127 | 1176406,1,1,1,1,2,1,2,1,1,2
128 | 1176881,7,5,3,7,4,10,7,5,5,4
129 | 1177027,3,1,1,1,2,1,3,1,1,2
130 | 1177399,8,3,5,4,5,10,1,6,2,4
131 | 1177512,1,1,1,1,10,1,1,1,1,2
132 | 1178580,5,1,3,1,2,1,2,1,1,2
133 | 1179818,2,1,1,1,2,1,3,1,1,2
134 | 1180194,5,10,8,10,8,10,3,6,3,4
135 | 1180523,3,1,1,1,2,1,2,2,1,2
136 | 1180831,3,1,1,1,3,1,2,1,1,2
137 | 1181356,5,1,1,1,2,2,3,3,1,2
138 | 1182404,4,1,1,1,2,1,2,1,1,2
139 | 1182410,3,1,1,1,2,1,1,1,1,2
140 | 1183240,4,1,2,1,2,1,2,1,1,2
141 | 1183246,1,1,1,1,1,?,2,1,1,2
142 | 1183516,3,1,1,1,2,1,1,1,1,2
143 | 1183911,2,1,1,1,2,1,1,1,1,2
144 | 1183983,9,5,5,4,4,5,4,3,3,4
145 | 1184184,1,1,1,1,2,5,1,1,1,2
146 | 1184241,2,1,1,1,2,1,2,1,1,2
147 | 1184840,1,1,3,1,2,?,2,1,1,2
148 | 1185609,3,4,5,2,6,8,4,1,1,4
149 | 1185610,1,1,1,1,3,2,2,1,1,2
150 | 1187457,3,1,1,3,8,1,5,8,1,2
151 | 1187805,8,8,7,4,10,10,7,8,7,4
152 | 1188472,1,1,1,1,1,1,3,1,1,2
153 | 1189266,7,2,4,1,6,10,5,4,3,4
154 | 1189286,10,10,8,6,4,5,8,10,1,4
155 | 1190394,4,1,1,1,2,3,1,1,1,2
156 | 1190485,1,1,1,1,2,1,1,1,1,2
157 | 1192325,5,5,5,6,3,10,3,1,1,4
158 | 1193091,1,2,2,1,2,1,2,1,1,2
159 | 1193210,2,1,1,1,2,1,3,1,1,2
160 | 1193683,1,1,2,1,3,?,1,1,1,2
161 | 1196295,9,9,10,3,6,10,7,10,6,4
162 | 1196915,10,7,7,4,5,10,5,7,2,4
163 | 1197080,4,1,1,1,2,1,3,2,1,2
164 | 1197270,3,1,1,1,2,1,3,1,1,2
165 | 1197440,1,1,1,2,1,3,1,1,7,2
166 | 1197510,5,1,1,1,2,?,3,1,1,2
167 | 1197979,4,1,1,1,2,2,3,2,1,2
168 | 1197993,5,6,7,8,8,10,3,10,3,4
169 | 1198128,10,8,10,10,6,1,3,1,10,4
170 | 1198641,3,1,1,1,2,1,3,1,1,2
171 | 1199219,1,1,1,2,1,1,1,1,1,2
172 | 1199731,3,1,1,1,2,1,1,1,1,2
173 | 1199983,1,1,1,1,2,1,3,1,1,2
174 | 1200772,1,1,1,1,2,1,2,1,1,2
175 | 1200847,6,10,10,10,8,10,10,10,7,4
176 | 1200892,8,6,5,4,3,10,6,1,1,4
177 | 1200952,5,8,7,7,10,10,5,7,1,4
178 | 1201834,2,1,1,1,2,1,3,1,1,2
179 | 1201936,5,10,10,3,8,1,5,10,3,4
180 | 1202125,4,1,1,1,2,1,3,1,1,2
181 | 1202812,5,3,3,3,6,10,3,1,1,4
182 | 1203096,1,1,1,1,1,1,3,1,1,2
183 | 1204242,1,1,1,1,2,1,1,1,1,2
184 | 1204898,6,1,1,1,2,1,3,1,1,2
185 | 1205138,5,8,8,8,5,10,7,8,1,4
186 | 1205579,8,7,6,4,4,10,5,1,1,4
187 | 1206089,2,1,1,1,1,1,3,1,1,2
188 | 1206695,1,5,8,6,5,8,7,10,1,4
189 | 1206841,10,5,6,10,6,10,7,7,10,4
190 | 1207986,5,8,4,10,5,8,9,10,1,4
191 | 1208301,1,2,3,1,2,1,3,1,1,2
192 | 1210963,10,10,10,8,6,8,7,10,1,4
193 | 1211202,7,5,10,10,10,10,4,10,3,4
194 | 1212232,5,1,1,1,2,1,2,1,1,2
195 | 1212251,1,1,1,1,2,1,3,1,1,2
196 | 1212422,3,1,1,1,2,1,3,1,1,2
197 | 1212422,4,1,1,1,2,1,3,1,1,2
198 | 1213375,8,4,4,5,4,7,7,8,2,2
199 | 1213383,5,1,1,4,2,1,3,1,1,2
200 | 1214092,1,1,1,1,2,1,1,1,1,2
201 | 1214556,3,1,1,1,2,1,2,1,1,2
202 | 1214966,9,7,7,5,5,10,7,8,3,4
203 | 1216694,10,8,8,4,10,10,8,1,1,4
204 | 1216947,1,1,1,1,2,1,3,1,1,2
205 | 1217051,5,1,1,1,2,1,3,1,1,2
206 | 1217264,1,1,1,1,2,1,3,1,1,2
207 | 1218105,5,10,10,9,6,10,7,10,5,4
208 | 1218741,10,10,9,3,7,5,3,5,1,4
209 | 1218860,1,1,1,1,1,1,3,1,1,2
210 | 1218860,1,1,1,1,1,1,3,1,1,2
211 | 1219406,5,1,1,1,1,1,3,1,1,2
212 | 1219525,8,10,10,10,5,10,8,10,6,4
213 | 1219859,8,10,8,8,4,8,7,7,1,4
214 | 1220330,1,1,1,1,2,1,3,1,1,2
215 | 1221863,10,10,10,10,7,10,7,10,4,4
216 | 1222047,10,10,10,10,3,10,10,6,1,4
217 | 1222936,8,7,8,7,5,5,5,10,2,4
218 | 1223282,1,1,1,1,2,1,2,1,1,2
219 | 1223426,1,1,1,1,2,1,3,1,1,2
220 | 1223793,6,10,7,7,6,4,8,10,2,4
221 | 1223967,6,1,3,1,2,1,3,1,1,2
222 | 1224329,1,1,1,2,2,1,3,1,1,2
223 | 1225799,10,6,4,3,10,10,9,10,1,4
224 | 1226012,4,1,1,3,1,5,2,1,1,4
225 | 1226612,7,5,6,3,3,8,7,4,1,4
226 | 1227210,10,5,5,6,3,10,7,9,2,4
227 | 1227244,1,1,1,1,2,1,2,1,1,2
228 | 1227481,10,5,7,4,4,10,8,9,1,4
229 | 1228152,8,9,9,5,3,5,7,7,1,4
230 | 1228311,1,1,1,1,1,1,3,1,1,2
231 | 1230175,10,10,10,3,10,10,9,10,1,4
232 | 1230688,7,4,7,4,3,7,7,6,1,4
233 | 1231387,6,8,7,5,6,8,8,9,2,4
234 | 1231706,8,4,6,3,3,1,4,3,1,2
235 | 1232225,10,4,5,5,5,10,4,1,1,4
236 | 1236043,3,3,2,1,3,1,3,6,1,2
237 | 1241232,3,1,4,1,2,?,3,1,1,2
238 | 1241559,10,8,8,2,8,10,4,8,10,4
239 | 1241679,9,8,8,5,6,2,4,10,4,4
240 | 1242364,8,10,10,8,6,9,3,10,10,4
241 | 1243256,10,4,3,2,3,10,5,3,2,4
242 | 1270479,5,1,3,3,2,2,2,3,1,2
243 | 1276091,3,1,1,3,1,1,3,1,1,2
244 | 1277018,2,1,1,1,2,1,3,1,1,2
245 | 128059,1,1,1,1,2,5,5,1,1,2
246 | 1285531,1,1,1,1,2,1,3,1,1,2
247 | 1287775,5,1,1,2,2,2,3,1,1,2
248 | 144888,8,10,10,8,5,10,7,8,1,4
249 | 145447,8,4,4,1,2,9,3,3,1,4
250 | 167528,4,1,1,1,2,1,3,6,1,2
251 | 169356,3,1,1,1,2,?,3,1,1,2
252 | 183913,1,2,2,1,2,1,1,1,1,2
253 | 191250,10,4,4,10,2,10,5,3,3,4
254 | 1017023,6,3,3,5,3,10,3,5,3,2
255 | 1100524,6,10,10,2,8,10,7,3,3,4
256 | 1116116,9,10,10,1,10,8,3,3,1,4
257 | 1168736,5,6,6,2,4,10,3,6,1,4
258 | 1182404,3,1,1,1,2,1,1,1,1,2
259 | 1182404,3,1,1,1,2,1,2,1,1,2
260 | 1198641,3,1,1,1,2,1,3,1,1,2
261 | 242970,5,7,7,1,5,8,3,4,1,2
262 | 255644,10,5,8,10,3,10,5,1,3,4
263 | 263538,5,10,10,6,10,10,10,6,5,4
264 | 274137,8,8,9,4,5,10,7,8,1,4
265 | 303213,10,4,4,10,6,10,5,5,1,4
266 | 314428,7,9,4,10,10,3,5,3,3,4
267 | 1182404,5,1,4,1,2,1,3,2,1,2
268 | 1198641,10,10,6,3,3,10,4,3,2,4
269 | 320675,3,3,5,2,3,10,7,1,1,4
270 | 324427,10,8,8,2,3,4,8,7,8,4
271 | 385103,1,1,1,1,2,1,3,1,1,2
272 | 390840,8,4,7,1,3,10,3,9,2,4
273 | 411453,5,1,1,1,2,1,3,1,1,2
274 | 320675,3,3,5,2,3,10,7,1,1,4
275 | 428903,7,2,4,1,3,4,3,3,1,4
276 | 431495,3,1,1,1,2,1,3,2,1,2
277 | 432809,3,1,3,1,2,?,2,1,1,2
278 | 434518,3,1,1,1,2,1,2,1,1,2
279 | 452264,1,1,1,1,2,1,2,1,1,2
280 | 456282,1,1,1,1,2,1,3,1,1,2
281 | 476903,10,5,7,3,3,7,3,3,8,4
282 | 486283,3,1,1,1,2,1,3,1,1,2
283 | 486662,2,1,1,2,2,1,3,1,1,2
284 | 488173,1,4,3,10,4,10,5,6,1,4
285 | 492268,10,4,6,1,2,10,5,3,1,4
286 | 508234,7,4,5,10,2,10,3,8,2,4
287 | 527363,8,10,10,10,8,10,10,7,3,4
288 | 529329,10,10,10,10,10,10,4,10,10,4
289 | 535331,3,1,1,1,3,1,2,1,1,2
290 | 543558,6,1,3,1,4,5,5,10,1,4
291 | 555977,5,6,6,8,6,10,4,10,4,4
292 | 560680,1,1,1,1,2,1,1,1,1,2
293 | 561477,1,1,1,1,2,1,3,1,1,2
294 | 563649,8,8,8,1,2,?,6,10,1,4
295 | 601265,10,4,4,6,2,10,2,3,1,4
296 | 606140,1,1,1,1,2,?,2,1,1,2
297 | 606722,5,5,7,8,6,10,7,4,1,4
298 | 616240,5,3,4,3,4,5,4,7,1,2
299 | 61634,5,4,3,1,2,?,2,3,1,2
300 | 625201,8,2,1,1,5,1,1,1,1,2
301 | 63375,9,1,2,6,4,10,7,7,2,4
302 | 635844,8,4,10,5,4,4,7,10,1,4
303 | 636130,1,1,1,1,2,1,3,1,1,2
304 | 640744,10,10,10,7,9,10,7,10,10,4
305 | 646904,1,1,1,1,2,1,3,1,1,2
306 | 653777,8,3,4,9,3,10,3,3,1,4
307 | 659642,10,8,4,4,4,10,3,10,4,4
308 | 666090,1,1,1,1,2,1,3,1,1,2
309 | 666942,1,1,1,1,2,1,3,1,1,2
310 | 667204,7,8,7,6,4,3,8,8,4,4
311 | 673637,3,1,1,1,2,5,5,1,1,2
312 | 684955,2,1,1,1,3,1,2,1,1,2
313 | 688033,1,1,1,1,2,1,1,1,1,2
314 | 691628,8,6,4,10,10,1,3,5,1,4
315 | 693702,1,1,1,1,2,1,1,1,1,2
316 | 704097,1,1,1,1,1,1,2,1,1,2
317 | 704168,4,6,5,6,7,?,4,9,1,2
318 | 706426,5,5,5,2,5,10,4,3,1,4
319 | 709287,6,8,7,8,6,8,8,9,1,4
320 | 718641,1,1,1,1,5,1,3,1,1,2
321 | 721482,4,4,4,4,6,5,7,3,1,2
322 | 730881,7,6,3,2,5,10,7,4,6,4
323 | 733639,3,1,1,1,2,?,3,1,1,2
324 | 733639,3,1,1,1,2,1,3,1,1,2
325 | 733823,5,4,6,10,2,10,4,1,1,4
326 | 740492,1,1,1,1,2,1,3,1,1,2
327 | 743348,3,2,2,1,2,1,2,3,1,2
328 | 752904,10,1,1,1,2,10,5,4,1,4
329 | 756136,1,1,1,1,2,1,2,1,1,2
330 | 760001,8,10,3,2,6,4,3,10,1,4
331 | 760239,10,4,6,4,5,10,7,1,1,4
332 | 76389,10,4,7,2,2,8,6,1,1,4
333 | 764974,5,1,1,1,2,1,3,1,2,2
334 | 770066,5,2,2,2,2,1,2,2,1,2
335 | 785208,5,4,6,6,4,10,4,3,1,4
336 | 785615,8,6,7,3,3,10,3,4,2,4
337 | 792744,1,1,1,1,2,1,1,1,1,2
338 | 797327,6,5,5,8,4,10,3,4,1,4
339 | 798429,1,1,1,1,2,1,3,1,1,2
340 | 704097,1,1,1,1,1,1,2,1,1,2
341 | 806423,8,5,5,5,2,10,4,3,1,4
342 | 809912,10,3,3,1,2,10,7,6,1,4
343 | 810104,1,1,1,1,2,1,3,1,1,2
344 | 814265,2,1,1,1,2,1,1,1,1,2
345 | 814911,1,1,1,1,2,1,1,1,1,2
346 | 822829,7,6,4,8,10,10,9,5,3,4
347 | 826923,1,1,1,1,2,1,1,1,1,2
348 | 830690,5,2,2,2,3,1,1,3,1,2
349 | 831268,1,1,1,1,1,1,1,3,1,2
350 | 832226,3,4,4,10,5,1,3,3,1,4
351 | 832567,4,2,3,5,3,8,7,6,1,4
352 | 836433,5,1,1,3,2,1,1,1,1,2
353 | 837082,2,1,1,1,2,1,3,1,1,2
354 | 846832,3,4,5,3,7,3,4,6,1,2
355 | 850831,2,7,10,10,7,10,4,9,4,4
356 | 855524,1,1,1,1,2,1,2,1,1,2
357 | 857774,4,1,1,1,3,1,2,2,1,2
358 | 859164,5,3,3,1,3,3,3,3,3,4
359 | 859350,8,10,10,7,10,10,7,3,8,4
360 | 866325,8,10,5,3,8,4,4,10,3,4
361 | 873549,10,3,5,4,3,7,3,5,3,4
362 | 877291,6,10,10,10,10,10,8,10,10,4
363 | 877943,3,10,3,10,6,10,5,1,4,4
364 | 888169,3,2,2,1,4,3,2,1,1,2
365 | 888523,4,4,4,2,2,3,2,1,1,2
366 | 896404,2,1,1,1,2,1,3,1,1,2
367 | 897172,2,1,1,1,2,1,2,1,1,2
368 | 95719,6,10,10,10,8,10,7,10,7,4
369 | 160296,5,8,8,10,5,10,8,10,3,4
370 | 342245,1,1,3,1,2,1,1,1,1,2
371 | 428598,1,1,3,1,1,1,2,1,1,2
372 | 492561,4,3,2,1,3,1,2,1,1,2
373 | 493452,1,1,3,1,2,1,1,1,1,2
374 | 493452,4,1,2,1,2,1,2,1,1,2
375 | 521441,5,1,1,2,2,1,2,1,1,2
376 | 560680,3,1,2,1,2,1,2,1,1,2
377 | 636437,1,1,1,1,2,1,1,1,1,2
378 | 640712,1,1,1,1,2,1,2,1,1,2
379 | 654244,1,1,1,1,1,1,2,1,1,2
380 | 657753,3,1,1,4,3,1,2,2,1,2
381 | 685977,5,3,4,1,4,1,3,1,1,2
382 | 805448,1,1,1,1,2,1,1,1,1,2
383 | 846423,10,6,3,6,4,10,7,8,4,4
384 | 1002504,3,2,2,2,2,1,3,2,1,2
385 | 1022257,2,1,1,1,2,1,1,1,1,2
386 | 1026122,2,1,1,1,2,1,1,1,1,2
387 | 1071084,3,3,2,2,3,1,1,2,3,2
388 | 1080233,7,6,6,3,2,10,7,1,1,4
389 | 1114570,5,3,3,2,3,1,3,1,1,2
390 | 1114570,2,1,1,1,2,1,2,2,1,2
391 | 1116715,5,1,1,1,3,2,2,2,1,2
392 | 1131411,1,1,1,2,2,1,2,1,1,2
393 | 1151734,10,8,7,4,3,10,7,9,1,4
394 | 1156017,3,1,1,1,2,1,2,1,1,2
395 | 1158247,1,1,1,1,1,1,1,1,1,2
396 | 1158405,1,2,3,1,2,1,2,1,1,2
397 | 1168278,3,1,1,1,2,1,2,1,1,2
398 | 1176187,3,1,1,1,2,1,3,1,1,2
399 | 1196263,4,1,1,1,2,1,1,1,1,2
400 | 1196475,3,2,1,1,2,1,2,2,1,2
401 | 1206314,1,2,3,1,2,1,1,1,1,2
402 | 1211265,3,10,8,7,6,9,9,3,8,4
403 | 1213784,3,1,1,1,2,1,1,1,1,2
404 | 1223003,5,3,3,1,2,1,2,1,1,2
405 | 1223306,3,1,1,1,2,4,1,1,1,2
406 | 1223543,1,2,1,3,2,1,1,2,1,2
407 | 1229929,1,1,1,1,2,1,2,1,1,2
408 | 1231853,4,2,2,1,2,1,2,1,1,2
409 | 1234554,1,1,1,1,2,1,2,1,1,2
410 | 1236837,2,3,2,2,2,2,3,1,1,2
411 | 1237674,3,1,2,1,2,1,2,1,1,2
412 | 1238021,1,1,1,1,2,1,2,1,1,2
413 | 1238464,1,1,1,1,1,?,2,1,1,2
414 | 1238633,10,10,10,6,8,4,8,5,1,4
415 | 1238915,5,1,2,1,2,1,3,1,1,2
416 | 1238948,8,5,6,2,3,10,6,6,1,4
417 | 1239232,3,3,2,6,3,3,3,5,1,2
418 | 1239347,8,7,8,5,10,10,7,2,1,4
419 | 1239967,1,1,1,1,2,1,2,1,1,2
420 | 1240337,5,2,2,2,2,2,3,2,2,2
421 | 1253505,2,3,1,1,5,1,1,1,1,2
422 | 1255384,3,2,2,3,2,3,3,1,1,2
423 | 1257200,10,10,10,7,10,10,8,2,1,4
424 | 1257648,4,3,3,1,2,1,3,3,1,2
425 | 1257815,5,1,3,1,2,1,2,1,1,2
426 | 1257938,3,1,1,1,2,1,1,1,1,2
427 | 1258549,9,10,10,10,10,10,10,10,1,4
428 | 1258556,5,3,6,1,2,1,1,1,1,2
429 | 1266154,8,7,8,2,4,2,5,10,1,4
430 | 1272039,1,1,1,1,2,1,2,1,1,2
431 | 1276091,2,1,1,1,2,1,2,1,1,2
432 | 1276091,1,3,1,1,2,1,2,2,1,2
433 | 1276091,5,1,1,3,4,1,3,2,1,2
434 | 1277629,5,1,1,1,2,1,2,2,1,2
435 | 1293439,3,2,2,3,2,1,1,1,1,2
436 | 1293439,6,9,7,5,5,8,4,2,1,2
437 | 1294562,10,8,10,1,3,10,5,1,1,4
438 | 1295186,10,10,10,1,6,1,2,8,1,4
439 | 527337,4,1,1,1,2,1,1,1,1,2
440 | 558538,4,1,3,3,2,1,1,1,1,2
441 | 566509,5,1,1,1,2,1,1,1,1,2
442 | 608157,10,4,3,10,4,10,10,1,1,4
443 | 677910,5,2,2,4,2,4,1,1,1,2
444 | 734111,1,1,1,3,2,3,1,1,1,2
445 | 734111,1,1,1,1,2,2,1,1,1,2
446 | 780555,5,1,1,6,3,1,2,1,1,2
447 | 827627,2,1,1,1,2,1,1,1,1,2
448 | 1049837,1,1,1,1,2,1,1,1,1,2
449 | 1058849,5,1,1,1,2,1,1,1,1,2
450 | 1182404,1,1,1,1,1,1,1,1,1,2
451 | 1193544,5,7,9,8,6,10,8,10,1,4
452 | 1201870,4,1,1,3,1,1,2,1,1,2
453 | 1202253,5,1,1,1,2,1,1,1,1,2
454 | 1227081,3,1,1,3,2,1,1,1,1,2
455 | 1230994,4,5,5,8,6,10,10,7,1,4
456 | 1238410,2,3,1,1,3,1,1,1,1,2
457 | 1246562,10,2,2,1,2,6,1,1,2,4
458 | 1257470,10,6,5,8,5,10,8,6,1,4
459 | 1259008,8,8,9,6,6,3,10,10,1,4
460 | 1266124,5,1,2,1,2,1,1,1,1,2
461 | 1267898,5,1,3,1,2,1,1,1,1,2
462 | 1268313,5,1,1,3,2,1,1,1,1,2
463 | 1268804,3,1,1,1,2,5,1,1,1,2
464 | 1276091,6,1,1,3,2,1,1,1,1,2
465 | 1280258,4,1,1,1,2,1,1,2,1,2
466 | 1293966,4,1,1,1,2,1,1,1,1,2
467 | 1296572,10,9,8,7,6,4,7,10,3,4
468 | 1298416,10,6,6,2,4,10,9,7,1,4
469 | 1299596,6,6,6,5,4,10,7,6,2,4
470 | 1105524,4,1,1,1,2,1,1,1,1,2
471 | 1181685,1,1,2,1,2,1,2,1,1,2
472 | 1211594,3,1,1,1,1,1,2,1,1,2
473 | 1238777,6,1,1,3,2,1,1,1,1,2
474 | 1257608,6,1,1,1,1,1,1,1,1,2
475 | 1269574,4,1,1,1,2,1,1,1,1,2
476 | 1277145,5,1,1,1,2,1,1,1,1,2
477 | 1287282,3,1,1,1,2,1,1,1,1,2
478 | 1296025,4,1,2,1,2,1,1,1,1,2
479 | 1296263,4,1,1,1,2,1,1,1,1,2
480 | 1296593,5,2,1,1,2,1,1,1,1,2
481 | 1299161,4,8,7,10,4,10,7,5,1,4
482 | 1301945,5,1,1,1,1,1,1,1,1,2
483 | 1302428,5,3,2,4,2,1,1,1,1,2
484 | 1318169,9,10,10,10,10,5,10,10,10,4
485 | 474162,8,7,8,5,5,10,9,10,1,4
486 | 787451,5,1,2,1,2,1,1,1,1,2
487 | 1002025,1,1,1,3,1,3,1,1,1,2
488 | 1070522,3,1,1,1,1,1,2,1,1,2
489 | 1073960,10,10,10,10,6,10,8,1,5,4
490 | 1076352,3,6,4,10,3,3,3,4,1,4
491 | 1084139,6,3,2,1,3,4,4,1,1,4
492 | 1115293,1,1,1,1,2,1,1,1,1,2
493 | 1119189,5,8,9,4,3,10,7,1,1,4
494 | 1133991,4,1,1,1,1,1,2,1,1,2
495 | 1142706,5,10,10,10,6,10,6,5,2,4
496 | 1155967,5,1,2,10,4,5,2,1,1,2
497 | 1170945,3,1,1,1,1,1,2,1,1,2
498 | 1181567,1,1,1,1,1,1,1,1,1,2
499 | 1182404,4,2,1,1,2,1,1,1,1,2
500 | 1204558,4,1,1,1,2,1,2,1,1,2
501 | 1217952,4,1,1,1,2,1,2,1,1,2
502 | 1224565,6,1,1,1,2,1,3,1,1,2
503 | 1238186,4,1,1,1,2,1,2,1,1,2
504 | 1253917,4,1,1,2,2,1,2,1,1,2
505 | 1265899,4,1,1,1,2,1,3,1,1,2
506 | 1268766,1,1,1,1,2,1,1,1,1,2
507 | 1277268,3,3,1,1,2,1,1,1,1,2
508 | 1286943,8,10,10,10,7,5,4,8,7,4
509 | 1295508,1,1,1,1,2,4,1,1,1,2
510 | 1297327,5,1,1,1,2,1,1,1,1,2
511 | 1297522,2,1,1,1,2,1,1,1,1,2
512 | 1298360,1,1,1,1,2,1,1,1,1,2
513 | 1299924,5,1,1,1,2,1,2,1,1,2
514 | 1299994,5,1,1,1,2,1,1,1,1,2
515 | 1304595,3,1,1,1,1,1,2,1,1,2
516 | 1306282,6,6,7,10,3,10,8,10,2,4
517 | 1313325,4,10,4,7,3,10,9,10,1,4
518 | 1320077,1,1,1,1,1,1,1,1,1,2
519 | 1320077,1,1,1,1,1,1,2,1,1,2
520 | 1320304,3,1,2,2,2,1,1,1,1,2
521 | 1330439,4,7,8,3,4,10,9,1,1,4
522 | 333093,1,1,1,1,3,1,1,1,1,2
523 | 369565,4,1,1,1,3,1,1,1,1,2
524 | 412300,10,4,5,4,3,5,7,3,1,4
525 | 672113,7,5,6,10,4,10,5,3,1,4
526 | 749653,3,1,1,1,2,1,2,1,1,2
527 | 769612,3,1,1,2,2,1,1,1,1,2
528 | 769612,4,1,1,1,2,1,1,1,1,2
529 | 798429,4,1,1,1,2,1,3,1,1,2
530 | 807657,6,1,3,2,2,1,1,1,1,2
531 | 8233704,4,1,1,1,1,1,2,1,1,2
532 | 837480,7,4,4,3,4,10,6,9,1,4
533 | 867392,4,2,2,1,2,1,2,1,1,2
534 | 869828,1,1,1,1,1,1,3,1,1,2
535 | 1043068,3,1,1,1,2,1,2,1,1,2
536 | 1056171,2,1,1,1,2,1,2,1,1,2
537 | 1061990,1,1,3,2,2,1,3,1,1,2
538 | 1113061,5,1,1,1,2,1,3,1,1,2
539 | 1116192,5,1,2,1,2,1,3,1,1,2
540 | 1135090,4,1,1,1,2,1,2,1,1,2
541 | 1145420,6,1,1,1,2,1,2,1,1,2
542 | 1158157,5,1,1,1,2,2,2,1,1,2
543 | 1171578,3,1,1,1,2,1,1,1,1,2
544 | 1174841,5,3,1,1,2,1,1,1,1,2
545 | 1184586,4,1,1,1,2,1,2,1,1,2
546 | 1186936,2,1,3,2,2,1,2,1,1,2
547 | 1197527,5,1,1,1,2,1,2,1,1,2
548 | 1222464,6,10,10,10,4,10,7,10,1,4
549 | 1240603,2,1,1,1,1,1,1,1,1,2
550 | 1240603,3,1,1,1,1,1,1,1,1,2
551 | 1241035,7,8,3,7,4,5,7,8,2,4
552 | 1287971,3,1,1,1,2,1,2,1,1,2
553 | 1289391,1,1,1,1,2,1,3,1,1,2
554 | 1299924,3,2,2,2,2,1,4,2,1,2
555 | 1306339,4,4,2,1,2,5,2,1,2,2
556 | 1313658,3,1,1,1,2,1,1,1,1,2
557 | 1313982,4,3,1,1,2,1,4,8,1,2
558 | 1321264,5,2,2,2,1,1,2,1,1,2
559 | 1321321,5,1,1,3,2,1,1,1,1,2
560 | 1321348,2,1,1,1,2,1,2,1,1,2
561 | 1321931,5,1,1,1,2,1,2,1,1,2
562 | 1321942,5,1,1,1,2,1,3,1,1,2
563 | 1321942,5,1,1,1,2,1,3,1,1,2
564 | 1328331,1,1,1,1,2,1,3,1,1,2
565 | 1328755,3,1,1,1,2,1,2,1,1,2
566 | 1331405,4,1,1,1,2,1,3,2,1,2
567 | 1331412,5,7,10,10,5,10,10,10,1,4
568 | 1333104,3,1,2,1,2,1,3,1,1,2
569 | 1334071,4,1,1,1,2,3,2,1,1,2
570 | 1343068,8,4,4,1,6,10,2,5,2,4
571 | 1343374,10,10,8,10,6,5,10,3,1,4
572 | 1344121,8,10,4,4,8,10,8,2,1,4
573 | 142932,7,6,10,5,3,10,9,10,2,4
574 | 183936,3,1,1,1,2,1,2,1,1,2
575 | 324382,1,1,1,1,2,1,2,1,1,2
576 | 378275,10,9,7,3,4,2,7,7,1,4
577 | 385103,5,1,2,1,2,1,3,1,1,2
578 | 690557,5,1,1,1,2,1,2,1,1,2
579 | 695091,1,1,1,1,2,1,2,1,1,2
580 | 695219,1,1,1,1,2,1,2,1,1,2
581 | 824249,1,1,1,1,2,1,3,1,1,2
582 | 871549,5,1,2,1,2,1,2,1,1,2
583 | 878358,5,7,10,6,5,10,7,5,1,4
584 | 1107684,6,10,5,5,4,10,6,10,1,4
585 | 1115762,3,1,1,1,2,1,1,1,1,2
586 | 1217717,5,1,1,6,3,1,1,1,1,2
587 | 1239420,1,1,1,1,2,1,1,1,1,2
588 | 1254538,8,10,10,10,6,10,10,10,1,4
589 | 1261751,5,1,1,1,2,1,2,2,1,2
590 | 1268275,9,8,8,9,6,3,4,1,1,4
591 | 1272166,5,1,1,1,2,1,1,1,1,2
592 | 1294261,4,10,8,5,4,1,10,1,1,4
593 | 1295529,2,5,7,6,4,10,7,6,1,4
594 | 1298484,10,3,4,5,3,10,4,1,1,4
595 | 1311875,5,1,2,1,2,1,1,1,1,2
596 | 1315506,4,8,6,3,4,10,7,1,1,4
597 | 1320141,5,1,1,1,2,1,2,1,1,2
598 | 1325309,4,1,2,1,2,1,2,1,1,2
599 | 1333063,5,1,3,1,2,1,3,1,1,2
600 | 1333495,3,1,1,1,2,1,2,1,1,2
601 | 1334659,5,2,4,1,1,1,1,1,1,2
602 | 1336798,3,1,1,1,2,1,2,1,1,2
603 | 1344449,1,1,1,1,1,1,2,1,1,2
604 | 1350568,4,1,1,1,2,1,2,1,1,2
605 | 1352663,5,4,6,8,4,1,8,10,1,4
606 | 188336,5,3,2,8,5,10,8,1,2,4
607 | 352431,10,5,10,3,5,8,7,8,3,4
608 | 353098,4,1,1,2,2,1,1,1,1,2
609 | 411453,1,1,1,1,2,1,1,1,1,2
610 | 557583,5,10,10,10,10,10,10,1,1,4
611 | 636375,5,1,1,1,2,1,1,1,1,2
612 | 736150,10,4,3,10,3,10,7,1,2,4
613 | 803531,5,10,10,10,5,2,8,5,1,4
614 | 822829,8,10,10,10,6,10,10,10,10,4
615 | 1016634,2,3,1,1,2,1,2,1,1,2
616 | 1031608,2,1,1,1,1,1,2,1,1,2
617 | 1041043,4,1,3,1,2,1,2,1,1,2
618 | 1042252,3,1,1,1,2,1,2,1,1,2
619 | 1057067,1,1,1,1,1,?,1,1,1,2
620 | 1061990,4,1,1,1,2,1,2,1,1,2
621 | 1073836,5,1,1,1,2,1,2,1,1,2
622 | 1083817,3,1,1,1,2,1,2,1,1,2
623 | 1096352,6,3,3,3,3,2,6,1,1,2
624 | 1140597,7,1,2,3,2,1,2,1,1,2
625 | 1149548,1,1,1,1,2,1,1,1,1,2
626 | 1174009,5,1,1,2,1,1,2,1,1,2
627 | 1183596,3,1,3,1,3,4,1,1,1,2
628 | 1190386,4,6,6,5,7,6,7,7,3,4
629 | 1190546,2,1,1,1,2,5,1,1,1,2
630 | 1213273,2,1,1,1,2,1,1,1,1,2
631 | 1218982,4,1,1,1,2,1,1,1,1,2
632 | 1225382,6,2,3,1,2,1,1,1,1,2
633 | 1235807,5,1,1,1,2,1,2,1,1,2
634 | 1238777,1,1,1,1,2,1,1,1,1,2
635 | 1253955,8,7,4,4,5,3,5,10,1,4
636 | 1257366,3,1,1,1,2,1,1,1,1,2
637 | 1260659,3,1,4,1,2,1,1,1,1,2
638 | 1268952,10,10,7,8,7,1,10,10,3,4
639 | 1275807,4,2,4,3,2,2,2,1,1,2
640 | 1277792,4,1,1,1,2,1,1,1,1,2
641 | 1277792,5,1,1,3,2,1,1,1,1,2
642 | 1285722,4,1,1,3,2,1,1,1,1,2
643 | 1288608,3,1,1,1,2,1,2,1,1,2
644 | 1290203,3,1,1,1,2,1,2,1,1,2
645 | 1294413,1,1,1,1,2,1,1,1,1,2
646 | 1299596,2,1,1,1,2,1,1,1,1,2
647 | 1303489,3,1,1,1,2,1,2,1,1,2
648 | 1311033,1,2,2,1,2,1,1,1,1,2
649 | 1311108,1,1,1,3,2,1,1,1,1,2
650 | 1315807,5,10,10,10,10,2,10,10,10,4
651 | 1318671,3,1,1,1,2,1,2,1,1,2
652 | 1319609,3,1,1,2,3,4,1,1,1,2
653 | 1323477,1,2,1,3,2,1,2,1,1,2
654 | 1324572,5,1,1,1,2,1,2,2,1,2
655 | 1324681,4,1,1,1,2,1,2,1,1,2
656 | 1325159,3,1,1,1,2,1,3,1,1,2
657 | 1326892,3,1,1,1,2,1,2,1,1,2
658 | 1330361,5,1,1,1,2,1,2,1,1,2
659 | 1333877,5,4,5,1,8,1,3,6,1,2
660 | 1334015,7,8,8,7,3,10,7,2,3,4
661 | 1334667,1,1,1,1,2,1,1,1,1,2
662 | 1339781,1,1,1,1,2,1,2,1,1,2
663 | 1339781,4,1,1,1,2,1,3,1,1,2
664 | 13454352,1,1,3,1,2,1,2,1,1,2
665 | 1345452,1,1,3,1,2,1,2,1,1,2
666 | 1345593,3,1,1,3,2,1,2,1,1,2
667 | 1347749,1,1,1,1,2,1,1,1,1,2
668 | 1347943,5,2,2,2,2,1,1,1,2,2
669 | 1348851,3,1,1,1,2,1,3,1,1,2
670 | 1350319,5,7,4,1,6,1,7,10,3,4
671 | 1350423,5,10,10,8,5,5,7,10,1,4
672 | 1352848,3,10,7,8,5,8,7,4,1,4
673 | 1353092,3,2,1,2,2,1,3,1,1,2
674 | 1354840,2,1,1,1,2,1,3,1,1,2
675 | 1354840,5,3,2,1,3,1,1,1,1,2
676 | 1355260,1,1,1,1,2,1,2,1,1,2
677 | 1365075,4,1,4,1,2,1,1,1,1,2
678 | 1365328,1,1,2,1,2,1,2,1,1,2
679 | 1368267,5,1,1,1,2,1,1,1,1,2
680 | 1368273,1,1,1,1,2,1,1,1,1,2
681 | 1368882,2,1,1,1,2,1,1,1,1,2
682 | 1369821,10,10,10,10,5,10,10,10,7,4
683 | 1371026,5,10,10,10,4,10,5,6,3,4
684 | 1371920,5,1,1,1,2,1,3,2,1,2
685 | 466906,1,1,1,1,2,1,1,1,1,2
686 | 466906,1,1,1,1,2,1,1,1,1,2
687 | 534555,1,1,1,1,2,1,1,1,1,2
688 | 536708,1,1,1,1,2,1,1,1,1,2
689 | 566346,3,1,1,1,2,1,2,3,1,2
690 | 603148,4,1,1,1,2,1,1,1,1,2
691 | 654546,1,1,1,1,2,1,1,1,8,2
692 | 654546,1,1,1,3,2,1,1,1,1,2
693 | 695091,5,10,10,5,4,5,4,4,1,4
694 | 714039,3,1,1,1,2,1,1,1,1,2
695 | 763235,3,1,1,1,2,1,2,1,2,2
696 | 776715,3,1,1,1,3,2,1,1,1,2
697 | 841769,2,1,1,1,2,1,1,1,1,2
698 | 888820,5,10,10,3,7,3,8,10,2,4
699 | 897471,4,8,6,4,3,4,10,6,1,4
700 | 897471,4,8,8,5,4,5,10,4,1,4
701 |
--------------------------------------------------------------------------------
/EnsembleLearning/datasets/pima-indians-diabetes.data.csv:
--------------------------------------------------------------------------------
1 | 6,148,72,35,0,33.6,0.627,50,1
2 | 1,85,66,29,0,26.6,0.351,31,0
3 | 8,183,64,0,0,23.3,0.672,32,1
4 | 1,89,66,23,94,28.1,0.167,21,0
5 | 0,137,40,35,168,43.1,2.288,33,1
6 | 5,116,74,0,0,25.6,0.201,30,0
7 | 3,78,50,32,88,31.0,0.248,26,1
8 | 10,115,0,0,0,35.3,0.134,29,0
9 | 2,197,70,45,543,30.5,0.158,53,1
10 | 8,125,96,0,0,0.0,0.232,54,1
11 | 4,110,92,0,0,37.6,0.191,30,0
12 | 10,168,74,0,0,38.0,0.537,34,1
13 | 10,139,80,0,0,27.1,1.441,57,0
14 | 1,189,60,23,846,30.1,0.398,59,1
15 | 5,166,72,19,175,25.8,0.587,51,1
16 | 7,100,0,0,0,30.0,0.484,32,1
17 | 0,118,84,47,230,45.8,0.551,31,1
18 | 7,107,74,0,0,29.6,0.254,31,1
19 | 1,103,30,38,83,43.3,0.183,33,0
20 | 1,115,70,30,96,34.6,0.529,32,1
21 | 3,126,88,41,235,39.3,0.704,27,0
22 | 8,99,84,0,0,35.4,0.388,50,0
23 | 7,196,90,0,0,39.8,0.451,41,1
24 | 9,119,80,35,0,29.0,0.263,29,1
25 | 11,143,94,33,146,36.6,0.254,51,1
26 | 10,125,70,26,115,31.1,0.205,41,1
27 | 7,147,76,0,0,39.4,0.257,43,1
28 | 1,97,66,15,140,23.2,0.487,22,0
29 | 13,145,82,19,110,22.2,0.245,57,0
30 | 5,117,92,0,0,34.1,0.337,38,0
31 | 5,109,75,26,0,36.0,0.546,60,0
32 | 3,158,76,36,245,31.6,0.851,28,1
33 | 3,88,58,11,54,24.8,0.267,22,0
34 | 6,92,92,0,0,19.9,0.188,28,0
35 | 10,122,78,31,0,27.6,0.512,45,0
36 | 4,103,60,33,192,24.0,0.966,33,0
37 | 11,138,76,0,0,33.2,0.420,35,0
38 | 9,102,76,37,0,32.9,0.665,46,1
39 | 2,90,68,42,0,38.2,0.503,27,1
40 | 4,111,72,47,207,37.1,1.390,56,1
41 | 3,180,64,25,70,34.0,0.271,26,0
42 | 7,133,84,0,0,40.2,0.696,37,0
43 | 7,106,92,18,0,22.7,0.235,48,0
44 | 9,171,110,24,240,45.4,0.721,54,1
45 | 7,159,64,0,0,27.4,0.294,40,0
46 | 0,180,66,39,0,42.0,1.893,25,1
47 | 1,146,56,0,0,29.7,0.564,29,0
48 | 2,71,70,27,0,28.0,0.586,22,0
49 | 7,103,66,32,0,39.1,0.344,31,1
50 | 7,105,0,0,0,0.0,0.305,24,0
51 | 1,103,80,11,82,19.4,0.491,22,0
52 | 1,101,50,15,36,24.2,0.526,26,0
53 | 5,88,66,21,23,24.4,0.342,30,0
54 | 8,176,90,34,300,33.7,0.467,58,1
55 | 7,150,66,42,342,34.7,0.718,42,0
56 | 1,73,50,10,0,23.0,0.248,21,0
57 | 7,187,68,39,304,37.7,0.254,41,1
58 | 0,100,88,60,110,46.8,0.962,31,0
59 | 0,146,82,0,0,40.5,1.781,44,0
60 | 0,105,64,41,142,41.5,0.173,22,0
61 | 2,84,0,0,0,0.0,0.304,21,0
62 | 8,133,72,0,0,32.9,0.270,39,1
63 | 5,44,62,0,0,25.0,0.587,36,0
64 | 2,141,58,34,128,25.4,0.699,24,0
65 | 7,114,66,0,0,32.8,0.258,42,1
66 | 5,99,74,27,0,29.0,0.203,32,0
67 | 0,109,88,30,0,32.5,0.855,38,1
68 | 2,109,92,0,0,42.7,0.845,54,0
69 | 1,95,66,13,38,19.6,0.334,25,0
70 | 4,146,85,27,100,28.9,0.189,27,0
71 | 2,100,66,20,90,32.9,0.867,28,1
72 | 5,139,64,35,140,28.6,0.411,26,0
73 | 13,126,90,0,0,43.4,0.583,42,1
74 | 4,129,86,20,270,35.1,0.231,23,0
75 | 1,79,75,30,0,32.0,0.396,22,0
76 | 1,0,48,20,0,24.7,0.140,22,0
77 | 7,62,78,0,0,32.6,0.391,41,0
78 | 5,95,72,33,0,37.7,0.370,27,0
79 | 0,131,0,0,0,43.2,0.270,26,1
80 | 2,112,66,22,0,25.0,0.307,24,0
81 | 3,113,44,13,0,22.4,0.140,22,0
82 | 2,74,0,0,0,0.0,0.102,22,0
83 | 7,83,78,26,71,29.3,0.767,36,0
84 | 0,101,65,28,0,24.6,0.237,22,0
85 | 5,137,108,0,0,48.8,0.227,37,1
86 | 2,110,74,29,125,32.4,0.698,27,0
87 | 13,106,72,54,0,36.6,0.178,45,0
88 | 2,100,68,25,71,38.5,0.324,26,0
89 | 15,136,70,32,110,37.1,0.153,43,1
90 | 1,107,68,19,0,26.5,0.165,24,0
91 | 1,80,55,0,0,19.1,0.258,21,0
92 | 4,123,80,15,176,32.0,0.443,34,0
93 | 7,81,78,40,48,46.7,0.261,42,0
94 | 4,134,72,0,0,23.8,0.277,60,1
95 | 2,142,82,18,64,24.7,0.761,21,0
96 | 6,144,72,27,228,33.9,0.255,40,0
97 | 2,92,62,28,0,31.6,0.130,24,0
98 | 1,71,48,18,76,20.4,0.323,22,0
99 | 6,93,50,30,64,28.7,0.356,23,0
100 | 1,122,90,51,220,49.7,0.325,31,1
101 | 1,163,72,0,0,39.0,1.222,33,1
102 | 1,151,60,0,0,26.1,0.179,22,0
103 | 0,125,96,0,0,22.5,0.262,21,0
104 | 1,81,72,18,40,26.6,0.283,24,0
105 | 2,85,65,0,0,39.6,0.930,27,0
106 | 1,126,56,29,152,28.7,0.801,21,0
107 | 1,96,122,0,0,22.4,0.207,27,0
108 | 4,144,58,28,140,29.5,0.287,37,0
109 | 3,83,58,31,18,34.3,0.336,25,0
110 | 0,95,85,25,36,37.4,0.247,24,1
111 | 3,171,72,33,135,33.3,0.199,24,1
112 | 8,155,62,26,495,34.0,0.543,46,1
113 | 1,89,76,34,37,31.2,0.192,23,0
114 | 4,76,62,0,0,34.0,0.391,25,0
115 | 7,160,54,32,175,30.5,0.588,39,1
116 | 4,146,92,0,0,31.2,0.539,61,1
117 | 5,124,74,0,0,34.0,0.220,38,1
118 | 5,78,48,0,0,33.7,0.654,25,0
119 | 4,97,60,23,0,28.2,0.443,22,0
120 | 4,99,76,15,51,23.2,0.223,21,0
121 | 0,162,76,56,100,53.2,0.759,25,1
122 | 6,111,64,39,0,34.2,0.260,24,0
123 | 2,107,74,30,100,33.6,0.404,23,0
124 | 5,132,80,0,0,26.8,0.186,69,0
125 | 0,113,76,0,0,33.3,0.278,23,1
126 | 1,88,30,42,99,55.0,0.496,26,1
127 | 3,120,70,30,135,42.9,0.452,30,0
128 | 1,118,58,36,94,33.3,0.261,23,0
129 | 1,117,88,24,145,34.5,0.403,40,1
130 | 0,105,84,0,0,27.9,0.741,62,1
131 | 4,173,70,14,168,29.7,0.361,33,1
132 | 9,122,56,0,0,33.3,1.114,33,1
133 | 3,170,64,37,225,34.5,0.356,30,1
134 | 8,84,74,31,0,38.3,0.457,39,0
135 | 2,96,68,13,49,21.1,0.647,26,0
136 | 2,125,60,20,140,33.8,0.088,31,0
137 | 0,100,70,26,50,30.8,0.597,21,0
138 | 0,93,60,25,92,28.7,0.532,22,0
139 | 0,129,80,0,0,31.2,0.703,29,0
140 | 5,105,72,29,325,36.9,0.159,28,0
141 | 3,128,78,0,0,21.1,0.268,55,0
142 | 5,106,82,30,0,39.5,0.286,38,0
143 | 2,108,52,26,63,32.5,0.318,22,0
144 | 10,108,66,0,0,32.4,0.272,42,1
145 | 4,154,62,31,284,32.8,0.237,23,0
146 | 0,102,75,23,0,0.0,0.572,21,0
147 | 9,57,80,37,0,32.8,0.096,41,0
148 | 2,106,64,35,119,30.5,1.400,34,0
149 | 5,147,78,0,0,33.7,0.218,65,0
150 | 2,90,70,17,0,27.3,0.085,22,0
151 | 1,136,74,50,204,37.4,0.399,24,0
152 | 4,114,65,0,0,21.9,0.432,37,0
153 | 9,156,86,28,155,34.3,1.189,42,1
154 | 1,153,82,42,485,40.6,0.687,23,0
155 | 8,188,78,0,0,47.9,0.137,43,1
156 | 7,152,88,44,0,50.0,0.337,36,1
157 | 2,99,52,15,94,24.6,0.637,21,0
158 | 1,109,56,21,135,25.2,0.833,23,0
159 | 2,88,74,19,53,29.0,0.229,22,0
160 | 17,163,72,41,114,40.9,0.817,47,1
161 | 4,151,90,38,0,29.7,0.294,36,0
162 | 7,102,74,40,105,37.2,0.204,45,0
163 | 0,114,80,34,285,44.2,0.167,27,0
164 | 2,100,64,23,0,29.7,0.368,21,0
165 | 0,131,88,0,0,31.6,0.743,32,1
166 | 6,104,74,18,156,29.9,0.722,41,1
167 | 3,148,66,25,0,32.5,0.256,22,0
168 | 4,120,68,0,0,29.6,0.709,34,0
169 | 4,110,66,0,0,31.9,0.471,29,0
170 | 3,111,90,12,78,28.4,0.495,29,0
171 | 6,102,82,0,0,30.8,0.180,36,1
172 | 6,134,70,23,130,35.4,0.542,29,1
173 | 2,87,0,23,0,28.9,0.773,25,0
174 | 1,79,60,42,48,43.5,0.678,23,0
175 | 2,75,64,24,55,29.7,0.370,33,0
176 | 8,179,72,42,130,32.7,0.719,36,1
177 | 6,85,78,0,0,31.2,0.382,42,0
178 | 0,129,110,46,130,67.1,0.319,26,1
179 | 5,143,78,0,0,45.0,0.190,47,0
180 | 5,130,82,0,0,39.1,0.956,37,1
181 | 6,87,80,0,0,23.2,0.084,32,0
182 | 0,119,64,18,92,34.9,0.725,23,0
183 | 1,0,74,20,23,27.7,0.299,21,0
184 | 5,73,60,0,0,26.8,0.268,27,0
185 | 4,141,74,0,0,27.6,0.244,40,0
186 | 7,194,68,28,0,35.9,0.745,41,1
187 | 8,181,68,36,495,30.1,0.615,60,1
188 | 1,128,98,41,58,32.0,1.321,33,1
189 | 8,109,76,39,114,27.9,0.640,31,1
190 | 5,139,80,35,160,31.6,0.361,25,1
191 | 3,111,62,0,0,22.6,0.142,21,0
192 | 9,123,70,44,94,33.1,0.374,40,0
193 | 7,159,66,0,0,30.4,0.383,36,1
194 | 11,135,0,0,0,52.3,0.578,40,1
195 | 8,85,55,20,0,24.4,0.136,42,0
196 | 5,158,84,41,210,39.4,0.395,29,1
197 | 1,105,58,0,0,24.3,0.187,21,0
198 | 3,107,62,13,48,22.9,0.678,23,1
199 | 4,109,64,44,99,34.8,0.905,26,1
200 | 4,148,60,27,318,30.9,0.150,29,1
201 | 0,113,80,16,0,31.0,0.874,21,0
202 | 1,138,82,0,0,40.1,0.236,28,0
203 | 0,108,68,20,0,27.3,0.787,32,0
204 | 2,99,70,16,44,20.4,0.235,27,0
205 | 6,103,72,32,190,37.7,0.324,55,0
206 | 5,111,72,28,0,23.9,0.407,27,0
207 | 8,196,76,29,280,37.5,0.605,57,1
208 | 5,162,104,0,0,37.7,0.151,52,1
209 | 1,96,64,27,87,33.2,0.289,21,0
210 | 7,184,84,33,0,35.5,0.355,41,1
211 | 2,81,60,22,0,27.7,0.290,25,0
212 | 0,147,85,54,0,42.8,0.375,24,0
213 | 7,179,95,31,0,34.2,0.164,60,0
214 | 0,140,65,26,130,42.6,0.431,24,1
215 | 9,112,82,32,175,34.2,0.260,36,1
216 | 12,151,70,40,271,41.8,0.742,38,1
217 | 5,109,62,41,129,35.8,0.514,25,1
218 | 6,125,68,30,120,30.0,0.464,32,0
219 | 5,85,74,22,0,29.0,1.224,32,1
220 | 5,112,66,0,0,37.8,0.261,41,1
221 | 0,177,60,29,478,34.6,1.072,21,1
222 | 2,158,90,0,0,31.6,0.805,66,1
223 | 7,119,0,0,0,25.2,0.209,37,0
224 | 7,142,60,33,190,28.8,0.687,61,0
225 | 1,100,66,15,56,23.6,0.666,26,0
226 | 1,87,78,27,32,34.6,0.101,22,0
227 | 0,101,76,0,0,35.7,0.198,26,0
228 | 3,162,52,38,0,37.2,0.652,24,1
229 | 4,197,70,39,744,36.7,2.329,31,0
230 | 0,117,80,31,53,45.2,0.089,24,0
231 | 4,142,86,0,0,44.0,0.645,22,1
232 | 6,134,80,37,370,46.2,0.238,46,1
233 | 1,79,80,25,37,25.4,0.583,22,0
234 | 4,122,68,0,0,35.0,0.394,29,0
235 | 3,74,68,28,45,29.7,0.293,23,0
236 | 4,171,72,0,0,43.6,0.479,26,1
237 | 7,181,84,21,192,35.9,0.586,51,1
238 | 0,179,90,27,0,44.1,0.686,23,1
239 | 9,164,84,21,0,30.8,0.831,32,1
240 | 0,104,76,0,0,18.4,0.582,27,0
241 | 1,91,64,24,0,29.2,0.192,21,0
242 | 4,91,70,32,88,33.1,0.446,22,0
243 | 3,139,54,0,0,25.6,0.402,22,1
244 | 6,119,50,22,176,27.1,1.318,33,1
245 | 2,146,76,35,194,38.2,0.329,29,0
246 | 9,184,85,15,0,30.0,1.213,49,1
247 | 10,122,68,0,0,31.2,0.258,41,0
248 | 0,165,90,33,680,52.3,0.427,23,0
249 | 9,124,70,33,402,35.4,0.282,34,0
250 | 1,111,86,19,0,30.1,0.143,23,0
251 | 9,106,52,0,0,31.2,0.380,42,0
252 | 2,129,84,0,0,28.0,0.284,27,0
253 | 2,90,80,14,55,24.4,0.249,24,0
254 | 0,86,68,32,0,35.8,0.238,25,0
255 | 12,92,62,7,258,27.6,0.926,44,1
256 | 1,113,64,35,0,33.6,0.543,21,1
257 | 3,111,56,39,0,30.1,0.557,30,0
258 | 2,114,68,22,0,28.7,0.092,25,0
259 | 1,193,50,16,375,25.9,0.655,24,0
260 | 11,155,76,28,150,33.3,1.353,51,1
261 | 3,191,68,15,130,30.9,0.299,34,0
262 | 3,141,0,0,0,30.0,0.761,27,1
263 | 4,95,70,32,0,32.1,0.612,24,0
264 | 3,142,80,15,0,32.4,0.200,63,0
265 | 4,123,62,0,0,32.0,0.226,35,1
266 | 5,96,74,18,67,33.6,0.997,43,0
267 | 0,138,0,0,0,36.3,0.933,25,1
268 | 2,128,64,42,0,40.0,1.101,24,0
269 | 0,102,52,0,0,25.1,0.078,21,0
270 | 2,146,0,0,0,27.5,0.240,28,1
271 | 10,101,86,37,0,45.6,1.136,38,1
272 | 2,108,62,32,56,25.2,0.128,21,0
273 | 3,122,78,0,0,23.0,0.254,40,0
274 | 1,71,78,50,45,33.2,0.422,21,0
275 | 13,106,70,0,0,34.2,0.251,52,0
276 | 2,100,70,52,57,40.5,0.677,25,0
277 | 7,106,60,24,0,26.5,0.296,29,1
278 | 0,104,64,23,116,27.8,0.454,23,0
279 | 5,114,74,0,0,24.9,0.744,57,0
280 | 2,108,62,10,278,25.3,0.881,22,0
281 | 0,146,70,0,0,37.9,0.334,28,1
282 | 10,129,76,28,122,35.9,0.280,39,0
283 | 7,133,88,15,155,32.4,0.262,37,0
284 | 7,161,86,0,0,30.4,0.165,47,1
285 | 2,108,80,0,0,27.0,0.259,52,1
286 | 7,136,74,26,135,26.0,0.647,51,0
287 | 5,155,84,44,545,38.7,0.619,34,0
288 | 1,119,86,39,220,45.6,0.808,29,1
289 | 4,96,56,17,49,20.8,0.340,26,0
290 | 5,108,72,43,75,36.1,0.263,33,0
291 | 0,78,88,29,40,36.9,0.434,21,0
292 | 0,107,62,30,74,36.6,0.757,25,1
293 | 2,128,78,37,182,43.3,1.224,31,1
294 | 1,128,48,45,194,40.5,0.613,24,1
295 | 0,161,50,0,0,21.9,0.254,65,0
296 | 6,151,62,31,120,35.5,0.692,28,0
297 | 2,146,70,38,360,28.0,0.337,29,1
298 | 0,126,84,29,215,30.7,0.520,24,0
299 | 14,100,78,25,184,36.6,0.412,46,1
300 | 8,112,72,0,0,23.6,0.840,58,0
301 | 0,167,0,0,0,32.3,0.839,30,1
302 | 2,144,58,33,135,31.6,0.422,25,1
303 | 5,77,82,41,42,35.8,0.156,35,0
304 | 5,115,98,0,0,52.9,0.209,28,1
305 | 3,150,76,0,0,21.0,0.207,37,0
306 | 2,120,76,37,105,39.7,0.215,29,0
307 | 10,161,68,23,132,25.5,0.326,47,1
308 | 0,137,68,14,148,24.8,0.143,21,0
309 | 0,128,68,19,180,30.5,1.391,25,1
310 | 2,124,68,28,205,32.9,0.875,30,1
311 | 6,80,66,30,0,26.2,0.313,41,0
312 | 0,106,70,37,148,39.4,0.605,22,0
313 | 2,155,74,17,96,26.6,0.433,27,1
314 | 3,113,50,10,85,29.5,0.626,25,0
315 | 7,109,80,31,0,35.9,1.127,43,1
316 | 2,112,68,22,94,34.1,0.315,26,0
317 | 3,99,80,11,64,19.3,0.284,30,0
318 | 3,182,74,0,0,30.5,0.345,29,1
319 | 3,115,66,39,140,38.1,0.150,28,0
320 | 6,194,78,0,0,23.5,0.129,59,1
321 | 4,129,60,12,231,27.5,0.527,31,0
322 | 3,112,74,30,0,31.6,0.197,25,1
323 | 0,124,70,20,0,27.4,0.254,36,1
324 | 13,152,90,33,29,26.8,0.731,43,1
325 | 2,112,75,32,0,35.7,0.148,21,0
326 | 1,157,72,21,168,25.6,0.123,24,0
327 | 1,122,64,32,156,35.1,0.692,30,1
328 | 10,179,70,0,0,35.1,0.200,37,0
329 | 2,102,86,36,120,45.5,0.127,23,1
330 | 6,105,70,32,68,30.8,0.122,37,0
331 | 8,118,72,19,0,23.1,1.476,46,0
332 | 2,87,58,16,52,32.7,0.166,25,0
333 | 1,180,0,0,0,43.3,0.282,41,1
334 | 12,106,80,0,0,23.6,0.137,44,0
335 | 1,95,60,18,58,23.9,0.260,22,0
336 | 0,165,76,43,255,47.9,0.259,26,0
337 | 0,117,0,0,0,33.8,0.932,44,0
338 | 5,115,76,0,0,31.2,0.343,44,1
339 | 9,152,78,34,171,34.2,0.893,33,1
340 | 7,178,84,0,0,39.9,0.331,41,1
341 | 1,130,70,13,105,25.9,0.472,22,0
342 | 1,95,74,21,73,25.9,0.673,36,0
343 | 1,0,68,35,0,32.0,0.389,22,0
344 | 5,122,86,0,0,34.7,0.290,33,0
345 | 8,95,72,0,0,36.8,0.485,57,0
346 | 8,126,88,36,108,38.5,0.349,49,0
347 | 1,139,46,19,83,28.7,0.654,22,0
348 | 3,116,0,0,0,23.5,0.187,23,0
349 | 3,99,62,19,74,21.8,0.279,26,0
350 | 5,0,80,32,0,41.0,0.346,37,1
351 | 4,92,80,0,0,42.2,0.237,29,0
352 | 4,137,84,0,0,31.2,0.252,30,0
353 | 3,61,82,28,0,34.4,0.243,46,0
354 | 1,90,62,12,43,27.2,0.580,24,0
355 | 3,90,78,0,0,42.7,0.559,21,0
356 | 9,165,88,0,0,30.4,0.302,49,1
357 | 1,125,50,40,167,33.3,0.962,28,1
358 | 13,129,0,30,0,39.9,0.569,44,1
359 | 12,88,74,40,54,35.3,0.378,48,0
360 | 1,196,76,36,249,36.5,0.875,29,1
361 | 5,189,64,33,325,31.2,0.583,29,1
362 | 5,158,70,0,0,29.8,0.207,63,0
363 | 5,103,108,37,0,39.2,0.305,65,0
364 | 4,146,78,0,0,38.5,0.520,67,1
365 | 4,147,74,25,293,34.9,0.385,30,0
366 | 5,99,54,28,83,34.0,0.499,30,0
367 | 6,124,72,0,0,27.6,0.368,29,1
368 | 0,101,64,17,0,21.0,0.252,21,0
369 | 3,81,86,16,66,27.5,0.306,22,0
370 | 1,133,102,28,140,32.8,0.234,45,1
371 | 3,173,82,48,465,38.4,2.137,25,1
372 | 0,118,64,23,89,0.0,1.731,21,0
373 | 0,84,64,22,66,35.8,0.545,21,0
374 | 2,105,58,40,94,34.9,0.225,25,0
375 | 2,122,52,43,158,36.2,0.816,28,0
376 | 12,140,82,43,325,39.2,0.528,58,1
377 | 0,98,82,15,84,25.2,0.299,22,0
378 | 1,87,60,37,75,37.2,0.509,22,0
379 | 4,156,75,0,0,48.3,0.238,32,1
380 | 0,93,100,39,72,43.4,1.021,35,0
381 | 1,107,72,30,82,30.8,0.821,24,0
382 | 0,105,68,22,0,20.0,0.236,22,0
383 | 1,109,60,8,182,25.4,0.947,21,0
384 | 1,90,62,18,59,25.1,1.268,25,0
385 | 1,125,70,24,110,24.3,0.221,25,0
386 | 1,119,54,13,50,22.3,0.205,24,0
387 | 5,116,74,29,0,32.3,0.660,35,1
388 | 8,105,100,36,0,43.3,0.239,45,1
389 | 5,144,82,26,285,32.0,0.452,58,1
390 | 3,100,68,23,81,31.6,0.949,28,0
391 | 1,100,66,29,196,32.0,0.444,42,0
392 | 5,166,76,0,0,45.7,0.340,27,1
393 | 1,131,64,14,415,23.7,0.389,21,0
394 | 4,116,72,12,87,22.1,0.463,37,0
395 | 4,158,78,0,0,32.9,0.803,31,1
396 | 2,127,58,24,275,27.7,1.600,25,0
397 | 3,96,56,34,115,24.7,0.944,39,0
398 | 0,131,66,40,0,34.3,0.196,22,1
399 | 3,82,70,0,0,21.1,0.389,25,0
400 | 3,193,70,31,0,34.9,0.241,25,1
401 | 4,95,64,0,0,32.0,0.161,31,1
402 | 6,137,61,0,0,24.2,0.151,55,0
403 | 5,136,84,41,88,35.0,0.286,35,1
404 | 9,72,78,25,0,31.6,0.280,38,0
405 | 5,168,64,0,0,32.9,0.135,41,1
406 | 2,123,48,32,165,42.1,0.520,26,0
407 | 4,115,72,0,0,28.9,0.376,46,1
408 | 0,101,62,0,0,21.9,0.336,25,0
409 | 8,197,74,0,0,25.9,1.191,39,1
410 | 1,172,68,49,579,42.4,0.702,28,1
411 | 6,102,90,39,0,35.7,0.674,28,0
412 | 1,112,72,30,176,34.4,0.528,25,0
413 | 1,143,84,23,310,42.4,1.076,22,0
414 | 1,143,74,22,61,26.2,0.256,21,0
415 | 0,138,60,35,167,34.6,0.534,21,1
416 | 3,173,84,33,474,35.7,0.258,22,1
417 | 1,97,68,21,0,27.2,1.095,22,0
418 | 4,144,82,32,0,38.5,0.554,37,1
419 | 1,83,68,0,0,18.2,0.624,27,0
420 | 3,129,64,29,115,26.4,0.219,28,1
421 | 1,119,88,41,170,45.3,0.507,26,0
422 | 2,94,68,18,76,26.0,0.561,21,0
423 | 0,102,64,46,78,40.6,0.496,21,0
424 | 2,115,64,22,0,30.8,0.421,21,0
425 | 8,151,78,32,210,42.9,0.516,36,1
426 | 4,184,78,39,277,37.0,0.264,31,1
427 | 0,94,0,0,0,0.0,0.256,25,0
428 | 1,181,64,30,180,34.1,0.328,38,1
429 | 0,135,94,46,145,40.6,0.284,26,0
430 | 1,95,82,25,180,35.0,0.233,43,1
431 | 2,99,0,0,0,22.2,0.108,23,0
432 | 3,89,74,16,85,30.4,0.551,38,0
433 | 1,80,74,11,60,30.0,0.527,22,0
434 | 2,139,75,0,0,25.6,0.167,29,0
435 | 1,90,68,8,0,24.5,1.138,36,0
436 | 0,141,0,0,0,42.4,0.205,29,1
437 | 12,140,85,33,0,37.4,0.244,41,0
438 | 5,147,75,0,0,29.9,0.434,28,0
439 | 1,97,70,15,0,18.2,0.147,21,0
440 | 6,107,88,0,0,36.8,0.727,31,0
441 | 0,189,104,25,0,34.3,0.435,41,1
442 | 2,83,66,23,50,32.2,0.497,22,0
443 | 4,117,64,27,120,33.2,0.230,24,0
444 | 8,108,70,0,0,30.5,0.955,33,1
445 | 4,117,62,12,0,29.7,0.380,30,1
446 | 0,180,78,63,14,59.4,2.420,25,1
447 | 1,100,72,12,70,25.3,0.658,28,0
448 | 0,95,80,45,92,36.5,0.330,26,0
449 | 0,104,64,37,64,33.6,0.510,22,1
450 | 0,120,74,18,63,30.5,0.285,26,0
451 | 1,82,64,13,95,21.2,0.415,23,0
452 | 2,134,70,0,0,28.9,0.542,23,1
453 | 0,91,68,32,210,39.9,0.381,25,0
454 | 2,119,0,0,0,19.6,0.832,72,0
455 | 2,100,54,28,105,37.8,0.498,24,0
456 | 14,175,62,30,0,33.6,0.212,38,1
457 | 1,135,54,0,0,26.7,0.687,62,0
458 | 5,86,68,28,71,30.2,0.364,24,0
459 | 10,148,84,48,237,37.6,1.001,51,1
460 | 9,134,74,33,60,25.9,0.460,81,0
461 | 9,120,72,22,56,20.8,0.733,48,0
462 | 1,71,62,0,0,21.8,0.416,26,0
463 | 8,74,70,40,49,35.3,0.705,39,0
464 | 5,88,78,30,0,27.6,0.258,37,0
465 | 10,115,98,0,0,24.0,1.022,34,0
466 | 0,124,56,13,105,21.8,0.452,21,0
467 | 0,74,52,10,36,27.8,0.269,22,0
468 | 0,97,64,36,100,36.8,0.600,25,0
469 | 8,120,0,0,0,30.0,0.183,38,1
470 | 6,154,78,41,140,46.1,0.571,27,0
471 | 1,144,82,40,0,41.3,0.607,28,0
472 | 0,137,70,38,0,33.2,0.170,22,0
473 | 0,119,66,27,0,38.8,0.259,22,0
474 | 7,136,90,0,0,29.9,0.210,50,0
475 | 4,114,64,0,0,28.9,0.126,24,0
476 | 0,137,84,27,0,27.3,0.231,59,0
477 | 2,105,80,45,191,33.7,0.711,29,1
478 | 7,114,76,17,110,23.8,0.466,31,0
479 | 8,126,74,38,75,25.9,0.162,39,0
480 | 4,132,86,31,0,28.0,0.419,63,0
481 | 3,158,70,30,328,35.5,0.344,35,1
482 | 0,123,88,37,0,35.2,0.197,29,0
483 | 4,85,58,22,49,27.8,0.306,28,0
484 | 0,84,82,31,125,38.2,0.233,23,0
485 | 0,145,0,0,0,44.2,0.630,31,1
486 | 0,135,68,42,250,42.3,0.365,24,1
487 | 1,139,62,41,480,40.7,0.536,21,0
488 | 0,173,78,32,265,46.5,1.159,58,0
489 | 4,99,72,17,0,25.6,0.294,28,0
490 | 8,194,80,0,0,26.1,0.551,67,0
491 | 2,83,65,28,66,36.8,0.629,24,0
492 | 2,89,90,30,0,33.5,0.292,42,0
493 | 4,99,68,38,0,32.8,0.145,33,0
494 | 4,125,70,18,122,28.9,1.144,45,1
495 | 3,80,0,0,0,0.0,0.174,22,0
496 | 6,166,74,0,0,26.6,0.304,66,0
497 | 5,110,68,0,0,26.0,0.292,30,0
498 | 2,81,72,15,76,30.1,0.547,25,0
499 | 7,195,70,33,145,25.1,0.163,55,1
500 | 6,154,74,32,193,29.3,0.839,39,0
501 | 2,117,90,19,71,25.2,0.313,21,0
502 | 3,84,72,32,0,37.2,0.267,28,0
503 | 6,0,68,41,0,39.0,0.727,41,1
504 | 7,94,64,25,79,33.3,0.738,41,0
505 | 3,96,78,39,0,37.3,0.238,40,0
506 | 10,75,82,0,0,33.3,0.263,38,0
507 | 0,180,90,26,90,36.5,0.314,35,1
508 | 1,130,60,23,170,28.6,0.692,21,0
509 | 2,84,50,23,76,30.4,0.968,21,0
510 | 8,120,78,0,0,25.0,0.409,64,0
511 | 12,84,72,31,0,29.7,0.297,46,1
512 | 0,139,62,17,210,22.1,0.207,21,0
513 | 9,91,68,0,0,24.2,0.200,58,0
514 | 2,91,62,0,0,27.3,0.525,22,0
515 | 3,99,54,19,86,25.6,0.154,24,0
516 | 3,163,70,18,105,31.6,0.268,28,1
517 | 9,145,88,34,165,30.3,0.771,53,1
518 | 7,125,86,0,0,37.6,0.304,51,0
519 | 13,76,60,0,0,32.8,0.180,41,0
520 | 6,129,90,7,326,19.6,0.582,60,0
521 | 2,68,70,32,66,25.0,0.187,25,0
522 | 3,124,80,33,130,33.2,0.305,26,0
523 | 6,114,0,0,0,0.0,0.189,26,0
524 | 9,130,70,0,0,34.2,0.652,45,1
525 | 3,125,58,0,0,31.6,0.151,24,0
526 | 3,87,60,18,0,21.8,0.444,21,0
527 | 1,97,64,19,82,18.2,0.299,21,0
528 | 3,116,74,15,105,26.3,0.107,24,0
529 | 0,117,66,31,188,30.8,0.493,22,0
530 | 0,111,65,0,0,24.6,0.660,31,0
531 | 2,122,60,18,106,29.8,0.717,22,0
532 | 0,107,76,0,0,45.3,0.686,24,0
533 | 1,86,66,52,65,41.3,0.917,29,0
534 | 6,91,0,0,0,29.8,0.501,31,0
535 | 1,77,56,30,56,33.3,1.251,24,0
536 | 4,132,0,0,0,32.9,0.302,23,1
537 | 0,105,90,0,0,29.6,0.197,46,0
538 | 0,57,60,0,0,21.7,0.735,67,0
539 | 0,127,80,37,210,36.3,0.804,23,0
540 | 3,129,92,49,155,36.4,0.968,32,1
541 | 8,100,74,40,215,39.4,0.661,43,1
542 | 3,128,72,25,190,32.4,0.549,27,1
543 | 10,90,85,32,0,34.9,0.825,56,1
544 | 4,84,90,23,56,39.5,0.159,25,0
545 | 1,88,78,29,76,32.0,0.365,29,0
546 | 8,186,90,35,225,34.5,0.423,37,1
547 | 5,187,76,27,207,43.6,1.034,53,1
548 | 4,131,68,21,166,33.1,0.160,28,0
549 | 1,164,82,43,67,32.8,0.341,50,0
550 | 4,189,110,31,0,28.5,0.680,37,0
551 | 1,116,70,28,0,27.4,0.204,21,0
552 | 3,84,68,30,106,31.9,0.591,25,0
553 | 6,114,88,0,0,27.8,0.247,66,0
554 | 1,88,62,24,44,29.9,0.422,23,0
555 | 1,84,64,23,115,36.9,0.471,28,0
556 | 7,124,70,33,215,25.5,0.161,37,0
557 | 1,97,70,40,0,38.1,0.218,30,0
558 | 8,110,76,0,0,27.8,0.237,58,0
559 | 11,103,68,40,0,46.2,0.126,42,0
560 | 11,85,74,0,0,30.1,0.300,35,0
561 | 6,125,76,0,0,33.8,0.121,54,1
562 | 0,198,66,32,274,41.3,0.502,28,1
563 | 1,87,68,34,77,37.6,0.401,24,0
564 | 6,99,60,19,54,26.9,0.497,32,0
565 | 0,91,80,0,0,32.4,0.601,27,0
566 | 2,95,54,14,88,26.1,0.748,22,0
567 | 1,99,72,30,18,38.6,0.412,21,0
568 | 6,92,62,32,126,32.0,0.085,46,0
569 | 4,154,72,29,126,31.3,0.338,37,0
570 | 0,121,66,30,165,34.3,0.203,33,1
571 | 3,78,70,0,0,32.5,0.270,39,0
572 | 2,130,96,0,0,22.6,0.268,21,0
573 | 3,111,58,31,44,29.5,0.430,22,0
574 | 2,98,60,17,120,34.7,0.198,22,0
575 | 1,143,86,30,330,30.1,0.892,23,0
576 | 1,119,44,47,63,35.5,0.280,25,0
577 | 6,108,44,20,130,24.0,0.813,35,0
578 | 2,118,80,0,0,42.9,0.693,21,1
579 | 10,133,68,0,0,27.0,0.245,36,0
580 | 2,197,70,99,0,34.7,0.575,62,1
581 | 0,151,90,46,0,42.1,0.371,21,1
582 | 6,109,60,27,0,25.0,0.206,27,0
583 | 12,121,78,17,0,26.5,0.259,62,0
584 | 8,100,76,0,0,38.7,0.190,42,0
585 | 8,124,76,24,600,28.7,0.687,52,1
586 | 1,93,56,11,0,22.5,0.417,22,0
587 | 8,143,66,0,0,34.9,0.129,41,1
588 | 6,103,66,0,0,24.3,0.249,29,0
589 | 3,176,86,27,156,33.3,1.154,52,1
590 | 0,73,0,0,0,21.1,0.342,25,0
591 | 11,111,84,40,0,46.8,0.925,45,1
592 | 2,112,78,50,140,39.4,0.175,24,0
593 | 3,132,80,0,0,34.4,0.402,44,1
594 | 2,82,52,22,115,28.5,1.699,25,0
595 | 6,123,72,45,230,33.6,0.733,34,0
596 | 0,188,82,14,185,32.0,0.682,22,1
597 | 0,67,76,0,0,45.3,0.194,46,0
598 | 1,89,24,19,25,27.8,0.559,21,0
599 | 1,173,74,0,0,36.8,0.088,38,1
600 | 1,109,38,18,120,23.1,0.407,26,0
601 | 1,108,88,19,0,27.1,0.400,24,0
602 | 6,96,0,0,0,23.7,0.190,28,0
603 | 1,124,74,36,0,27.8,0.100,30,0
604 | 7,150,78,29,126,35.2,0.692,54,1
605 | 4,183,0,0,0,28.4,0.212,36,1
606 | 1,124,60,32,0,35.8,0.514,21,0
607 | 1,181,78,42,293,40.0,1.258,22,1
608 | 1,92,62,25,41,19.5,0.482,25,0
609 | 0,152,82,39,272,41.5,0.270,27,0
610 | 1,111,62,13,182,24.0,0.138,23,0
611 | 3,106,54,21,158,30.9,0.292,24,0
612 | 3,174,58,22,194,32.9,0.593,36,1
613 | 7,168,88,42,321,38.2,0.787,40,1
614 | 6,105,80,28,0,32.5,0.878,26,0
615 | 11,138,74,26,144,36.1,0.557,50,1
616 | 3,106,72,0,0,25.8,0.207,27,0
617 | 6,117,96,0,0,28.7,0.157,30,0
618 | 2,68,62,13,15,20.1,0.257,23,0
619 | 9,112,82,24,0,28.2,1.282,50,1
620 | 0,119,0,0,0,32.4,0.141,24,1
621 | 2,112,86,42,160,38.4,0.246,28,0
622 | 2,92,76,20,0,24.2,1.698,28,0
623 | 6,183,94,0,0,40.8,1.461,45,0
624 | 0,94,70,27,115,43.5,0.347,21,0
625 | 2,108,64,0,0,30.8,0.158,21,0
626 | 4,90,88,47,54,37.7,0.362,29,0
627 | 0,125,68,0,0,24.7,0.206,21,0
628 | 0,132,78,0,0,32.4,0.393,21,0
629 | 5,128,80,0,0,34.6,0.144,45,0
630 | 4,94,65,22,0,24.7,0.148,21,0
631 | 7,114,64,0,0,27.4,0.732,34,1
632 | 0,102,78,40,90,34.5,0.238,24,0
633 | 2,111,60,0,0,26.2,0.343,23,0
634 | 1,128,82,17,183,27.5,0.115,22,0
635 | 10,92,62,0,0,25.9,0.167,31,0
636 | 13,104,72,0,0,31.2,0.465,38,1
637 | 5,104,74,0,0,28.8,0.153,48,0
638 | 2,94,76,18,66,31.6,0.649,23,0
639 | 7,97,76,32,91,40.9,0.871,32,1
640 | 1,100,74,12,46,19.5,0.149,28,0
641 | 0,102,86,17,105,29.3,0.695,27,0
642 | 4,128,70,0,0,34.3,0.303,24,0
643 | 6,147,80,0,0,29.5,0.178,50,1
644 | 4,90,0,0,0,28.0,0.610,31,0
645 | 3,103,72,30,152,27.6,0.730,27,0
646 | 2,157,74,35,440,39.4,0.134,30,0
647 | 1,167,74,17,144,23.4,0.447,33,1
648 | 0,179,50,36,159,37.8,0.455,22,1
649 | 11,136,84,35,130,28.3,0.260,42,1
650 | 0,107,60,25,0,26.4,0.133,23,0
651 | 1,91,54,25,100,25.2,0.234,23,0
652 | 1,117,60,23,106,33.8,0.466,27,0
653 | 5,123,74,40,77,34.1,0.269,28,0
654 | 2,120,54,0,0,26.8,0.455,27,0
655 | 1,106,70,28,135,34.2,0.142,22,0
656 | 2,155,52,27,540,38.7,0.240,25,1
657 | 2,101,58,35,90,21.8,0.155,22,0
658 | 1,120,80,48,200,38.9,1.162,41,0
659 | 11,127,106,0,0,39.0,0.190,51,0
660 | 3,80,82,31,70,34.2,1.292,27,1
661 | 10,162,84,0,0,27.7,0.182,54,0
662 | 1,199,76,43,0,42.9,1.394,22,1
663 | 8,167,106,46,231,37.6,0.165,43,1
664 | 9,145,80,46,130,37.9,0.637,40,1
665 | 6,115,60,39,0,33.7,0.245,40,1
666 | 1,112,80,45,132,34.8,0.217,24,0
667 | 4,145,82,18,0,32.5,0.235,70,1
668 | 10,111,70,27,0,27.5,0.141,40,1
669 | 6,98,58,33,190,34.0,0.430,43,0
670 | 9,154,78,30,100,30.9,0.164,45,0
671 | 6,165,68,26,168,33.6,0.631,49,0
672 | 1,99,58,10,0,25.4,0.551,21,0
673 | 10,68,106,23,49,35.5,0.285,47,0
674 | 3,123,100,35,240,57.3,0.880,22,0
675 | 8,91,82,0,0,35.6,0.587,68,0
676 | 6,195,70,0,0,30.9,0.328,31,1
677 | 9,156,86,0,0,24.8,0.230,53,1
678 | 0,93,60,0,0,35.3,0.263,25,0
679 | 3,121,52,0,0,36.0,0.127,25,1
680 | 2,101,58,17,265,24.2,0.614,23,0
681 | 2,56,56,28,45,24.2,0.332,22,0
682 | 0,162,76,36,0,49.6,0.364,26,1
683 | 0,95,64,39,105,44.6,0.366,22,0
684 | 4,125,80,0,0,32.3,0.536,27,1
685 | 5,136,82,0,0,0.0,0.640,69,0
686 | 2,129,74,26,205,33.2,0.591,25,0
687 | 3,130,64,0,0,23.1,0.314,22,0
688 | 1,107,50,19,0,28.3,0.181,29,0
689 | 1,140,74,26,180,24.1,0.828,23,0
690 | 1,144,82,46,180,46.1,0.335,46,1
691 | 8,107,80,0,0,24.6,0.856,34,0
692 | 13,158,114,0,0,42.3,0.257,44,1
693 | 2,121,70,32,95,39.1,0.886,23,0
694 | 7,129,68,49,125,38.5,0.439,43,1
695 | 2,90,60,0,0,23.5,0.191,25,0
696 | 7,142,90,24,480,30.4,0.128,43,1
697 | 3,169,74,19,125,29.9,0.268,31,1
698 | 0,99,0,0,0,25.0,0.253,22,0
699 | 4,127,88,11,155,34.5,0.598,28,0
700 | 4,118,70,0,0,44.5,0.904,26,0
701 | 2,122,76,27,200,35.9,0.483,26,0
702 | 6,125,78,31,0,27.6,0.565,49,1
703 | 1,168,88,29,0,35.0,0.905,52,1
704 | 2,129,0,0,0,38.5,0.304,41,0
705 | 4,110,76,20,100,28.4,0.118,27,0
706 | 6,80,80,36,0,39.8,0.177,28,0
707 | 10,115,0,0,0,0.0,0.261,30,1
708 | 2,127,46,21,335,34.4,0.176,22,0
709 | 9,164,78,0,0,32.8,0.148,45,1
710 | 2,93,64,32,160,38.0,0.674,23,1
711 | 3,158,64,13,387,31.2,0.295,24,0
712 | 5,126,78,27,22,29.6,0.439,40,0
713 | 10,129,62,36,0,41.2,0.441,38,1
714 | 0,134,58,20,291,26.4,0.352,21,0
715 | 3,102,74,0,0,29.5,0.121,32,0
716 | 7,187,50,33,392,33.9,0.826,34,1
717 | 3,173,78,39,185,33.8,0.970,31,1
718 | 10,94,72,18,0,23.1,0.595,56,0
719 | 1,108,60,46,178,35.5,0.415,24,0
720 | 5,97,76,27,0,35.6,0.378,52,1
721 | 4,83,86,19,0,29.3,0.317,34,0
722 | 1,114,66,36,200,38.1,0.289,21,0
723 | 1,149,68,29,127,29.3,0.349,42,1
724 | 5,117,86,30,105,39.1,0.251,42,0
725 | 1,111,94,0,0,32.8,0.265,45,0
726 | 4,112,78,40,0,39.4,0.236,38,0
727 | 1,116,78,29,180,36.1,0.496,25,0
728 | 0,141,84,26,0,32.4,0.433,22,0
729 | 2,175,88,0,0,22.9,0.326,22,0
730 | 2,92,52,0,0,30.1,0.141,22,0
731 | 3,130,78,23,79,28.4,0.323,34,1
732 | 8,120,86,0,0,28.4,0.259,22,1
733 | 2,174,88,37,120,44.5,0.646,24,1
734 | 2,106,56,27,165,29.0,0.426,22,0
735 | 2,105,75,0,0,23.3,0.560,53,0
736 | 4,95,60,32,0,35.4,0.284,28,0
737 | 0,126,86,27,120,27.4,0.515,21,0
738 | 8,65,72,23,0,32.0,0.600,42,0
739 | 2,99,60,17,160,36.6,0.453,21,0
740 | 1,102,74,0,0,39.5,0.293,42,1
741 | 11,120,80,37,150,42.3,0.785,48,1
742 | 3,102,44,20,94,30.8,0.400,26,0
743 | 1,109,58,18,116,28.5,0.219,22,0
744 | 9,140,94,0,0,32.7,0.734,45,1
745 | 13,153,88,37,140,40.6,1.174,39,0
746 | 12,100,84,33,105,30.0,0.488,46,0
747 | 1,147,94,41,0,49.3,0.358,27,1
748 | 1,81,74,41,57,46.3,1.096,32,0
749 | 3,187,70,22,200,36.4,0.408,36,1
750 | 6,162,62,0,0,24.3,0.178,50,1
751 | 4,136,70,0,0,31.2,1.182,22,1
752 | 1,121,78,39,74,39.0,0.261,28,0
753 | 3,108,62,24,0,26.0,0.223,25,0
754 | 0,181,88,44,510,43.3,0.222,26,1
755 | 8,154,78,32,0,32.4,0.443,45,1
756 | 1,128,88,39,110,36.5,1.057,37,1
757 | 7,137,90,41,0,32.0,0.391,39,0
758 | 0,123,72,0,0,36.3,0.258,52,1
759 | 1,106,76,0,0,37.5,0.197,26,0
760 | 6,190,92,0,0,35.5,0.278,66,1
761 | 2,88,58,26,16,28.4,0.766,22,0
762 | 9,170,74,31,0,44.0,0.403,43,1
763 | 9,89,62,0,0,22.5,0.142,33,0
764 | 10,101,76,48,180,32.9,0.171,63,0
765 | 2,122,70,27,0,36.8,0.340,27,0
766 | 5,121,72,23,112,26.2,0.245,30,0
767 | 1,126,60,0,0,30.1,0.349,47,1
768 | 1,93,70,31,0,30.4,0.315,23,0
--------------------------------------------------------------------------------
/EnsembleLearning/datasets/readme.txt:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/MLOPS/Hello_MLflow.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "provenance": [],
7 | "include_colab_link": true
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": "markdown",
20 | "metadata": {
21 | "id": "view-in-github",
22 | "colab_type": "text"
23 | },
24 | "source": [
25 | "
"
26 | ]
27 | },
28 | {
29 | "cell_type": "markdown",
30 | "metadata": {
31 | "id": "LdSp3WikkbFk"
32 | },
33 | "source": [
34 | "# MLflow + Colab – Example project\n",
35 | "This project shows how you can easily log experiments with Google Colab, directly to an MLflow remote.\n",
36 | "\n",
37 | "It uses DAGsHub MLflow remote server, which is a free hosted MLflow remote.\n",
38 | "\n",
39 | "Instructions:\n",
40 | "1. [Sign up to DAGsHub](https://dagshub.com/user/sign_up)\n",
41 | "1. [Create an access token](https://dagshub.com/user/settings/tokens)\n",
42 | "1. [Create a new project](https://dagshub.com/repo/create)\n",
43 | "1. [Open the notebook in Google Colab](https://dagshub.com/Dean/mlflow-colab-example/src/master/mlflow-colab.ipynb)\n",
44 | "1. Run the cell\n",
45 | "1. Fill in your DAGsHub username, access token and project name.\n",
46 | "1. Run the visualization cell if you want to see your experiments inside Colab."
47 | ]
48 | },
49 | {
50 | "cell_type": "code",
51 | "metadata": {
52 | "id": "kXIk98FWxT6C",
53 | "colab": {
54 | "base_uri": "https://localhost:8080/"
55 | },
56 | "outputId": "2d6241ba-11d9-4705-c428-b736735ac0e2"
57 | },
58 | "source": [
59 | "!pip install mlflow --quiet\n",
60 | "\n",
61 | "import mlflow\n",
62 | "import os\n",
63 | "from getpass import getpass\n",
64 | "\n",
65 | "os.environ['MLFLOW_TRACKING_USERNAME'] = input()\n",
66 | "os.environ['MLFLOW_TRACKING_PASSWORD'] = getpass('')\n",
67 | "os.environ['MLFLOW_TRACKING_PROJECTNAME'] = input('')\n",
68 | "\n",
69 | "mlflow.set_tracking_uri(f'https://dagshub.com/' + os.environ['MLFLOW_TRACKING_USERNAME'] \n",
70 | " + '/' + os.environ['MLFLOW_TRACKING_PROJECTNAME'] + '.mlflow')\n",
71 | "\n",
72 | "with mlflow.start_run(run_name=\"MLflow on Colab\"):\n",
73 | " mlflow.log_metric(\"m1\", 2.0)\n",
74 | " mlflow.log_param(\"p1\", \"mlflow-colab\")"
75 | ],
76 | "execution_count": 4,
77 | "outputs": [
78 | {
79 | "name": "stdout",
80 | "output_type": "stream",
81 | "text": [
82 | "besher.alhalabi\n",
83 | "··········\n",
84 | "mlops_demo\n"
85 | ]
86 | }
87 | ]
88 | },
89 | {
90 | "cell_type": "code",
91 | "metadata": {
92 | "colab": {
93 | "base_uri": "https://localhost:8080/",
94 | "height": 621
95 | },
96 | "id": "4kK5ZgqBiMe1",
97 | "outputId": "c8ab15cc-84ff-4a77-d32e-4c3416b645bb"
98 | },
99 | "source": [
100 | "# See your experiments table inside Colab!\n",
101 | "import IPython\n",
102 | "display(IPython.display.IFrame(\"https://dagshub.com/\"+ os.environ['MLFLOW_TRACKING_USERNAME'] \n",
103 | " + '/' + os.environ['MLFLOW_TRACKING_PROJECTNAME'] + \"/experiments/#/\",'100%',600))"
104 | ],
105 | "execution_count": 8,
106 | "outputs": [
107 | {
108 | "output_type": "display_data",
109 | "data": {
110 | "text/plain": [
111 | ""
112 | ],
113 | "text/html": [
114 | "\n",
115 | " \n",
122 | " "
123 | ]
124 | },
125 | "metadata": {}
126 | }
127 | ]
128 | },
129 | {
130 | "cell_type": "code",
131 | "source": [
132 | "!pip list | grep mlflow"
133 | ],
134 | "metadata": {
135 | "colab": {
136 | "base_uri": "https://localhost:8080/"
137 | },
138 | "id": "2g08VifY0Htm",
139 | "outputId": "bf2e726f-3aaa-408c-e3bb-d736fc43316a"
140 | },
141 | "execution_count": null,
142 | "outputs": [
143 | {
144 | "output_type": "stream",
145 | "name": "stdout",
146 | "text": [
147 | "mlflow 1.22.0\n"
148 | ]
149 | }
150 | ]
151 | },
152 | {
153 | "cell_type": "code",
154 | "source": [
155 | "from pprint import pprint\n",
156 | "import numpy as np\n",
157 | "from sklearn.linear_model import LinearRegression\n",
158 | "import mlflow\n",
159 | "from mlflow import MlflowClient\n",
160 | "\n",
161 | "def fetch_logged_data(run_id):\n",
162 | " client = MlflowClient()\n",
163 | " data = client.get_run(run_id).data\n",
164 | " tags = {k: v for k, v in data.tags.items() if not k.startswith(\"mlflow.\")}\n",
165 | " artifacts = [f.path for f in client.list_artifacts(run_id, \"model\")]\n",
166 | " return data.params, data.metrics, tags, artifacts\n",
167 | "\n",
168 | "# enable autologging\n",
169 | "mlflow.sklearn.autolog()\n",
170 | "\n",
171 | "# prepare training data\n",
172 | "X = np.array([[1, 1], [1, 2], [2, 2], [2, 3]])\n",
173 | "y = np.dot(X, np.array([1, 2])) + 3\n",
174 | "\n",
175 | "# train a model\n",
176 | "model = LinearRegression()\n",
177 | "with mlflow.start_run() as run:\n",
178 | " model.fit(X, y)\n",
179 | "\n",
180 | "# fetch logged data\n",
181 | "params, metrics, tags, artifacts = fetch_logged_data(run.info.run_id)\n",
182 | "\n",
183 | "pprint(params)\n",
184 | "\n",
185 | "pprint(metrics)\n",
186 | "\n",
187 | "pprint(tags)\n",
188 | "\n",
189 | "pprint(artifacts)\n"
190 | ],
191 | "metadata": {
192 | "id": "HbGjNsqw0y2A",
193 | "colab": {
194 | "base_uri": "https://localhost:8080/"
195 | },
196 | "outputId": "e1c61ad9-8b15-4517-d4d2-8ef3678442b7"
197 | },
198 | "execution_count": 7,
199 | "outputs": [
200 | {
201 | "output_type": "stream",
202 | "name": "stdout",
203 | "text": [
204 | "{'copy_X': 'True',\n",
205 | " 'fit_intercept': 'True',\n",
206 | " 'n_jobs': 'None',\n",
207 | " 'normalize': 'deprecated',\n",
208 | " 'positive': 'False'}\n",
209 | "{'training_mae': 2.22044604925031e-16,\n",
210 | " 'training_mse': 1.97215226305253e-31,\n",
211 | " 'training_r2_score': 1.0,\n",
212 | " 'training_rmse': 4.44089209850063e-16,\n",
213 | " 'training_score': 1.0}\n",
214 | "{'estimator_class': 'sklearn.linear_model._base.LinearRegression',\n",
215 | " 'estimator_name': 'LinearRegression'}\n",
216 | "['model/MLmodel',\n",
217 | " 'model/conda.yaml',\n",
218 | " 'model/model.pkl',\n",
219 | " 'model/python_env.yaml',\n",
220 | " 'model/requirements.txt']\n"
221 | ]
222 | }
223 | ]
224 | }
225 | ]
226 | }
--------------------------------------------------------------------------------
/MLOPS/LR__MLflow.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "provenance": [],
7 | "include_colab_link": true
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": "markdown",
20 | "metadata": {
21 | "id": "view-in-github",
22 | "colab_type": "text"
23 | },
24 | "source": [
25 | "
"
26 | ]
27 | },
28 | {
29 | "cell_type": "markdown",
30 | "metadata": {
31 | "id": "LdSp3WikkbFk"
32 | },
33 | "source": [
34 | "# MLflow + Colab – Example project\n",
35 | "This project shows how you can easily log experiments with Google Colab, directly to an MLflow remote.\n",
36 | "\n",
37 | "It uses DAGsHub MLflow remote server, which is a free hosted MLflow remote.\n",
38 | "\n",
39 | "Instructions:\n",
40 | "1. [Sign up to DAGsHub](https://dagshub.com/user/sign_up)\n",
41 | "1. [Create an access token](https://dagshub.com/user/settings/tokens)\n",
42 | "1. [Create a new project](https://dagshub.com/repo/create)\n",
43 | "1. [Open the notebook in Google Colab](https://dagshub.com/Dean/mlflow-colab-example/src/master/mlflow-colab.ipynb)\n",
44 | "1. Run the cell\n",
45 | "1. Fill in your DAGsHub username, access token and project name.\n",
46 | "1. Run the visualization cell if you want to see your experiments inside Colab."
47 | ]
48 | },
49 | {
50 | "cell_type": "code",
51 | "metadata": {
52 | "id": "kXIk98FWxT6C",
53 | "colab": {
54 | "base_uri": "https://localhost:8080/"
55 | },
56 | "outputId": "cd45d8d2-b901-446b-88ee-b74b4d674f3e"
57 | },
58 | "source": [
59 | "!pip install mlflow --quiet\n",
60 | "\n",
61 | "import mlflow\n",
62 | "import os\n",
63 | "from getpass import getpass\n",
64 | "\n",
65 | "os.environ['MLFLOW_TRACKING_USERNAME'] = input()\n",
66 | "os.environ['MLFLOW_TRACKING_PASSWORD'] = getpass('')\n",
67 | "os.environ['MLFLOW_TRACKING_PROJECTNAME'] = input('')\n",
68 | "\n",
69 | "mlflow.set_tracking_uri(f'https://dagshub.com/' + os.environ['MLFLOW_TRACKING_USERNAME'] \n",
70 | " + '/' + os.environ['MLFLOW_TRACKING_PROJECTNAME'] + '.mlflow')\n",
71 | "\n",
72 | "with mlflow.start_run(run_name=\"MLflow on Colab\"):\n",
73 | " mlflow.log_metric(\"m1\", 2.0)\n",
74 | " mlflow.log_param(\"p1\", \"mlflow-colab\")"
75 | ],
76 | "execution_count": 5,
77 | "outputs": [
78 | {
79 | "name": "stdout",
80 | "output_type": "stream",
81 | "text": [
82 | "\u001b[K |████████████████████████████████| 16.5 MB 5.3 MB/s \n",
83 | "\u001b[K |████████████████████████████████| 77 kB 5.8 MB/s \n",
84 | "\u001b[K |████████████████████████████████| 182 kB 56.9 MB/s \n",
85 | "\u001b[K |████████████████████████████████| 209 kB 55.1 MB/s \n",
86 | "\u001b[K |████████████████████████████████| 79 kB 7.4 MB/s \n",
87 | "\u001b[K |████████████████████████████████| 575 kB 63.5 MB/s \n",
88 | "\u001b[K |████████████████████████████████| 147 kB 77.4 MB/s \n",
89 | "\u001b[K |████████████████████████████████| 78 kB 7.5 MB/s \n",
90 | "\u001b[K |████████████████████████████████| 62 kB 1.4 MB/s \n",
91 | "\u001b[K |████████████████████████████████| 140 kB 75.4 MB/s \n",
92 | "\u001b[K |████████████████████████████████| 55 kB 3.2 MB/s \n",
93 | "\u001b[K |████████████████████████████████| 62 kB 1.2 MB/s \n",
94 | "\u001b[?25h Building wheel for databricks-cli (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
95 | "besher.alhalabi\n",
96 | "··········\n",
97 | "mlops_demo\n"
98 | ]
99 | }
100 | ]
101 | },
102 | {
103 | "cell_type": "code",
104 | "metadata": {
105 | "colab": {
106 | "base_uri": "https://localhost:8080/",
107 | "height": 621
108 | },
109 | "id": "4kK5ZgqBiMe1",
110 | "outputId": "99a82675-e351-472f-e913-08baa91f8099"
111 | },
112 | "source": [
113 | "# See your experiments table inside Colab!\n",
114 | "import IPython\n",
115 | "display(IPython.display.IFrame(\"https://dagshub.com/\"+ os.environ['MLFLOW_TRACKING_USERNAME'] \n",
116 | " + '/' + os.environ['MLFLOW_TRACKING_PROJECTNAME'] + \"/experiments/#/\",'100%',600))"
117 | ],
118 | "execution_count": 6,
119 | "outputs": [
120 | {
121 | "output_type": "display_data",
122 | "data": {
123 | "text/plain": [
124 | ""
125 | ],
126 | "text/html": [
127 | "\n",
128 | " \n",
135 | " "
136 | ]
137 | },
138 | "metadata": {}
139 | }
140 | ]
141 | },
142 | {
143 | "cell_type": "code",
144 | "source": [
145 | "!pip list | grep mlflow"
146 | ],
147 | "metadata": {
148 | "colab": {
149 | "base_uri": "https://localhost:8080/"
150 | },
151 | "id": "2g08VifY0Htm",
152 | "outputId": "14bd37fa-4281-463c-bb19-337d487faf08"
153 | },
154 | "execution_count": 7,
155 | "outputs": [
156 | {
157 | "output_type": "stream",
158 | "name": "stdout",
159 | "text": [
160 | "mlflow 2.0.1\n"
161 | ]
162 | }
163 | ]
164 | },
165 | {
166 | "cell_type": "code",
167 | "source": [
168 | "import os\n",
169 | "import warnings\n",
170 | "import sys\n",
171 | "\n",
172 | "import pandas as pd\n",
173 | "import numpy as np\n",
174 | "from sklearn.metrics import mean_squared_error, mean_absolute_error, r2_score\n",
175 | "from sklearn.model_selection import train_test_split\n",
176 | "from sklearn.linear_model import ElasticNet\n",
177 | "from urllib.parse import urlparse\n",
178 | "import mlflow\n",
179 | "import mlflow.sklearn\n",
180 | "\n",
181 | "\n"
182 | ],
183 | "metadata": {
184 | "id": "HbGjNsqw0y2A"
185 | },
186 | "execution_count": 8,
187 | "outputs": []
188 | },
189 | {
190 | "cell_type": "code",
191 | "source": [
192 | "def eval_metrics(actual, pred):\n",
193 | " rmse = np.sqrt(mean_squared_error(actual, pred))\n",
194 | " mae = mean_absolute_error(actual, pred)\n",
195 | " r2 = r2_score(actual, pred)\n",
196 | " return rmse, mae, r2\n"
197 | ],
198 | "metadata": {
199 | "id": "6icu4C7K_TR0"
200 | },
201 | "execution_count": 9,
202 | "outputs": []
203 | },
204 | {
205 | "cell_type": "code",
206 | "source": [
207 | "csv_url = \"http://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/winequality-red.csv\"\n",
208 | "data = pd.read_csv(csv_url, sep=\";\")\n"
209 | ],
210 | "metadata": {
211 | "id": "RhCLvxXy_XPg"
212 | },
213 | "execution_count": 10,
214 | "outputs": []
215 | },
216 | {
217 | "cell_type": "code",
218 | "source": [
219 | "# Split the data into training and test sets. (0.75, 0.25) split.\n",
220 | "train, test = train_test_split(data)\n",
221 | "\n",
222 | " # The predicted column is \"quality\" which is a scalar from [3, 9]\n",
223 | "train_x = train.drop([\"quality\"], axis=1)\n",
224 | "test_x = test.drop([\"quality\"], axis=1)\n",
225 | "train_y = train[[\"quality\"]]\n",
226 | "test_y = test[[\"quality\"]]"
227 | ],
228 | "metadata": {
229 | "id": "SXTexeSgAHzO"
230 | },
231 | "execution_count": 11,
232 | "outputs": []
233 | },
234 | {
235 | "cell_type": "code",
236 | "source": [
237 | "alpha = 0.1\n",
238 | "l1_ratio = 0.1\n"
239 | ],
240 | "metadata": {
241 | "id": "DH4a92ofANI5"
242 | },
243 | "execution_count": 17,
244 | "outputs": []
245 | },
246 | {
247 | "cell_type": "code",
248 | "source": [
249 | " with mlflow.start_run():\n",
250 | " lr = ElasticNet(alpha=alpha, l1_ratio=l1_ratio, random_state=42)\n",
251 | " lr.fit(train_x, train_y)\n",
252 | "\n",
253 | " predicted_qualities = lr.predict(test_x)\n",
254 | "\n",
255 | " (rmse, mae, r2) = eval_metrics(test_y, predicted_qualities)\n",
256 | "\n",
257 | " print(\"Elasticnet model (alpha=%f, l1_ratio=%f):\" % (alpha, l1_ratio))\n",
258 | " print(\" RMSE: %s\" % rmse)\n",
259 | " print(\" MAE: %s\" % mae)\n",
260 | "\n",
261 | " mlflow.log_param(\"alpha\", alpha)\n",
262 | " mlflow.log_param(\"l1_ratio\", l1_ratio)\n",
263 | " mlflow.log_metric(\"rmse\", rmse)\n",
264 | " mlflow.log_metric(\"mae\", mae)\n",
265 | "\n",
266 | " tracking_url_type_store = urlparse(mlflow.get_tracking_uri()).scheme\n",
267 | "\n",
268 | " # Model registry does not work with file store\n",
269 | " if tracking_url_type_store != \"file\":\n",
270 | "\n",
271 | " # Register the model\n",
272 | " # There are other ways to use the Model Registry, which depends on the use case,\n",
273 | " # please refer to the doc for more information:\n",
274 | " # https://mlflow.org/docs/latest/model-registry.html#api-workflow\n",
275 | " mlflow.sklearn.log_model(lr, \"model\", registered_model_name=\"ElasticnetWineModel\")\n",
276 | " else:\n",
277 | " mlflow.sklearn.log_model(lr, \"model\")"
278 | ],
279 | "metadata": {
280 | "colab": {
281 | "base_uri": "https://localhost:8080/"
282 | },
283 | "id": "ZwExrRg_AVPV",
284 | "outputId": "97ae782b-7d0d-49af-cfa7-fff87054b706"
285 | },
286 | "execution_count": 18,
287 | "outputs": [
288 | {
289 | "output_type": "stream",
290 | "name": "stdout",
291 | "text": [
292 | "Elasticnet model (alpha=0.100000, l1_ratio=0.100000):\n",
293 | " RMSE: 0.697078353435743\n",
294 | " MAE: 0.5446639367673861\n",
295 | " R2: 0.31170617822346913\n"
296 | ]
297 | },
298 | {
299 | "output_type": "stream",
300 | "name": "stderr",
301 | "text": [
302 | "Successfully registered model ''.\n",
303 | "2022/12/07 19:16:16 INFO mlflow.tracking._model_registry.client: Waiting up to 300 seconds for model version to finish creation. Model name: ElasticnetWineModel, version 3\n",
304 | "Created version '3' of model 'ElasticnetWineModel'.\n"
305 | ]
306 | }
307 | ]
308 | }
309 | ]
310 | }
--------------------------------------------------------------------------------
/ModelEvaluation/Silhouette_Coefficient.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "Silhouette Coefficient.ipynb",
7 | "provenance": [],
8 | "authorship_tag": "ABX9TyNwl0BVPse6Gyvu32R3dOhl",
9 | "include_colab_link": 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": "markdown",
22 | "metadata": {
23 | "id": "view-in-github",
24 | "colab_type": "text"
25 | },
26 | "source": [
27 | "
"
28 | ]
29 | },
30 | {
31 | "cell_type": "code",
32 | "metadata": {
33 | "id": "KeFKd4JLSjJg"
34 | },
35 | "source": [
36 | "from sklearn import metrics\n",
37 | "from sklearn.metrics import pairwise_distances\n",
38 | "from sklearn import datasets\n",
39 | "import numpy as np"
40 | ],
41 | "execution_count": 1,
42 | "outputs": []
43 | },
44 | {
45 | "cell_type": "code",
46 | "metadata": {
47 | "id": "t5MbAZbuS2I-"
48 | },
49 | "source": [
50 | "#read more here\n",
51 | "X, y = datasets.load_iris(return_X_y=True)"
52 | ],
53 | "execution_count": 3,
54 | "outputs": []
55 | },
56 | {
57 | "cell_type": "code",
58 | "metadata": {
59 | "colab": {
60 | "base_uri": "https://localhost:8080/"
61 | },
62 | "id": "YoSCD3MQS6Cg",
63 | "outputId": "d55241bc-42a0-4f2d-9537-83e170f830f5"
64 | },
65 | "source": [
66 | "from sklearn.cluster import KMeans\n",
67 | "kmeans_model = KMeans(n_clusters=3, random_state=1).fit(X)\n",
68 | "labels = kmeans_model.labels_\n",
69 | "print(labels)"
70 | ],
71 | "execution_count": 5,
72 | "outputs": [
73 | {
74 | "output_type": "stream",
75 | "name": "stdout",
76 | "text": [
77 | "[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n",
78 | " 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n",
79 | " 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 2 2 2 2 0 2 2 2 2\n",
80 | " 2 2 0 0 2 2 2 2 0 2 0 2 0 2 2 0 0 2 2 2 2 2 0 2 2 2 2 0 2 2 2 0 2 2 2 0 2\n",
81 | " 2 0]\n"
82 | ]
83 | }
84 | ]
85 | },
86 | {
87 | "cell_type": "code",
88 | "metadata": {
89 | "colab": {
90 | "base_uri": "https://localhost:8080/"
91 | },
92 | "id": "YV8tux1ES-gR",
93 | "outputId": "8df9a2e8-1e60-4d49-d580-2264b5c14c17"
94 | },
95 | "source": [
96 | "\n",
97 | "metrics.silhouette_score(X, labels, metric='euclidean')"
98 | ],
99 | "execution_count": 6,
100 | "outputs": [
101 | {
102 | "output_type": "execute_result",
103 | "data": {
104 | "text/plain": [
105 | "0.5528190123564091"
106 | ]
107 | },
108 | "metadata": {},
109 | "execution_count": 6
110 | }
111 | ]
112 | }
113 | ]
114 | }
--------------------------------------------------------------------------------
/ModelEvaluation/datasets/candy-data.csv:
--------------------------------------------------------------------------------
1 | competitorname,chocolate,fruity,caramel,peanutyalmondy,nougat,crispedricewafer,hard,bar,pluribus,sugarpercent,pricepercent,winpercent
2 | 100 Grand,1,0,1,0,0,1,0,1,0,.73199999,.86000001,66.971725
3 | 3 Musketeers,1,0,0,0,1,0,0,1,0,.60399997,.51099998,67.602936
4 | One dime,0,0,0,0,0,0,0,0,0,.011,.116,32.261086
5 | One quarter,0,0,0,0,0,0,0,0,0,.011,.51099998,46.116505
6 | Air Heads,0,1,0,0,0,0,0,0,0,.90600002,.51099998,52.341465
7 | Almond Joy,1,0,0,1,0,0,0,1,0,.465,.76700002,50.347546
8 | Baby Ruth,1,0,1,1,1,0,0,1,0,.60399997,.76700002,56.914547
9 | Boston Baked Beans,0,0,0,1,0,0,0,0,1,.31299999,.51099998,23.417824
10 | Candy Corn,0,0,0,0,0,0,0,0,1,.90600002,.32499999,38.010963
11 | Caramel Apple Pops,0,1,1,0,0,0,0,0,0,.60399997,.32499999,34.517681
12 | Charleston Chew,1,0,0,0,1,0,0,1,0,.60399997,.51099998,38.975037
13 | Chewey Lemonhead Fruit Mix,0,1,0,0,0,0,0,0,1,.73199999,.51099998,36.017628
14 | Chiclets,0,1,0,0,0,0,0,0,1,.046,.32499999,24.524988
15 | Dots,0,1,0,0,0,0,0,0,1,.73199999,.51099998,42.272076
16 | Dum Dums,0,1,0,0,0,0,1,0,0,.73199999,.034000002,39.460556
17 | Fruit Chews,0,1,0,0,0,0,0,0,1,.127,.034000002,43.088924
18 | Fun Dip,0,1,0,0,0,0,1,0,0,.73199999,.32499999,39.185505
19 | Gobstopper,0,1,0,0,0,0,1,0,1,.90600002,.45300001,46.783348
20 | Haribo Gold Bears,0,1,0,0,0,0,0,0,1,.465,.465,57.11974
21 | Haribo Happy Cola,0,0,0,0,0,0,0,0,1,.465,.465,34.158958
22 | Haribo Sour Bears,0,1,0,0,0,0,0,0,1,.465,.465,51.41243
23 | Haribo Twin Snakes,0,1,0,0,0,0,0,0,1,.465,.465,42.178772
24 | HersheyÕs Kisses,1,0,0,0,0,0,0,0,1,.127,.093000002,55.375454
25 | HersheyÕs Krackel,1,0,0,0,0,1,0,1,0,.43000001,.91799998,62.284481
26 | HersheyÕs Milk Chocolate,1,0,0,0,0,0,0,1,0,.43000001,.91799998,56.490501
27 | HersheyÕs Special Dark,1,0,0,0,0,0,0,1,0,.43000001,.91799998,59.236122
28 | Jawbusters,0,1,0,0,0,0,1,0,1,.093000002,.51099998,28.127439
29 | Junior Mints,1,0,0,0,0,0,0,0,1,.197,.51099998,57.21925
30 | Kit Kat,1,0,0,0,0,1,0,1,0,.31299999,.51099998,76.7686
31 | Laffy Taffy,0,1,0,0,0,0,0,0,0,.22,.116,41.389557
32 | Lemonhead,0,1,0,0,0,0,1,0,0,.046,.104,39.141056
33 | Lifesavers big ring gummies,0,1,0,0,0,0,0,0,0,.26699999,.27900001,52.911392
34 | Peanut butter M&MÕs,1,0,0,1,0,0,0,0,1,.82499999,.65100002,71.46505
35 | M&MÕs,1,0,0,0,0,0,0,0,1,.82499999,.65100002,66.574585
36 | Mike & Ike,0,1,0,0,0,0,0,0,1,.87199998,.32499999,46.411716
37 | Milk Duds,1,0,1,0,0,0,0,0,1,.30199999,.51099998,55.064072
38 | Milky Way,1,0,1,0,1,0,0,1,0,.60399997,.65100002,73.099556
39 | Milky Way Midnight,1,0,1,0,1,0,0,1,0,.73199999,.44100001,60.800701
40 | Milky Way Simply Caramel,1,0,1,0,0,0,0,1,0,.96499997,.86000001,64.35334
41 | Mounds,1,0,0,0,0,0,0,1,0,.31299999,.86000001,47.829754
42 | Mr Good Bar,1,0,0,1,0,0,0,1,0,.31299999,.91799998,54.526451
43 | Nerds,0,1,0,0,0,0,1,0,1,.84799999,.32499999,55.354046
44 | Nestle Butterfinger,1,0,0,1,0,0,0,1,0,.60399997,.76700002,70.735641
45 | Nestle Crunch,1,0,0,0,0,1,0,1,0,.31299999,.76700002,66.47068
46 | Nik L Nip,0,1,0,0,0,0,0,0,1,.197,.97600001,22.445341
47 | Now & Later,0,1,0,0,0,0,0,0,1,.22,.32499999,39.4468
48 | Payday,0,0,0,1,1,0,0,1,0,.465,.76700002,46.296597
49 | Peanut M&Ms,1,0,0,1,0,0,0,0,1,.59299999,.65100002,69.483788
50 | Pixie Sticks,0,0,0,0,0,0,0,0,1,.093000002,.023,37.722336
51 | Pop Rocks,0,1,0,0,0,0,1,0,1,.60399997,.83700001,41.265511
52 | Red vines,0,1,0,0,0,0,0,0,1,.58099997,.116,37.348522
53 | ReeseÕs Miniatures,1,0,0,1,0,0,0,0,0,.034000002,.27900001,81.866257
54 | ReeseÕs Peanut Butter cup,1,0,0,1,0,0,0,0,0,.72000003,.65100002,84.18029
55 | ReeseÕs pieces,1,0,0,1,0,0,0,0,1,.40599999,.65100002,73.43499
56 | ReeseÕs stuffed with pieces,1,0,0,1,0,0,0,0,0,.98799998,.65100002,72.887901
57 | Ring pop,0,1,0,0,0,0,1,0,0,.73199999,.96499997,35.290756
58 | Rolo,1,0,1,0,0,0,0,0,1,.86000001,.86000001,65.716286
59 | Root Beer Barrels,0,0,0,0,0,0,1,0,1,.73199999,.068999998,29.703691
60 | Runts,0,1,0,0,0,0,1,0,1,.87199998,.27900001,42.849144
61 | Sixlets,1,0,0,0,0,0,0,0,1,.22,.081,34.722
62 | Skittles original,0,1,0,0,0,0,0,0,1,.94099998,.22,63.08514
63 | Skittles wildberry,0,1,0,0,0,0,0,0,1,.94099998,.22,55.103695
64 | Nestle Smarties,1,0,0,0,0,0,0,0,1,.26699999,.97600001,37.887188
65 | Smarties candy,0,1,0,0,0,0,1,0,1,.26699999,.116,45.995827
66 | Snickers,1,0,1,1,1,0,0,1,0,.546,.65100002,76.673782
67 | Snickers Crisper,1,0,1,1,0,1,0,1,0,.60399997,.65100002,59.529251
68 | Sour Patch Kids,0,1,0,0,0,0,0,0,1,.068999998,.116,59.863998
69 | Sour Patch Tricksters,0,1,0,0,0,0,0,0,1,.068999998,.116,52.825947
70 | Starburst,0,1,0,0,0,0,0,0,1,.15099999,.22,67.037628
71 | Strawberry bon bons,0,1,0,0,0,0,1,0,1,.56900001,.057999998,34.578991
72 | Sugar Babies,0,0,1,0,0,0,0,0,1,.96499997,.76700002,33.43755
73 | Sugar Daddy,0,0,1,0,0,0,0,0,0,.41800001,.32499999,32.230995
74 | Super Bubble,0,1,0,0,0,0,0,0,0,.162,.116,27.303865
75 | Swedish Fish,0,1,0,0,0,0,0,0,1,.60399997,.755,54.861111
76 | Tootsie Pop,1,1,0,0,0,0,1,0,0,.60399997,.32499999,48.982651
77 | Tootsie Roll Juniors,1,0,0,0,0,0,0,0,0,.31299999,.51099998,43.068897
78 | Tootsie Roll Midgies,1,0,0,0,0,0,0,0,1,.17399999,.011,45.736748
79 | Tootsie Roll Snack Bars,1,0,0,0,0,0,0,1,0,.465,.32499999,49.653503
80 | Trolli Sour Bites,0,1,0,0,0,0,0,0,1,.31299999,.255,47.173229
81 | Twix,1,0,1,0,0,1,0,1,0,.546,.90600002,81.642914
82 | Twizzlers,0,1,0,0,0,0,0,0,0,.22,.116,45.466282
83 | Warheads,0,1,0,0,0,0,1,0,0,.093000002,.116,39.011898
84 | WelchÕs Fruit Snacks,0,1,0,0,0,0,0,0,1,.31299999,.31299999,44.375519
85 | WertherÕs Original Caramel,0,0,1,0,0,0,1,0,0,.186,.26699999,41.904308
86 | Whoppers,1,0,0,0,0,1,0,0,1,.87199998,.84799999,49.524113
87 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Machine Learning CMP7288 (Semester 1, 2023-2024)
2 |
3 | This repository consists of course material for CMP7228, Machine Learning. Each week's material can be found under the related folder number.
4 |
5 | This is the second version for the course so the materials could be updated. Please make sure you stay up to date. One way would be to frequently download the latest version by clicking on the "clone or download" button above. Optionally, you can also install git on your laptop and update it with git pull as semester progresses. If you would like to get started with git here is a place to get you started: http://rogerdudler.github.io/git-guide/
6 |
7 | # Short URL to access this course
8 | https://bit.ly/2RZWqYi.
9 |
10 | # Credits
11 | This repository uses a modified version of the content and several examples from Python Machine Learning-3rd-edition by Sebastian Raschka and Vahid Mirjalili
12 |
13 | 
14 |
15 |
--------------------------------------------------------------------------------
/Regression/1.Simple_Linear_Regression_With_scikit_learn.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "Simple Linear Regression With scikit-learn.ipynb",
7 | "provenance": [],
8 | "authorship_tag": "ABX9TyOomc89GQX/NydN0NxwE1cR",
9 | "include_colab_link": true
10 | },
11 | "kernelspec": {
12 | "name": "python3",
13 | "display_name": "Python 3"
14 | }
15 | },
16 | "cells": [
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {
20 | "id": "view-in-github",
21 | "colab_type": "text"
22 | },
23 | "source": [
24 | "
"
25 | ]
26 | },
27 | {
28 | "cell_type": "markdown",
29 | "metadata": {
30 | "id": "fyazgqdVRhc-"
31 | },
32 | "source": [
33 | "Let’s start with the simplest case, which is simple linear regression.\n",
34 | "\n",
35 | "There are five basic steps when you’re implementing linear regression:\n",
36 | "\n",
37 | "Import the packages and classes you need.\n",
38 | "Provide data to work with and eventually do appropriate transformations.\n",
39 | "Create a regression model and fit it with existing data.\n",
40 | "Check the results of model fitting to know whether the model is satisfactory.\n",
41 | "Apply the model for predictions.\n",
42 | "These steps are more or less general for most of the regression approaches and implementations.\n",
43 | "Step 1: Import packages and classes\n",
44 | "\n",
45 | "The first step is to import the package numpy and the class LinearRegression from sklearn.linear_model:\n",
46 | "\n",
47 | "\n",
48 | "\n"
49 | ]
50 | },
51 | {
52 | "cell_type": "code",
53 | "metadata": {
54 | "id": "U09j3yKdRdSo"
55 | },
56 | "source": [
57 | "import numpy as np\n",
58 | "from sklearn.linear_model import LinearRegression\n"
59 | ],
60 | "execution_count": 1,
61 | "outputs": []
62 | },
63 | {
64 | "cell_type": "markdown",
65 | "metadata": {
66 | "id": "ylUn_an1Ru9B"
67 | },
68 | "source": [
69 | "Now, you have all the functionalities you need to implement linear regression.\n",
70 | "\n",
71 | "The fundamental data type of NumPy is the array type called numpy.ndarray. The rest of this article uses the term array to refer to instances of the type numpy.ndarray.\n",
72 | "\n",
73 | "The class sklearn.linear_model.LinearRegression will be used to perform linear and polynomial regression and make predictions accordingly.\n",
74 | "\n",
75 | "Step 2: Provide data\n",
76 | "\n",
77 | "The second step is defining data to work with. The inputs (regressors, 𝑥) and output (predictor, 𝑦) should be arrays (the instances of the class numpy.ndarray) or similar objects. This is the simplest way of providing data for regression:\n",
78 | "\n"
79 | ]
80 | },
81 | {
82 | "cell_type": "code",
83 | "metadata": {
84 | "id": "p6kU2bxhRyuB"
85 | },
86 | "source": [
87 | "x = np.array([5, 15, 25, 35, 45, 55]).reshape((-1, 1))\n",
88 | "y = np.array([5, 20, 14, 32, 22, 38])\n"
89 | ],
90 | "execution_count": 2,
91 | "outputs": []
92 | },
93 | {
94 | "cell_type": "markdown",
95 | "metadata": {
96 | "id": "nV5N2p0IR1za"
97 | },
98 | "source": [
99 | "Now, you have two arrays: the input x and output y. You should call .reshape() on x because this array is required to be two-dimensional, or to be more precise, to have one column and as many rows as necessary. That’s exactly what the argument (-1, 1) of .reshape() specifies.\n",
100 | "\n",
101 | "This is how x and y look now:\n",
102 | "\n"
103 | ]
104 | },
105 | {
106 | "cell_type": "code",
107 | "metadata": {
108 | "colab": {
109 | "base_uri": "https://localhost:8080/"
110 | },
111 | "id": "e0caPcqlR6cU",
112 | "outputId": "a46fde4d-e802-46dd-f567-40327a472a9a"
113 | },
114 | "source": [
115 | "print(x)"
116 | ],
117 | "execution_count": 3,
118 | "outputs": [
119 | {
120 | "output_type": "stream",
121 | "text": [
122 | "[[ 5]\n",
123 | " [15]\n",
124 | " [25]\n",
125 | " [35]\n",
126 | " [45]\n",
127 | " [55]]\n"
128 | ],
129 | "name": "stdout"
130 | }
131 | ]
132 | },
133 | {
134 | "cell_type": "code",
135 | "metadata": {
136 | "colab": {
137 | "base_uri": "https://localhost:8080/"
138 | },
139 | "id": "IJDfJMpGR8I2",
140 | "outputId": "40d61166-36ec-41d7-9cfc-2735ab48959e"
141 | },
142 | "source": [
143 | "print(y)"
144 | ],
145 | "execution_count": 4,
146 | "outputs": [
147 | {
148 | "output_type": "stream",
149 | "text": [
150 | "[ 5 20 14 32 22 38]\n"
151 | ],
152 | "name": "stdout"
153 | }
154 | ]
155 | },
156 | {
157 | "cell_type": "markdown",
158 | "metadata": {
159 | "id": "sOWgIXAZSCak"
160 | },
161 | "source": [
162 | "As you can see, x has two dimensions, and x.shape is (6, 1), while y has a single dimension, and y.shape is (6,).\n",
163 | "\n",
164 | "Step 3: Create a model and fit it\n",
165 | "\n",
166 | "The next step is to create a linear regression model and fit it using the existing data.\n",
167 | "\n",
168 | "Let’s create an instance of the class LinearRegression, which will represent the regression model:\n",
169 | "\n"
170 | ]
171 | },
172 | {
173 | "cell_type": "code",
174 | "metadata": {
175 | "id": "gvzbVXsbSHJd"
176 | },
177 | "source": [
178 | "model = LinearRegression()\n"
179 | ],
180 | "execution_count": 5,
181 | "outputs": []
182 | },
183 | {
184 | "cell_type": "markdown",
185 | "metadata": {
186 | "id": "FkiS0dhwSM4M"
187 | },
188 | "source": [
189 | "This statement creates the variable model as the instance of LinearRegression. You can provide several optional parameters to LinearRegression:\n",
190 | "\n",
191 | "fit_intercept is a Boolean (True by default) that decides whether to calculate the intercept 𝑏₀ (True) or consider it equal to zero (False).\n",
192 | "\n",
193 | "normalize is a Boolean (False by default) that decides whether to normalize the input variables (True) or not (False).\n",
194 | "\n",
195 | "copy_X is a Boolean (True by default) that decides whether to copy (True) or overwrite the input variables (False).\n",
196 | "\n",
197 | "n_jobs is an integer or None (default) and represents the number of jobs used in parallel computation. None usually means one job and -1 to use all processors.\n",
198 | "\n",
199 | "This example uses the default values of all parameters.\n",
200 | "\n",
201 | "It’s time to start using the model. First, you need to call .fit() on model:"
202 | ]
203 | },
204 | {
205 | "cell_type": "code",
206 | "metadata": {
207 | "colab": {
208 | "base_uri": "https://localhost:8080/"
209 | },
210 | "id": "o2ewhiFXSPn4",
211 | "outputId": "8391a4dc-ef52-494b-f1c6-ac3600e0c182"
212 | },
213 | "source": [
214 | "model.fit(x, y)\n"
215 | ],
216 | "execution_count": 6,
217 | "outputs": [
218 | {
219 | "output_type": "execute_result",
220 | "data": {
221 | "text/plain": [
222 | "LinearRegression(copy_X=True, fit_intercept=True, n_jobs=None, normalize=False)"
223 | ]
224 | },
225 | "metadata": {
226 | "tags": []
227 | },
228 | "execution_count": 6
229 | }
230 | ]
231 | },
232 | {
233 | "cell_type": "markdown",
234 | "metadata": {
235 | "id": "1lu6oXCXSWFq"
236 | },
237 | "source": [
238 | "With .fit(), you calculate the optimal values of the weights 𝑏₀ and 𝑏₁, using the existing input and output (x and y) as the arguments. In other words, .fit() fits the model. It returns self, which is the variable model itself. That’s why you can replace the last two statements with this one:\n",
239 | "\n"
240 | ]
241 | },
242 | {
243 | "cell_type": "code",
244 | "metadata": {
245 | "id": "JxUZ9xGfSY7X"
246 | },
247 | "source": [
248 | "model = LinearRegression().fit(x, y)\n"
249 | ],
250 | "execution_count": 7,
251 | "outputs": []
252 | },
253 | {
254 | "cell_type": "markdown",
255 | "metadata": {
256 | "id": "AuwskBxFSefI"
257 | },
258 | "source": [
259 | "This statement does the same thing as the previous two. It’s just shorter.\n",
260 | "\n",
261 | "Step 4: Get results\n",
262 | "\n",
263 | "Once you have your model fitted, you can get the results to check whether the model works satisfactorily and interpret it.\n",
264 | "\n",
265 | "You can obtain the coefficient of determination (𝑅²) with .score() called on model:\n",
266 | "\n"
267 | ]
268 | },
269 | {
270 | "cell_type": "code",
271 | "metadata": {
272 | "colab": {
273 | "base_uri": "https://localhost:8080/"
274 | },
275 | "id": "hWbBmHSuSizm",
276 | "outputId": "e0a0b6de-9a24-4001-de96-a6ffe8cbcb17"
277 | },
278 | "source": [
279 | "r_sq = model.score(x, y)\n",
280 | "print('coefficient of determination:', r_sq)"
281 | ],
282 | "execution_count": 8,
283 | "outputs": [
284 | {
285 | "output_type": "stream",
286 | "text": [
287 | "coefficient of determination: 0.7158756137479542\n"
288 | ],
289 | "name": "stdout"
290 | }
291 | ]
292 | },
293 | {
294 | "cell_type": "markdown",
295 | "metadata": {
296 | "id": "TpPguGnKSn0g"
297 | },
298 | "source": [
299 | "When you’re applying .score(), the arguments are also the predictor x and regressor y, and the return value is 𝑅².\n",
300 | "\n",
301 | "The attributes of model are .intercept_, which represents the coefficient, 𝑏₀ and .coef_, which represents 𝑏₁:\n",
302 | "\n"
303 | ]
304 | },
305 | {
306 | "cell_type": "code",
307 | "metadata": {
308 | "colab": {
309 | "base_uri": "https://localhost:8080/"
310 | },
311 | "id": "_2zCoX2ESoXf",
312 | "outputId": "f41cb5f2-9118-46e5-b182-3cca82147159"
313 | },
314 | "source": [
315 | "print('intercept:', model.intercept_)"
316 | ],
317 | "execution_count": 9,
318 | "outputs": [
319 | {
320 | "output_type": "stream",
321 | "text": [
322 | "intercept: 5.633333333333329\n"
323 | ],
324 | "name": "stdout"
325 | }
326 | ]
327 | },
328 | {
329 | "cell_type": "code",
330 | "metadata": {
331 | "colab": {
332 | "base_uri": "https://localhost:8080/"
333 | },
334 | "id": "4ZoM6GZzStHh",
335 | "outputId": "e864e4a9-dc50-4137-d8e3-b368baea6b41"
336 | },
337 | "source": [
338 | "print('slope:', model.coef_)"
339 | ],
340 | "execution_count": 10,
341 | "outputs": [
342 | {
343 | "output_type": "stream",
344 | "text": [
345 | "slope: [0.54]\n"
346 | ],
347 | "name": "stdout"
348 | }
349 | ]
350 | },
351 | {
352 | "cell_type": "markdown",
353 | "metadata": {
354 | "id": "71WNbSXyTDb9"
355 | },
356 | "source": [
357 | "The code above illustrates how to get 𝑏₀ and 𝑏₁. You can notice that .intercept_ is a scalar, while .coef_ is an array.\n",
358 | "\n",
359 | "The value 𝑏₀ = 5.63 (approximately) illustrates that your model predicts the response 5.63 when 𝑥 is zero. The value 𝑏₁ = 0.54 means that the predicted response rises by 0.54 when 𝑥 is increased by one.\n",
360 | "\n",
361 | "Step 5: Predict response\n",
362 | "\n",
363 | "Once there is a satisfactory model, you can use it for predictions with either existing or new data.\n",
364 | "\n",
365 | "To obtain the predicted response, use .predict():\n",
366 | "\n"
367 | ]
368 | },
369 | {
370 | "cell_type": "code",
371 | "metadata": {
372 | "colab": {
373 | "base_uri": "https://localhost:8080/"
374 | },
375 | "id": "bUZXGdoTTJyi",
376 | "outputId": "66ef84c0-9d14-4375-f48b-302542939858"
377 | },
378 | "source": [
379 | "y_pred = model.predict(x)\n",
380 | "print('predicted response:', y_pred, sep='\\n')"
381 | ],
382 | "execution_count": 11,
383 | "outputs": [
384 | {
385 | "output_type": "stream",
386 | "text": [
387 | "predicted response:\n",
388 | "[ 8.33333333 13.73333333 19.13333333 24.53333333 29.93333333 35.33333333]\n"
389 | ],
390 | "name": "stdout"
391 | }
392 | ]
393 | },
394 | {
395 | "cell_type": "markdown",
396 | "metadata": {
397 | "id": "pRwt8lkFTUn3"
398 | },
399 | "source": [
400 | "When applying .predict(), you pass the regressor as the argument and get the corresponding predicted response.\n",
401 | "\n"
402 | ]
403 | },
404 | {
405 | "cell_type": "code",
406 | "metadata": {
407 | "colab": {
408 | "base_uri": "https://localhost:8080/"
409 | },
410 | "id": "79BEE-HjXwCg",
411 | "outputId": "8a0b8ced-85dc-4a3c-eb3b-f5d03acab900"
412 | },
413 | "source": [
414 | "print(y)"
415 | ],
416 | "execution_count": 16,
417 | "outputs": [
418 | {
419 | "output_type": "stream",
420 | "text": [
421 | "[ 5 20 14 32 22 38]\n"
422 | ],
423 | "name": "stdout"
424 | }
425 | ]
426 | },
427 | {
428 | "cell_type": "code",
429 | "metadata": {
430 | "colab": {
431 | "base_uri": "https://localhost:8080/"
432 | },
433 | "id": "BSDpDvcGXyu8",
434 | "outputId": "0fbbdace-6a71-4706-a1b6-361ff5179bb5"
435 | },
436 | "source": [
437 | "print(y_pred)"
438 | ],
439 | "execution_count": 17,
440 | "outputs": [
441 | {
442 | "output_type": "stream",
443 | "text": [
444 | "[ 8.33333333 13.73333333 19.13333333 24.53333333 29.93333333 35.33333333]\n"
445 | ],
446 | "name": "stdout"
447 | }
448 | ]
449 | }
450 | ]
451 | }
452 |
--------------------------------------------------------------------------------
/Regression/3_exercise_salary_prediction.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "3.exercise_salary_prediction",
7 | "provenance": [],
8 | "authorship_tag": "ABX9TyO87HEXpQzTXEAb3YMgRcjT",
9 | "include_colab_link": true
10 | },
11 | "kernelspec": {
12 | "name": "python3",
13 | "display_name": "Python 3"
14 | }
15 | },
16 | "cells": [
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {
20 | "id": "view-in-github",
21 | "colab_type": "text"
22 | },
23 | "source": [
24 | "
"
25 | ]
26 | },
27 | {
28 | "cell_type": "markdown",
29 | "metadata": {
30 | "id": "MKEi27voZrus"
31 | },
32 | "source": [
33 | "In this exercise, you are going to develop a regression model to estimate the salary based on the years of experience.\n",
34 | "You can refer to the dataset here:\n",
35 | "\n",
36 | "https://www.kaggle.com/vihansp/salary-data"
37 | ]
38 | },
39 | {
40 | "cell_type": "code",
41 | "metadata": {
42 | "id": "giw0Es9onfgS"
43 | },
44 | "source": [
45 | "import pandas as pd\n",
46 | "import numpy as np\n",
47 | "import matplotlib.pyplot as plt\n",
48 | "\n",
49 | "from sklearn.model_selection import train_test_split\n",
50 | "from sklearn.linear_model import LinearRegression \n"
51 | ],
52 | "execution_count": null,
53 | "outputs": []
54 | },
55 | {
56 | "cell_type": "code",
57 | "metadata": {
58 | "id": "PQWvgRzDnkeE"
59 | },
60 | "source": [
61 | "#read the dataset\n",
62 | "#show first 5 rows\n"
63 | ],
64 | "execution_count": null,
65 | "outputs": []
66 | },
67 | {
68 | "cell_type": "code",
69 | "metadata": {
70 | "id": "BRc9A_Slns3d"
71 | },
72 | "source": [
73 | "#develop your regression model\n",
74 | "\n",
75 | "#plot your results \n"
76 | ],
77 | "execution_count": null,
78 | "outputs": []
79 | }
80 | ]
81 | }
--------------------------------------------------------------------------------
/Regression/datasets/test_scores.csv:
--------------------------------------------------------------------------------
1 | y,x1,x2,x3,
2 | 88,86,110,100,
3 | 80,62,97,99,
4 | 96,110,107,103,
5 | 76,101,117,93,
6 | 80,100,101,95,
7 | 73,78,85,95,
8 | 58,120,77,80,
9 | 116,105,122,116,
10 | 104,112,119,106,
11 | 99,120,89,105,
12 | 64,87,81,90,
13 | 126,133,120,113,
14 | 94,140,121,96,
15 | 71,84,113,98,
16 | 111,106,102,109,
17 | 109,109,129,102,
18 | 100,104,83,100,
19 | 127,150,118,107,
20 | 99,98,125,108,
21 | 82,120,94,95,
22 | 67,74,121,91,
23 | 109,96,114,114,
24 | 78,104,73,93,
25 | 115,94,121,115,
26 | 83,91,129,9,
27 |
--------------------------------------------------------------------------------
/Regression/exercise_solution_salary_regression.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "exercise_solution_salary_regression",
7 | "provenance": [],
8 | "authorship_tag": "ABX9TyOZavTiG0zpay8+5n+9rkAx",
9 | "include_colab_link": true
10 | },
11 | "kernelspec": {
12 | "name": "python3",
13 | "display_name": "Python 3"
14 | }
15 | },
16 | "cells": [
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {
20 | "id": "view-in-github",
21 | "colab_type": "text"
22 | },
23 | "source": [
24 | "
"
25 | ]
26 | },
27 | {
28 | "cell_type": "markdown",
29 | "metadata": {
30 | "id": "MKEi27voZrus"
31 | },
32 | "source": [
33 | "In this exercise, you are going to develop a regression model to predict the salary based on the years of experience.\n",
34 | "You can refer to the dataset here:\n",
35 | "\n",
36 | "https://www.kaggle.com/vihansp/salary-data"
37 | ]
38 | },
39 | {
40 | "cell_type": "code",
41 | "metadata": {
42 | "id": "giw0Es9onfgS"
43 | },
44 | "source": [
45 | "import pandas as pd\n",
46 | "import numpy as np\n",
47 | "import matplotlib.pyplot as plt\n",
48 | "\n",
49 | "from sklearn.model_selection import train_test_split\n",
50 | "from sklearn.linear_model import LinearRegression \n"
51 | ],
52 | "execution_count": 1,
53 | "outputs": []
54 | },
55 | {
56 | "cell_type": "code",
57 | "metadata": {
58 | "colab": {
59 | "base_uri": "https://localhost:8080/",
60 | "height": 206
61 | },
62 | "id": "PQWvgRzDnkeE",
63 | "outputId": "c6bc2353-e18b-4bbe-a64c-9c4f120a1e7f"
64 | },
65 | "source": [
66 | "df = pd.read_csv(\"Salary_Data.csv\")\n",
67 | "df.head()\n"
68 | ],
69 | "execution_count": 2,
70 | "outputs": [
71 | {
72 | "output_type": "execute_result",
73 | "data": {
74 | "text/html": [
75 | "\n",
76 | "\n",
89 | "
\n",
90 | " \n",
91 | " \n",
92 | " | \n",
93 | " YearsExperience | \n",
94 | " Salary | \n",
95 | "
\n",
96 | " \n",
97 | " \n",
98 | " \n",
99 | " 0 | \n",
100 | " 1.1 | \n",
101 | " 39343.0 | \n",
102 | "
\n",
103 | " \n",
104 | " 1 | \n",
105 | " 1.3 | \n",
106 | " 46205.0 | \n",
107 | "
\n",
108 | " \n",
109 | " 2 | \n",
110 | " 1.5 | \n",
111 | " 37731.0 | \n",
112 | "
\n",
113 | " \n",
114 | " 3 | \n",
115 | " 2.0 | \n",
116 | " 43525.0 | \n",
117 | "
\n",
118 | " \n",
119 | " 4 | \n",
120 | " 2.2 | \n",
121 | " 39891.0 | \n",
122 | "
\n",
123 | " \n",
124 | "
\n",
125 | "
"
126 | ],
127 | "text/plain": [
128 | " YearsExperience Salary\n",
129 | "0 1.1 39343.0\n",
130 | "1 1.3 46205.0\n",
131 | "2 1.5 37731.0\n",
132 | "3 2.0 43525.0\n",
133 | "4 2.2 39891.0"
134 | ]
135 | },
136 | "metadata": {},
137 | "execution_count": 2
138 | }
139 | ]
140 | },
141 | {
142 | "cell_type": "code",
143 | "metadata": {
144 | "colab": {
145 | "base_uri": "https://localhost:8080/",
146 | "height": 295
147 | },
148 | "id": "BRc9A_Slns3d",
149 | "outputId": "8549a04b-8c74-424e-dfd2-6ed650e2a998"
150 | },
151 | "source": [
152 | "experience =df['YearsExperience']\n",
153 | "price = df['Salary']\n",
154 | "x = np.array(experience).reshape(-1, 1)\n",
155 | "y = np.array(price)\n",
156 | "xtrain, xtest, ytrain, ytest = train_test_split(x,y,test_size=1/3, random_state=0)\n",
157 | "regressor = LinearRegression()\n",
158 | "regressor.fit(xtrain, ytrain)\n",
159 | "\n",
160 | "#Predicting the prices\n",
161 | "pred = regressor.predict(xtest)\n",
162 | "#Visualizing the Test Results \n",
163 | "plt.scatter(xtest, ytest, color= 'red')\n",
164 | "plt.plot(xtrain, regressor.predict(xtrain), color = 'blue')\n",
165 | "plt.title(\"Visuals for Test DataSet\")\n",
166 | "plt.xlabel(\"experience\")\n",
167 | "plt.ylabel(\"Price\")\n",
168 | "plt.show()"
169 | ],
170 | "execution_count": 4,
171 | "outputs": [
172 | {
173 | "output_type": "display_data",
174 | "data": {
175 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZcAAAEWCAYAAACqitpwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deZhcVZ3/8feHDgE67CYgJCSNBtCAotADuA4PRBJk1WEGnFbj/HAyI6LjgiiCG4K7MKIIBOIYJLIYFyKIJBNxl6UDTCQsEiArCYSEBJJgSNLf3x/3dLqqu7rT6a6qW9X9eT1PPV331F1OFaE//T333lOKCMzMzMpph7w7YGZmA4/DxczMys7hYmZmZedwMTOzsnO4mJlZ2TlczMys7BwuVjckzZd0bIWPEZLG9mG7SyQ9J2lFJfplVm8cLlYTJP1a0sUl2k+TtELSkIg4NCJ+m0P3eiRpNPBJYFxEvLK/+5K0ruARktYXLL+tD/tcKGl8D68fK6mt4BhLJd0i6R+24xhflHTDdvbrs5KeKjjmzb3c7gOS/rg9x7Lqc7hYrZgGvFeSOrW/D5geEZtz6FNv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dk5XMzMrOz+P8WNguWXOnvsAAAAAElFTkSuQmCC\n",
176 | "text/plain": [
177 | ""
178 | ]
179 | },
180 | "metadata": {
181 | "needs_background": "light"
182 | }
183 | }
184 | ]
185 | }
186 | ]
187 | }
--------------------------------------------------------------------------------
/property_data.csv:
--------------------------------------------------------------------------------
1 | PID,ST_NUM,ST_NAME,OWN_OCCUPIED,NUM_BEDROOMS,NUM_BATH,SQ_FT
2 | 100001000,104,PUTNAM,Y,3,1,1000
3 | 100002000,197,LEXINGTON,N,3,1.5,--
4 | 100003000,,LEXINGTON,N,n/a,1,850
5 | 100004000,201,BERKELEY,12,1,NaN,700
6 | ,203,BERKELEY,Y,3,2,1600
7 | 100006000,207,BERKELEY,Y,NA,1,800
8 | 100007000,NA,WASHINGTON,,2,HURLEY,950
9 | 100008000,213,TREMONT,Y,--,1,
10 | 100009000,215,TREMONT,Y,na,2,1800
11 |
--------------------------------------------------------------------------------
/statistical inference/2_Intro_Statistical_Significance.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "2.Intro_Statistical Significance.ipynb",
7 | "provenance": [],
8 | "authorship_tag": "ABX9TyMiK7c8f/jP5IahcKp8NgXy",
9 | "include_colab_link": true
10 | },
11 | "kernelspec": {
12 | "name": "python3",
13 | "display_name": "Python 3"
14 | }
15 | },
16 | "cells": [
17 | {
18 | "cell_type": "markdown",
19 | "metadata": {
20 | "id": "view-in-github",
21 | "colab_type": "text"
22 | },
23 | "source": [
24 | "
"
25 | ]
26 | },
27 | {
28 | "cell_type": "markdown",
29 | "metadata": {
30 | "id": "sArH8P8qQuGD"
31 | },
32 | "source": [
33 | "#What is Statistical Significance Test?\n",
34 | "In statistics, statistical significance means that the result that was produced has a reason behind it, it was not produced randomly, or by chance.\n",
35 | "\n",
36 | "SciPy provides us with a module called scipy.stats, which has functions for performing statistical significance tests.\n",
37 | "\n",
38 | "Here are some techniques and keywords that are important when performing such tests:\n",
39 | "\n",
40 | "\n"
41 | ]
42 | },
43 | {
44 | "cell_type": "markdown",
45 | "metadata": {
46 | "id": "_GcQvp7CQ0mG"
47 | },
48 | "source": [
49 | "#Hypothesis in Statistics\n",
50 | "Hypothesis is an assumption about a parameter in population.\n",
51 | "\n",
52 | "**Null Hypothesis**\n",
53 | "It assumes that the observation is not stastically significant.\n",
54 | "\n",
55 | "Alternate Hypothesis **bold text**\n",
56 | "It assumes that the observations are due to some reason.\n",
57 | "\n",
58 | "Its alternate to Null Hypothesis.\n",
59 | "\n",
60 | "Example:\n",
61 | "**bold text**\n",
62 | "For an assessment of a student we would take:\n",
63 | "\n",
64 | "\"student is worse than average\" - as a null hypothesis, and:\n",
65 | "\n",
66 | "\"student is better than average\" - as an alternate hypothesis.\n",
67 | "\n"
68 | ]
69 | },
70 | {
71 | "cell_type": "markdown",
72 | "metadata": {
73 | "id": "nsa9ptA6Q_xi"
74 | },
75 | "source": [
76 | "**One tailed test**\n",
77 | "When our hypothesis is testing for one side of the value only, it is called \"one tailed test\".\n",
78 | "\n",
79 | "**Example:**\n",
80 | "\n",
81 | "For the null hypothesis:\n",
82 | "\n",
83 | "\"the mean is equal to k\", we can have alternate hypothesis:\n",
84 | "\n",
85 | "\"the mean is less than k\", or:\n",
86 | "\n",
87 | "\"the mean is greater than k\"\n",
88 | "\n",
89 | "**Two tailed test**\n",
90 | "When our hypothesis is testing for both side of the values.\n",
91 | "\n",
92 | "**Example:**\n",
93 | "\n",
94 | "For the null hypothesis:\n",
95 | "\n",
96 | "\"the mean is equal to k\", we can have alternate hypothesis:\n",
97 | "\n",
98 | "\"the mean is not equal to k\"\n",
99 | "\n",
100 | "In this case the mean is less than, or greater than k, and both sides are to be checked.\n",
101 | "\n",
102 | "**Alpha value**\n",
103 | "Alpha value is the level of significance.\n",
104 | "\n",
105 | "**Example:**\n",
106 | "\n",
107 | "How close to extremes the data must be for null hypothesis to be rejected.\n",
108 | "\n",
109 | "It is usually taken as 0.01, 0.05, or 0.1.\n",
110 | "\n",
111 | "**P value**\n",
112 | "P value tells how close to extreme the data actually is.\n",
113 | "\n",
114 | "P value and alpha values are compared to establish the statistical significance.\n",
115 | "\n",
116 | "If p value <= alpha we reject the null hypothesis and say that the data is statistically significant. otherwise we accept the null hypothesis.\n",
117 | "\n",
118 | "**T-Test**\n",
119 | "T-tests are used to determine if there is significant deference between means of two variables. and lets us know if they belong to the same distribution.\n",
120 | "\n",
121 | "It is a two tailed test.\n",
122 | "\n",
123 | "The function ttest_ind() takes two samples of same size and produces a tuple of t-statistic and p-value.\n",
124 | "\n"
125 | ]
126 | },
127 | {
128 | "cell_type": "code",
129 | "metadata": {
130 | "colab": {
131 | "base_uri": "https://localhost:8080/"
132 | },
133 | "id": "yM_qh5ahQtSw",
134 | "outputId": "ac292ddf-54b6-4a1e-9fd4-b82a8f4f0b10"
135 | },
136 | "source": [
137 | "import numpy as np\n",
138 | "from scipy.stats import ttest_ind\n",
139 | "\n",
140 | "v1 = np.random.normal(size=100)\n",
141 | "v2 = np.random.normal(size=100)\n",
142 | "\n",
143 | "res = ttest_ind(v1, v2)\n",
144 | "\n",
145 | "print(res)\n"
146 | ],
147 | "execution_count": null,
148 | "outputs": [
149 | {
150 | "output_type": "stream",
151 | "text": [
152 | "Ttest_indResult(statistic=0.5566647998739295, pvalue=0.5783850945111557)\n"
153 | ],
154 | "name": "stdout"
155 | }
156 | ]
157 | },
158 | {
159 | "cell_type": "markdown",
160 | "metadata": {
161 | "id": "m1zzcU2vRmhC"
162 | },
163 | "source": [
164 | "#Statistical Description of Data\n",
165 | "In order to see a summary of values in an array, we can use the describe() function.\n",
166 | "\n",
167 | "It returns the following description:\n",
168 | "\n",
169 | "number of observations (nobs)\n",
170 | "\n",
171 | "minimum and maximum values = minmax\n",
172 | "mean\n",
173 | "\n",
174 | "variance\n",
175 | "\n",
176 | "skewness\n",
177 | "\n",
178 | "kurtosis\n"
179 | ]
180 | },
181 | {
182 | "cell_type": "markdown",
183 | "metadata": {
184 | "id": "QpDYpqXIRvZG"
185 | },
186 | "source": [
187 | "#Example\n",
188 | "Show statistical description of the values in an array:\n",
189 | "\n"
190 | ]
191 | },
192 | {
193 | "cell_type": "code",
194 | "metadata": {
195 | "colab": {
196 | "base_uri": "https://localhost:8080/"
197 | },
198 | "id": "y12yEd_-RygJ",
199 | "outputId": "ff6820e2-4b1d-47b4-ea59-4b3732240dc4"
200 | },
201 | "source": [
202 | "import numpy as np\n",
203 | "from scipy.stats import describe\n",
204 | "\n",
205 | "v = np.random.normal(size=100)\n",
206 | "res = describe(v)\n",
207 | "\n",
208 | "print(res)\n"
209 | ],
210 | "execution_count": null,
211 | "outputs": [
212 | {
213 | "output_type": "stream",
214 | "text": [
215 | "DescribeResult(nobs=100, minmax=(-2.348827173624623, 2.122213435256136), mean=0.18895897716466467, variance=0.9446688393192286, skewness=-0.1616189550248015, kurtosis=-0.2844050162355951)\n"
216 | ],
217 | "name": "stdout"
218 | }
219 | ]
220 | },
221 | {
222 | "cell_type": "markdown",
223 | "metadata": {
224 | "id": "lWUDA6ilR3WW"
225 | },
226 | "source": [
227 | "#Normality Tests (Skewness and Kurtosis)\n",
228 | "Normality tests are based on the skewness and kurtosis.\n",
229 | "\n",
230 | "The normaltest() function returns p value for the null hypothesis:\n",
231 | "\n",
232 | "\"x comes from a normal distribution\".\n",
233 | "\n",
234 | "**Skewness**:\n",
235 | "A measure of symmetry in data.\n",
236 | "\n",
237 | "For normal distributions it is 0.\n",
238 | "\n",
239 | "If it is negative, it means the data is skewed left.\n",
240 | "\n",
241 | "If it is positive it means the data is skewed right.\n",
242 | "\n",
243 | "**Kurtosis**:\n",
244 | "A measure of whether the data is heavy or lightly tailed to a normal distribution.\n",
245 | "\n",
246 | "Positive kurtosis means heavy tailed.\n",
247 | "\n",
248 | "Negative kurtosis means lightly tailed.\n",
249 | "\n"
250 | ]
251 | },
252 | {
253 | "cell_type": "code",
254 | "metadata": {
255 | "colab": {
256 | "base_uri": "https://localhost:8080/"
257 | },
258 | "id": "Trmk3a86R9TW",
259 | "outputId": "594a9a85-1560-478c-a931-7ac9bedb25bf"
260 | },
261 | "source": [
262 | "import numpy as np\n",
263 | "from scipy.stats import skew, kurtosis\n",
264 | "\n",
265 | "v = np.random.normal(size=100)\n",
266 | "\n",
267 | "print(skew(v))\n",
268 | "print(kurtosis(v))\n"
269 | ],
270 | "execution_count": null,
271 | "outputs": [
272 | {
273 | "output_type": "stream",
274 | "text": [
275 | "-0.0728772708941296\n",
276 | "0.011571041356296163\n"
277 | ],
278 | "name": "stdout"
279 | }
280 | ]
281 | },
282 | {
283 | "cell_type": "markdown",
284 | "metadata": {
285 | "id": "JMvOcxxfSB56"
286 | },
287 | "source": [
288 | "#Example\n",
289 | "Find if the data comes from a normal distribution:\n",
290 | "\n"
291 | ]
292 | },
293 | {
294 | "cell_type": "code",
295 | "metadata": {
296 | "id": "URJA447uSEhO",
297 | "colab": {
298 | "base_uri": "https://localhost:8080/"
299 | },
300 | "outputId": "1f883619-e772-49fe-bc4b-8890943fc581"
301 | },
302 | "source": [
303 | "import numpy as np\n",
304 | "from scipy.stats import normaltest\n",
305 | "\n",
306 | "v = np.random.normal(size=100)\n",
307 | "\n",
308 | "print(normaltest(v))\n"
309 | ],
310 | "execution_count": null,
311 | "outputs": [
312 | {
313 | "output_type": "stream",
314 | "text": [
315 | "NormaltestResult(statistic=3.0849789590398506, pvalue=0.21384806782891935)\n"
316 | ],
317 | "name": "stdout"
318 | }
319 | ]
320 | }
321 | ]
322 | }
--------------------------------------------------------------------------------