├── LICENSE ├── Session-01_07-08-23_Preprocessing-EDA ├── Housing.csv ├── NumpyAndPandas.ipynb ├── PreprocessingAndEDA.ipynb └── train.csv ├── Session-02_14-08-23_Linear-Regression ├── 14th_August_2023.ipynb └── 14th_August_2023.pdf ├── Session-03_01-09-23_MLE_Bayesian ├── ML_TA_31st_August.ipynb ├── Regularisation, Gaussian, MLE..pdf └── auto-mpg.csv ├── Session-04_08-09-23_Bayes_LogisticRegression_KMeans_KNN ├── BankNote_Authentication.csv ├── ML_TASession4.ipynb └── Naive Bayes, Logistic Regression, KNNs and KMeans.pptx ├── Session-05_19-09-23_PCA_and_Decision_Trees ├── PCA and Decision Trees.pptx ├── kernel_pca.ipynb ├── models.ipynb ├── pca.ipynb └── titanic │ ├── gender_submission.csv │ ├── test.csv │ └── train.csv ├── Session-06_14-10-23_DecisionTrees_RandomForests_Boosting ├── Boosting.ipynb ├── Boosting_hyperparameter_tuning.ipynb ├── DT_RF_Boosting.pptx └── DecisionTreesRandomForest.ipynb ├── Session-07_30-10-23_ConstrainedOptimisation └── Constrained_Optimization_KKT.pdf ├── Session-08_06-11-23_SVM ├── SVM.ipynb └── Support Vector Machines.pdf └── Session-09_20-11-23_NeuralNetworks_PyTorch ├── NeuralNetworks.pdf └── pytorch-mnist-example.ipynb /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 sarthakharne 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Session-01_07-08-23_Preprocessing-EDA/Housing.csv: -------------------------------------------------------------------------------- 1 | price,area,bedrooms,bathrooms,stories,mainroad,guestroom,basement,hotwaterheating,airconditioning,parking,prefarea,furnishingstatus 2 | 13300000,7420,4,2,3,yes,no,no,no,yes,2,yes,furnished 3 | 12250000,8960,4,4,4,yes,no,no,no,yes,3,no,furnished 4 | 12250000,9960,3,2,2,yes,no,yes,no,no,2,yes,semi-furnished 5 | 12215000,7500,4,2,2,yes,no,yes,no,yes,3,yes,furnished 6 | 11410000,7420,4,1,2,yes,yes,yes,no,yes,2,no,furnished 7 | 10850000,7500,3,3,1,yes,no,yes,no,yes,2,yes,semi-furnished 8 | 10150000,8580,4,3,4,yes,no,no,no,yes,2,yes,semi-furnished 9 | 10150000,16200,5,3,2,yes,no,no,no,no,0,no,unfurnished 10 | 9870000,8100,4,1,2,yes,yes,yes,no,yes,2,yes,furnished 11 | 9800000,5750,3,2,4,yes,yes,no,no,yes,1,yes,unfurnished 12 | 9800000,13200,3,1,2,yes,no,yes,no,yes,2,yes,furnished 13 | 9681000,6000,4,3,2,yes,yes,yes,yes,no,2,no,semi-furnished 14 | 9310000,6550,4,2,2,yes,no,no,no,yes,1,yes,semi-furnished 15 | 9240000,3500,4,2,2,yes,no,no,yes,no,2,no,furnished 16 | 9240000,7800,3,2,2,yes,no,no,no,no,0,yes,semi-furnished 17 | 9100000,6000,4,1,2,yes,no,yes,no,no,2,no,semi-furnished 18 | 9100000,6600,4,2,2,yes,yes,yes,no,yes,1,yes,unfurnished 19 | 8960000,8500,3,2,4,yes,no,no,no,yes,2,no,furnished 20 | 8890000,4600,3,2,2,yes,yes,no,no,yes,2,no,furnished 21 | 8855000,6420,3,2,2,yes,no,no,no,yes,1,yes,semi-furnished 22 | 8750000,4320,3,1,2,yes,no,yes,yes,no,2,no,semi-furnished 23 | 8680000,7155,3,2,1,yes,yes,yes,no,yes,2,no,unfurnished 24 | 8645000,8050,3,1,1,yes,yes,yes,no,yes,1,no,furnished 25 | 8645000,4560,3,2,2,yes,yes,yes,no,yes,1,no,furnished 26 | 8575000,8800,3,2,2,yes,no,no,no,yes,2,no,furnished 27 | 8540000,6540,4,2,2,yes,yes,yes,no,yes,2,yes,furnished 28 | 8463000,6000,3,2,4,yes,yes,yes,no,yes,0,yes,semi-furnished 29 | 8400000,8875,3,1,1,yes,no,no,no,no,1,no,semi-furnished 30 | 8400000,7950,5,2,2,yes,no,yes,yes,no,2,no,unfurnished 31 | 8400000,5500,4,2,2,yes,no,yes,no,yes,1,yes,semi-furnished 32 | 8400000,7475,3,2,4,yes,no,no,no,yes,2,no,unfurnished 33 | 8400000,7000,3,1,4,yes,no,no,no,yes,2,no,semi-furnished 34 | 8295000,4880,4,2,2,yes,no,no,no,yes,1,yes,furnished 35 | 8190000,5960,3,3,2,yes,yes,yes,no,no,1,no,unfurnished 36 | 8120000,6840,5,1,2,yes,yes,yes,no,yes,1,no,furnished 37 | 8080940,7000,3,2,4,yes,no,no,no,yes,2,no,furnished 38 | 8043000,7482,3,2,3,yes,no,no,yes,no,1,yes,furnished 39 | 7980000,9000,4,2,4,yes,no,no,no,yes,2,no,furnished 40 | 7962500,6000,3,1,4,yes,yes,no,no,yes,2,no,unfurnished 41 | 7910000,6000,4,2,4,yes,no,no,no,yes,1,no,semi-furnished 42 | 7875000,6550,3,1,2,yes,no,yes,no,yes,0,yes,furnished 43 | 7840000,6360,3,2,4,yes,no,no,no,yes,0,yes,furnished 44 | 7700000,6480,3,2,4,yes,no,no,no,yes,2,no,unfurnished 45 | 7700000,6000,4,2,4,yes,no,no,no,no,2,no,semi-furnished 46 | 7560000,6000,4,2,4,yes,no,no,no,yes,1,no,furnished 47 | 7560000,6000,3,2,3,yes,no,no,no,yes,0,no,semi-furnished 48 | 7525000,6000,3,2,4,yes,no,no,no,yes,1,no,furnished 49 | 7490000,6600,3,1,4,yes,no,no,no,yes,3,yes,furnished 50 | 7455000,4300,3,2,2,yes,no,yes,no,no,1,no,unfurnished 51 | 7420000,7440,3,2,1,yes,yes,yes,no,yes,0,yes,semi-furnished 52 | 7420000,7440,3,2,4,yes,no,no,no,no,1,yes,unfurnished 53 | 7420000,6325,3,1,4,yes,no,no,no,yes,1,no,unfurnished 54 | 7350000,6000,4,2,4,yes,yes,no,no,yes,1,no,furnished 55 | 7350000,5150,3,2,4,yes,no,no,no,yes,2,no,semi-furnished 56 | 7350000,6000,3,2,2,yes,yes,no,no,yes,1,no,semi-furnished 57 | 7350000,6000,3,1,2,yes,no,no,no,yes,1,no,unfurnished 58 | 7343000,11440,4,1,2,yes,no,yes,no,no,1,yes,semi-furnished 59 | 7245000,9000,4,2,4,yes,yes,no,no,yes,1,yes,furnished 60 | 7210000,7680,4,2,4,yes,yes,no,no,yes,1,no,semi-furnished 61 | 7210000,6000,3,2,4,yes,yes,no,no,yes,1,no,furnished 62 | 7140000,6000,3,2,2,yes,yes,no,no,no,1,no,semi-furnished 63 | 7070000,8880,2,1,1,yes,no,no,no,yes,1,no,semi-furnished 64 | 7070000,6240,4,2,2,yes,no,no,no,yes,1,no,furnished 65 | 7035000,6360,4,2,3,yes,no,no,no,yes,2,yes,furnished 66 | 7000000,11175,3,1,1,yes,no,yes,no,yes,1,yes,furnished 67 | 6930000,8880,3,2,2,yes,no,yes,no,yes,1,no,furnished 68 | 6930000,13200,2,1,1,yes,no,yes,yes,no,1,no,furnished 69 | 6895000,7700,3,2,1,yes,no,no,no,no,2,no,unfurnished 70 | 6860000,6000,3,1,1,yes,no,no,no,yes,1,no,furnished 71 | 6790000,12090,4,2,2,yes,no,no,no,no,2,yes,furnished 72 | 6790000,4000,3,2,2,yes,no,yes,no,yes,0,yes,semi-furnished 73 | 6755000,6000,4,2,4,yes,no,no,no,yes,0,no,unfurnished 74 | 6720000,5020,3,1,4,yes,no,no,no,yes,0,yes,unfurnished 75 | 6685000,6600,2,2,4,yes,no,yes,no,no,0,yes,furnished 76 | 6650000,4040,3,1,2,yes,no,yes,yes,no,1,no,furnished 77 | 6650000,4260,4,2,2,yes,no,no,yes,no,0,no,semi-furnished 78 | 6650000,6420,3,2,3,yes,no,no,no,yes,0,yes,furnished 79 | 6650000,6500,3,2,3,yes,no,no,no,yes,0,yes,furnished 80 | 6650000,5700,3,1,1,yes,yes,yes,no,yes,2,yes,furnished 81 | 6650000,6000,3,2,3,yes,yes,no,no,yes,0,no,furnished 82 | 6629000,6000,3,1,2,yes,no,no,yes,no,1,yes,semi-furnished 83 | 6615000,4000,3,2,2,yes,no,yes,no,yes,1,no,semi-furnished 84 | 6615000,10500,3,2,1,yes,no,yes,no,yes,1,yes,furnished 85 | 6580000,6000,3,2,4,yes,no,no,no,yes,0,no,semi-furnished 86 | 6510000,3760,3,1,2,yes,no,no,yes,no,2,no,semi-furnished 87 | 6510000,8250,3,2,3,yes,no,no,no,yes,0,no,furnished 88 | 6510000,6670,3,1,3,yes,no,yes,no,no,0,yes,unfurnished 89 | 6475000,3960,3,1,1,yes,no,yes,no,no,2,no,semi-furnished 90 | 6475000,7410,3,1,1,yes,yes,yes,no,yes,2,yes,unfurnished 91 | 6440000,8580,5,3,2,yes,no,no,no,no,2,no,furnished 92 | 6440000,5000,3,1,2,yes,no,no,no,yes,0,no,semi-furnished 93 | 6419000,6750,2,1,1,yes,yes,yes,no,no,2,yes,furnished 94 | 6405000,4800,3,2,4,yes,yes,no,no,yes,0,no,furnished 95 | 6300000,7200,3,2,1,yes,no,yes,no,yes,3,no,semi-furnished 96 | 6300000,6000,4,2,4,yes,no,no,no,no,1,no,semi-furnished 97 | 6300000,4100,3,2,3,yes,no,no,no,yes,2,no,semi-furnished 98 | 6300000,9000,3,1,1,yes,no,yes,no,no,1,yes,furnished 99 | 6300000,6400,3,1,1,yes,yes,yes,no,yes,1,yes,semi-furnished 100 | 6293000,6600,3,2,3,yes,no,no,no,yes,0,yes,unfurnished 101 | 6265000,6000,4,1,3,yes,yes,yes,no,no,0,yes,unfurnished 102 | 6230000,6600,3,2,1,yes,no,yes,no,yes,0,yes,unfurnished 103 | 6230000,5500,3,1,3,yes,no,no,no,no,1,yes,unfurnished 104 | 6195000,5500,3,2,4,yes,yes,no,no,yes,1,no,semi-furnished 105 | 6195000,6350,3,2,3,yes,yes,no,no,yes,0,no,furnished 106 | 6195000,5500,3,2,1,yes,yes,yes,no,no,2,yes,furnished 107 | 6160000,4500,3,1,4,yes,no,no,no,yes,0,no,unfurnished 108 | 6160000,5450,4,2,1,yes,no,yes,no,yes,0,yes,semi-furnished 109 | 6125000,6420,3,1,3,yes,no,yes,no,no,0,yes,unfurnished 110 | 6107500,3240,4,1,3,yes,no,no,no,no,1,no,semi-furnished 111 | 6090000,6615,4,2,2,yes,yes,no,yes,no,1,no,semi-furnished 112 | 6090000,6600,3,1,1,yes,yes,yes,no,no,2,yes,semi-furnished 113 | 6090000,8372,3,1,3,yes,no,no,no,yes,2,no,unfurnished 114 | 6083000,4300,6,2,2,yes,no,no,no,no,0,no,furnished 115 | 6083000,9620,3,1,1,yes,no,yes,no,no,2,yes,furnished 116 | 6020000,6800,2,1,1,yes,yes,yes,no,no,2,no,furnished 117 | 6020000,8000,3,1,1,yes,yes,yes,no,yes,2,yes,semi-furnished 118 | 6020000,6900,3,2,1,yes,yes,yes,no,no,0,yes,unfurnished 119 | 5950000,3700,4,1,2,yes,yes,no,no,yes,0,no,furnished 120 | 5950000,6420,3,1,1,yes,no,yes,no,yes,0,yes,furnished 121 | 5950000,7020,3,1,1,yes,no,yes,no,yes,2,yes,semi-furnished 122 | 5950000,6540,3,1,1,yes,yes,yes,no,no,2,yes,furnished 123 | 5950000,7231,3,1,2,yes,yes,yes,no,yes,0,yes,semi-furnished 124 | 5950000,6254,4,2,1,yes,no,yes,no,no,1,yes,semi-furnished 125 | 5950000,7320,4,2,2,yes,no,no,no,no,0,no,furnished 126 | 5950000,6525,3,2,4,yes,no,no,no,no,1,no,furnished 127 | 5943000,15600,3,1,1,yes,no,no,no,yes,2,no,semi-furnished 128 | 5880000,7160,3,1,1,yes,no,yes,no,no,2,yes,unfurnished 129 | 5880000,6500,3,2,3,yes,no,no,no,yes,0,no,unfurnished 130 | 5873000,5500,3,1,3,yes,yes,no,no,yes,1,no,furnished 131 | 5873000,11460,3,1,3,yes,no,no,no,no,2,yes,semi-furnished 132 | 5866000,4800,3,1,1,yes,yes,yes,no,no,0,no,unfurnished 133 | 5810000,5828,4,1,4,yes,yes,no,no,no,0,no,semi-furnished 134 | 5810000,5200,3,1,3,yes,no,no,no,yes,0,no,semi-furnished 135 | 5810000,4800,3,1,3,yes,no,no,no,yes,0,no,unfurnished 136 | 5803000,7000,3,1,1,yes,no,yes,no,no,2,yes,semi-furnished 137 | 5775000,6000,3,2,4,yes,no,no,no,yes,0,no,unfurnished 138 | 5740000,5400,4,2,2,yes,no,no,no,yes,2,no,unfurnished 139 | 5740000,4640,4,1,2,yes,no,no,no,no,1,no,semi-furnished 140 | 5740000,5000,3,1,3,yes,no,no,no,yes,0,no,semi-furnished 141 | 5740000,6360,3,1,1,yes,yes,yes,no,yes,2,yes,furnished 142 | 5740000,5800,3,2,4,yes,no,no,no,yes,0,no,unfurnished 143 | 5652500,6660,4,2,2,yes,yes,yes,no,no,1,yes,semi-furnished 144 | 5600000,10500,4,2,2,yes,no,no,no,no,1,no,semi-furnished 145 | 5600000,4800,5,2,3,no,no,yes,yes,no,0,no,unfurnished 146 | 5600000,4700,4,1,2,yes,yes,yes,no,yes,1,no,furnished 147 | 5600000,5000,3,1,4,yes,no,no,no,no,0,no,furnished 148 | 5600000,10500,2,1,1,yes,no,no,no,no,1,no,semi-furnished 149 | 5600000,5500,3,2,2,yes,no,no,no,no,1,no,semi-furnished 150 | 5600000,6360,3,1,3,yes,no,no,no,no,0,yes,semi-furnished 151 | 5600000,6600,4,2,1,yes,no,yes,no,no,0,yes,semi-furnished 152 | 5600000,5136,3,1,2,yes,yes,yes,no,yes,0,yes,unfurnished 153 | 5565000,4400,4,1,2,yes,no,no,no,yes,2,yes,semi-furnished 154 | 5565000,5400,5,1,2,yes,yes,yes,no,yes,0,yes,furnished 155 | 5530000,3300,3,3,2,yes,no,yes,no,no,0,no,semi-furnished 156 | 5530000,3650,3,2,2,yes,no,no,no,no,2,no,semi-furnished 157 | 5530000,6100,3,2,1,yes,no,yes,no,no,2,yes,furnished 158 | 5523000,6900,3,1,1,yes,yes,yes,no,no,0,yes,semi-furnished 159 | 5495000,2817,4,2,2,no,yes,yes,no,no,1,no,furnished 160 | 5495000,7980,3,1,1,yes,no,no,no,no,2,no,semi-furnished 161 | 5460000,3150,3,2,1,yes,yes,yes,no,yes,0,no,furnished 162 | 5460000,6210,4,1,4,yes,yes,no,no,yes,0,no,furnished 163 | 5460000,6100,3,1,3,yes,yes,no,no,yes,0,yes,semi-furnished 164 | 5460000,6600,4,2,2,yes,yes,yes,no,no,0,yes,semi-furnished 165 | 5425000,6825,3,1,1,yes,yes,yes,no,yes,0,yes,semi-furnished 166 | 5390000,6710,3,2,2,yes,yes,yes,no,no,1,yes,furnished 167 | 5383000,6450,3,2,1,yes,yes,yes,yes,no,0,no,unfurnished 168 | 5320000,7800,3,1,1,yes,no,yes,no,yes,2,yes,unfurnished 169 | 5285000,4600,2,2,1,yes,no,no,no,yes,2,no,semi-furnished 170 | 5250000,4260,4,1,2,yes,no,yes,no,yes,0,no,furnished 171 | 5250000,6540,4,2,2,no,no,no,no,yes,0,no,semi-furnished 172 | 5250000,5500,3,2,1,yes,no,yes,no,no,0,no,semi-furnished 173 | 5250000,10269,3,1,1,yes,no,no,no,no,1,yes,semi-furnished 174 | 5250000,8400,3,1,2,yes,yes,yes,no,yes,2,yes,unfurnished 175 | 5250000,5300,4,2,1,yes,no,no,no,yes,0,yes,unfurnished 176 | 5250000,3800,3,1,2,yes,yes,yes,no,no,1,yes,unfurnished 177 | 5250000,9800,4,2,2,yes,yes,no,no,no,2,no,semi-furnished 178 | 5250000,8520,3,1,1,yes,no,no,no,yes,2,no,furnished 179 | 5243000,6050,3,1,1,yes,no,yes,no,no,0,yes,semi-furnished 180 | 5229000,7085,3,1,1,yes,yes,yes,no,no,2,yes,semi-furnished 181 | 5215000,3180,3,2,2,yes,no,no,no,no,2,no,semi-furnished 182 | 5215000,4500,4,2,1,no,no,yes,no,yes,2,no,semi-furnished 183 | 5215000,7200,3,1,2,yes,yes,yes,no,no,1,yes,furnished 184 | 5145000,3410,3,1,2,no,no,no,no,yes,0,no,semi-furnished 185 | 5145000,7980,3,1,1,yes,no,no,no,no,1,yes,semi-furnished 186 | 5110000,3000,3,2,2,yes,yes,yes,no,no,0,no,furnished 187 | 5110000,3000,3,1,2,yes,no,yes,no,no,0,no,unfurnished 188 | 5110000,11410,2,1,2,yes,no,no,no,no,0,yes,furnished 189 | 5110000,6100,3,1,1,yes,no,yes,no,yes,0,yes,semi-furnished 190 | 5075000,5720,2,1,2,yes,no,no,no,yes,0,yes,unfurnished 191 | 5040000,3540,2,1,1,no,yes,yes,no,no,0,no,semi-furnished 192 | 5040000,7600,4,1,2,yes,no,no,no,yes,2,no,furnished 193 | 5040000,10700,3,1,2,yes,yes,yes,no,no,0,no,semi-furnished 194 | 5040000,6600,3,1,1,yes,yes,yes,no,no,0,yes,furnished 195 | 5033000,4800,2,1,1,yes,yes,yes,no,no,0,no,semi-furnished 196 | 5005000,8150,3,2,1,yes,yes,yes,no,no,0,no,semi-furnished 197 | 4970000,4410,4,3,2,yes,no,yes,no,no,2,no,semi-furnished 198 | 4970000,7686,3,1,1,yes,yes,yes,yes,no,0,no,semi-furnished 199 | 4956000,2800,3,2,2,no,no,yes,no,yes,1,no,semi-furnished 200 | 4935000,5948,3,1,2,yes,no,no,no,yes,0,no,semi-furnished 201 | 4907000,4200,3,1,2,yes,no,no,no,no,1,no,furnished 202 | 4900000,4520,3,1,2,yes,no,yes,no,yes,0,no,semi-furnished 203 | 4900000,4095,3,1,2,no,yes,yes,no,yes,0,no,semi-furnished 204 | 4900000,4120,2,1,1,yes,no,yes,no,no,1,no,semi-furnished 205 | 4900000,5400,4,1,2,yes,no,no,no,no,0,no,semi-furnished 206 | 4900000,4770,3,1,1,yes,yes,yes,no,no,0,no,semi-furnished 207 | 4900000,6300,3,1,1,yes,no,no,no,yes,2,no,semi-furnished 208 | 4900000,5800,2,1,1,yes,yes,yes,no,yes,0,no,semi-furnished 209 | 4900000,3000,3,1,2,yes,no,yes,no,yes,0,no,semi-furnished 210 | 4900000,2970,3,1,3,yes,no,no,no,no,0,no,semi-furnished 211 | 4900000,6720,3,1,1,yes,no,no,no,no,0,no,unfurnished 212 | 4900000,4646,3,1,2,yes,yes,yes,no,no,2,no,semi-furnished 213 | 4900000,12900,3,1,1,yes,no,no,no,no,2,no,furnished 214 | 4893000,3420,4,2,2,yes,no,yes,no,yes,2,no,semi-furnished 215 | 4893000,4995,4,2,1,yes,no,yes,no,no,0,no,semi-furnished 216 | 4865000,4350,2,1,1,yes,no,yes,no,no,0,no,unfurnished 217 | 4830000,4160,3,1,3,yes,no,no,no,no,0,no,unfurnished 218 | 4830000,6040,3,1,1,yes,no,no,no,no,2,yes,semi-furnished 219 | 4830000,6862,3,1,2,yes,no,no,no,yes,2,yes,furnished 220 | 4830000,4815,2,1,1,yes,no,no,no,yes,0,yes,semi-furnished 221 | 4795000,7000,3,1,2,yes,no,yes,no,no,0,no,unfurnished 222 | 4795000,8100,4,1,4,yes,no,yes,no,yes,2,no,semi-furnished 223 | 4767000,3420,4,2,2,yes,no,no,no,no,0,no,semi-furnished 224 | 4760000,9166,2,1,1,yes,no,yes,no,yes,2,no,semi-furnished 225 | 4760000,6321,3,1,2,yes,no,yes,no,yes,1,no,furnished 226 | 4760000,10240,2,1,1,yes,no,no,no,yes,2,yes,unfurnished 227 | 4753000,6440,2,1,1,yes,no,no,no,yes,3,no,semi-furnished 228 | 4690000,5170,3,1,4,yes,no,no,no,yes,0,no,semi-furnished 229 | 4690000,6000,2,1,1,yes,no,yes,no,yes,1,no,furnished 230 | 4690000,3630,3,1,2,yes,no,no,no,no,2,no,semi-furnished 231 | 4690000,9667,4,2,2,yes,yes,yes,no,no,1,no,semi-furnished 232 | 4690000,5400,2,1,2,yes,no,no,no,no,0,yes,semi-furnished 233 | 4690000,4320,3,1,1,yes,no,no,no,no,0,yes,semi-furnished 234 | 4655000,3745,3,1,2,yes,no,yes,no,no,0,no,furnished 235 | 4620000,4160,3,1,1,yes,yes,yes,no,yes,0,no,unfurnished 236 | 4620000,3880,3,2,2,yes,no,yes,no,no,2,no,semi-furnished 237 | 4620000,5680,3,1,2,yes,yes,no,no,yes,1,no,semi-furnished 238 | 4620000,2870,2,1,2,yes,yes,yes,no,no,0,yes,semi-furnished 239 | 4620000,5010,3,1,2,yes,no,yes,no,no,0,no,semi-furnished 240 | 4613000,4510,4,2,2,yes,no,yes,no,no,0,no,semi-furnished 241 | 4585000,4000,3,1,2,yes,no,no,no,no,1,no,furnished 242 | 4585000,3840,3,1,2,yes,no,no,no,no,1,yes,semi-furnished 243 | 4550000,3760,3,1,1,yes,no,no,no,no,2,no,semi-furnished 244 | 4550000,3640,3,1,2,yes,no,no,no,yes,0,no,furnished 245 | 4550000,2550,3,1,2,yes,no,yes,no,no,0,no,furnished 246 | 4550000,5320,3,1,2,yes,yes,yes,no,no,0,yes,semi-furnished 247 | 4550000,5360,3,1,2,yes,no,no,no,no,2,yes,unfurnished 248 | 4550000,3520,3,1,1,yes,no,no,no,no,0,yes,semi-furnished 249 | 4550000,8400,4,1,4,yes,no,no,no,no,3,no,unfurnished 250 | 4543000,4100,2,2,1,yes,yes,yes,no,no,0,no,semi-furnished 251 | 4543000,4990,4,2,2,yes,yes,yes,no,no,0,yes,furnished 252 | 4515000,3510,3,1,3,yes,no,no,no,no,0,no,semi-furnished 253 | 4515000,3450,3,1,2,yes,no,yes,no,no,1,no,semi-furnished 254 | 4515000,9860,3,1,1,yes,no,no,no,no,0,no,semi-furnished 255 | 4515000,3520,2,1,2,yes,no,no,no,no,0,yes,furnished 256 | 4480000,4510,4,1,2,yes,no,no,no,yes,2,no,semi-furnished 257 | 4480000,5885,2,1,1,yes,no,no,no,yes,1,no,unfurnished 258 | 4480000,4000,3,1,2,yes,no,no,no,no,2,no,furnished 259 | 4480000,8250,3,1,1,yes,no,no,no,no,0,no,furnished 260 | 4480000,4040,3,1,2,yes,no,no,no,no,1,no,semi-furnished 261 | 4473000,6360,2,1,1,yes,no,yes,no,yes,1,no,furnished 262 | 4473000,3162,3,1,2,yes,no,no,no,yes,1,no,furnished 263 | 4473000,3510,3,1,2,yes,no,no,no,no,0,no,semi-furnished 264 | 4445000,3750,2,1,1,yes,yes,yes,no,no,0,no,semi-furnished 265 | 4410000,3968,3,1,2,no,no,no,no,no,0,no,semi-furnished 266 | 4410000,4900,2,1,2,yes,no,yes,no,no,0,no,semi-furnished 267 | 4403000,2880,3,1,2,yes,no,no,no,no,0,yes,semi-furnished 268 | 4403000,4880,3,1,1,yes,no,no,no,no,2,yes,unfurnished 269 | 4403000,4920,3,1,2,yes,no,no,no,no,1,no,semi-furnished 270 | 4382000,4950,4,1,2,yes,no,no,no,yes,0,no,semi-furnished 271 | 4375000,3900,3,1,2,yes,no,no,no,no,0,no,unfurnished 272 | 4340000,4500,3,2,3,yes,no,no,yes,no,1,no,furnished 273 | 4340000,1905,5,1,2,no,no,yes,no,no,0,no,semi-furnished 274 | 4340000,4075,3,1,1,yes,yes,yes,no,no,2,no,semi-furnished 275 | 4340000,3500,4,1,2,yes,no,no,no,no,2,no,furnished 276 | 4340000,6450,4,1,2,yes,no,no,no,no,0,no,semi-furnished 277 | 4319000,4032,2,1,1,yes,no,yes,no,no,0,no,furnished 278 | 4305000,4400,2,1,1,yes,no,no,no,no,1,no,semi-furnished 279 | 4305000,10360,2,1,1,yes,no,no,no,no,1,yes,semi-furnished 280 | 4277000,3400,3,1,2,yes,no,yes,no,no,2,yes,semi-furnished 281 | 4270000,6360,2,1,1,yes,no,no,no,no,0,no,furnished 282 | 4270000,6360,2,1,2,yes,no,no,no,no,0,no,unfurnished 283 | 4270000,4500,2,1,1,yes,no,no,no,yes,2,no,furnished 284 | 4270000,2175,3,1,2,no,yes,yes,no,yes,0,no,unfurnished 285 | 4270000,4360,4,1,2,yes,no,no,no,no,0,no,furnished 286 | 4270000,7770,2,1,1,yes,no,no,no,no,1,no,furnished 287 | 4235000,6650,3,1,2,yes,yes,no,no,no,0,no,semi-furnished 288 | 4235000,2787,3,1,1,yes,no,yes,no,no,0,yes,furnished 289 | 4200000,5500,3,1,2,yes,no,no,no,yes,0,no,unfurnished 290 | 4200000,5040,3,1,2,yes,no,yes,no,yes,0,no,unfurnished 291 | 4200000,5850,2,1,1,yes,yes,yes,no,no,2,no,semi-furnished 292 | 4200000,2610,4,3,2,no,no,no,no,no,0,no,semi-furnished 293 | 4200000,2953,3,1,2,yes,no,yes,no,yes,0,no,unfurnished 294 | 4200000,2747,4,2,2,no,no,no,no,no,0,no,semi-furnished 295 | 4200000,4410,2,1,1,no,no,no,no,no,1,no,unfurnished 296 | 4200000,4000,4,2,2,no,no,no,no,no,0,no,semi-furnished 297 | 4200000,2325,3,1,2,no,no,no,no,no,0,no,semi-furnished 298 | 4200000,4600,3,2,2,yes,no,no,no,yes,1,no,semi-furnished 299 | 4200000,3640,3,2,2,yes,no,yes,no,no,0,no,unfurnished 300 | 4200000,5800,3,1,1,yes,no,no,yes,no,2,no,semi-furnished 301 | 4200000,7000,3,1,1,yes,no,no,no,no,3,no,furnished 302 | 4200000,4079,3,1,3,yes,no,no,no,no,0,no,semi-furnished 303 | 4200000,3520,3,1,2,yes,no,no,no,no,0,yes,semi-furnished 304 | 4200000,2145,3,1,3,yes,no,no,no,no,1,yes,unfurnished 305 | 4200000,4500,3,1,1,yes,no,yes,no,no,0,no,furnished 306 | 4193000,8250,3,1,1,yes,no,yes,no,no,3,no,semi-furnished 307 | 4193000,3450,3,1,2,yes,no,no,no,no,1,no,semi-furnished 308 | 4165000,4840,3,1,2,yes,no,no,no,no,1,no,semi-furnished 309 | 4165000,4080,3,1,2,yes,no,no,no,no,2,no,semi-furnished 310 | 4165000,4046,3,1,2,yes,no,yes,no,no,1,no,semi-furnished 311 | 4130000,4632,4,1,2,yes,no,no,no,yes,0,no,semi-furnished 312 | 4130000,5985,3,1,1,yes,no,yes,no,no,0,no,semi-furnished 313 | 4123000,6060,2,1,1,yes,no,yes,no,no,1,no,semi-furnished 314 | 4098500,3600,3,1,1,yes,no,yes,no,yes,0,yes,furnished 315 | 4095000,3680,3,2,2,yes,no,no,no,no,0,no,semi-furnished 316 | 4095000,4040,2,1,2,yes,no,no,no,no,1,no,semi-furnished 317 | 4095000,5600,2,1,1,yes,no,no,no,yes,0,no,semi-furnished 318 | 4060000,5900,4,2,2,no,no,yes,no,no,1,no,unfurnished 319 | 4060000,4992,3,2,2,yes,no,no,no,no,2,no,unfurnished 320 | 4060000,4340,3,1,1,yes,no,no,no,no,0,no,semi-furnished 321 | 4060000,3000,4,1,3,yes,no,yes,no,yes,2,no,semi-furnished 322 | 4060000,4320,3,1,2,yes,no,no,no,no,2,yes,furnished 323 | 4025000,3630,3,2,2,yes,no,no,yes,no,2,no,semi-furnished 324 | 4025000,3460,3,2,1,yes,no,yes,no,yes,1,no,furnished 325 | 4025000,5400,3,1,1,yes,no,no,no,no,3,no,semi-furnished 326 | 4007500,4500,3,1,2,no,no,yes,no,yes,0,no,semi-furnished 327 | 4007500,3460,4,1,2,yes,no,no,no,yes,0,no,semi-furnished 328 | 3990000,4100,4,1,1,no,no,yes,no,no,0,no,unfurnished 329 | 3990000,6480,3,1,2,no,no,no,no,yes,1,no,semi-furnished 330 | 3990000,4500,3,2,2,no,no,yes,no,yes,0,no,semi-furnished 331 | 3990000,3960,3,1,2,yes,no,no,no,no,0,no,furnished 332 | 3990000,4050,2,1,2,yes,yes,yes,no,no,0,yes,unfurnished 333 | 3920000,7260,3,2,1,yes,yes,yes,no,no,3,no,furnished 334 | 3920000,5500,4,1,2,yes,yes,yes,no,no,0,no,semi-furnished 335 | 3920000,3000,3,1,2,yes,no,no,no,no,0,no,semi-furnished 336 | 3920000,3290,2,1,1,yes,no,no,yes,no,1,no,furnished 337 | 3920000,3816,2,1,1,yes,no,yes,no,yes,2,no,furnished 338 | 3920000,8080,3,1,1,yes,no,no,no,yes,2,no,semi-furnished 339 | 3920000,2145,4,2,1,yes,no,yes,no,no,0,yes,unfurnished 340 | 3885000,3780,2,1,2,yes,yes,yes,no,no,0,no,semi-furnished 341 | 3885000,3180,4,2,2,yes,no,no,no,no,0,no,furnished 342 | 3850000,5300,5,2,2,yes,no,no,no,no,0,no,semi-furnished 343 | 3850000,3180,2,2,1,yes,no,yes,no,no,2,no,semi-furnished 344 | 3850000,7152,3,1,2,yes,no,no,no,yes,0,no,furnished 345 | 3850000,4080,2,1,1,yes,no,no,no,no,0,no,semi-furnished 346 | 3850000,3850,2,1,1,yes,no,no,no,no,0,no,semi-furnished 347 | 3850000,2015,3,1,2,yes,no,yes,no,no,0,yes,semi-furnished 348 | 3850000,2176,2,1,2,yes,yes,no,no,no,0,yes,semi-furnished 349 | 3836000,3350,3,1,2,yes,no,no,no,no,0,no,unfurnished 350 | 3815000,3150,2,2,1,no,no,yes,no,no,0,no,semi-furnished 351 | 3780000,4820,3,1,2,yes,no,no,no,no,0,no,semi-furnished 352 | 3780000,3420,2,1,2,yes,no,no,yes,no,1,no,semi-furnished 353 | 3780000,3600,2,1,1,yes,no,no,no,no,0,no,semi-furnished 354 | 3780000,5830,2,1,1,yes,no,no,no,no,2,no,unfurnished 355 | 3780000,2856,3,1,3,yes,no,no,no,no,0,yes,furnished 356 | 3780000,8400,2,1,1,yes,no,no,no,no,1,no,furnished 357 | 3773000,8250,3,1,1,yes,no,no,no,no,2,no,furnished 358 | 3773000,2520,5,2,1,no,no,yes,no,yes,1,no,furnished 359 | 3773000,6930,4,1,2,no,no,no,no,no,1,no,furnished 360 | 3745000,3480,2,1,1,yes,no,no,no,no,0,yes,semi-furnished 361 | 3710000,3600,3,1,1,yes,no,no,no,no,1,no,unfurnished 362 | 3710000,4040,2,1,1,yes,no,no,no,no,0,no,semi-furnished 363 | 3710000,6020,3,1,1,yes,no,no,no,no,0,no,semi-furnished 364 | 3710000,4050,2,1,1,yes,no,no,no,no,0,no,furnished 365 | 3710000,3584,2,1,1,yes,no,no,yes,no,0,no,semi-furnished 366 | 3703000,3120,3,1,2,no,no,yes,yes,no,0,no,semi-furnished 367 | 3703000,5450,2,1,1,yes,no,no,no,no,0,no,furnished 368 | 3675000,3630,2,1,1,yes,no,yes,no,no,0,no,furnished 369 | 3675000,3630,2,1,1,yes,no,no,no,yes,0,no,unfurnished 370 | 3675000,5640,2,1,1,no,no,no,no,no,0,no,semi-furnished 371 | 3675000,3600,2,1,1,yes,no,no,no,no,0,no,furnished 372 | 3640000,4280,2,1,1,yes,no,no,no,yes,2,no,semi-furnished 373 | 3640000,3570,3,1,2,yes,no,yes,no,no,0,no,semi-furnished 374 | 3640000,3180,3,1,2,no,no,yes,no,no,0,no,semi-furnished 375 | 3640000,3000,2,1,2,yes,no,no,no,yes,0,no,furnished 376 | 3640000,3520,2,2,1,yes,no,yes,no,no,0,no,semi-furnished 377 | 3640000,5960,3,1,2,yes,yes,yes,no,no,0,no,unfurnished 378 | 3640000,4130,3,2,2,yes,no,no,no,no,2,no,semi-furnished 379 | 3640000,2850,3,2,2,no,no,yes,no,no,0,yes,unfurnished 380 | 3640000,2275,3,1,3,yes,no,no,yes,yes,0,yes,semi-furnished 381 | 3633000,3520,3,1,1,yes,no,no,no,no,2,yes,unfurnished 382 | 3605000,4500,2,1,1,yes,no,no,no,no,0,no,semi-furnished 383 | 3605000,4000,2,1,1,yes,no,no,no,no,0,yes,semi-furnished 384 | 3570000,3150,3,1,2,yes,no,yes,no,no,0,no,furnished 385 | 3570000,4500,4,2,2,yes,no,yes,no,no,2,no,furnished 386 | 3570000,4500,2,1,1,no,no,no,no,no,0,no,furnished 387 | 3570000,3640,2,1,1,yes,no,no,no,no,0,no,unfurnished 388 | 3535000,3850,3,1,1,yes,no,no,no,no,2,no,unfurnished 389 | 3500000,4240,3,1,2,yes,no,no,no,yes,0,no,semi-furnished 390 | 3500000,3650,3,1,2,yes,no,no,no,no,0,no,unfurnished 391 | 3500000,4600,4,1,2,yes,no,no,no,no,0,no,semi-furnished 392 | 3500000,2135,3,2,2,no,no,no,no,no,0,no,unfurnished 393 | 3500000,3036,3,1,2,yes,no,yes,no,no,0,no,semi-furnished 394 | 3500000,3990,3,1,2,yes,no,no,no,no,0,no,semi-furnished 395 | 3500000,7424,3,1,1,no,no,no,no,no,0,no,unfurnished 396 | 3500000,3480,3,1,1,no,no,no,no,yes,0,no,unfurnished 397 | 3500000,3600,6,1,2,yes,no,no,no,no,1,no,unfurnished 398 | 3500000,3640,2,1,1,yes,no,no,no,no,1,no,semi-furnished 399 | 3500000,5900,2,1,1,yes,no,no,no,no,1,no,furnished 400 | 3500000,3120,3,1,2,yes,no,no,no,no,1,no,unfurnished 401 | 3500000,7350,2,1,1,yes,no,no,no,no,1,no,semi-furnished 402 | 3500000,3512,2,1,1,yes,no,no,no,no,1,yes,unfurnished 403 | 3500000,9500,3,1,2,yes,no,no,no,no,3,yes,unfurnished 404 | 3500000,5880,2,1,1,yes,no,no,no,no,0,no,unfurnished 405 | 3500000,12944,3,1,1,yes,no,no,no,no,0,no,unfurnished 406 | 3493000,4900,3,1,2,no,no,no,no,no,0,no,unfurnished 407 | 3465000,3060,3,1,1,yes,no,no,no,no,0,no,unfurnished 408 | 3465000,5320,2,1,1,yes,no,no,no,no,1,yes,unfurnished 409 | 3465000,2145,3,1,3,yes,no,no,no,no,0,yes,furnished 410 | 3430000,4000,2,1,1,yes,no,no,no,no,0,no,unfurnished 411 | 3430000,3185,2,1,1,yes,no,no,no,no,2,no,unfurnished 412 | 3430000,3850,3,1,1,yes,no,no,no,no,0,no,unfurnished 413 | 3430000,2145,3,1,3,yes,no,no,no,no,0,yes,furnished 414 | 3430000,2610,3,1,2,yes,no,yes,no,no,0,yes,unfurnished 415 | 3430000,1950,3,2,2,yes,no,yes,no,no,0,yes,unfurnished 416 | 3423000,4040,2,1,1,yes,no,no,no,no,0,no,unfurnished 417 | 3395000,4785,3,1,2,yes,yes,yes,no,yes,1,no,furnished 418 | 3395000,3450,3,1,1,yes,no,yes,no,no,2,no,unfurnished 419 | 3395000,3640,2,1,1,yes,no,no,no,no,0,no,furnished 420 | 3360000,3500,4,1,2,yes,no,no,no,yes,2,no,unfurnished 421 | 3360000,4960,4,1,3,no,no,no,no,no,0,no,semi-furnished 422 | 3360000,4120,2,1,2,yes,no,no,no,no,0,no,unfurnished 423 | 3360000,4750,2,1,1,yes,no,no,no,no,0,no,unfurnished 424 | 3360000,3720,2,1,1,no,no,no,no,yes,0,no,unfurnished 425 | 3360000,3750,3,1,1,yes,no,no,no,no,0,no,unfurnished 426 | 3360000,3100,3,1,2,no,no,yes,no,no,0,no,semi-furnished 427 | 3360000,3185,2,1,1,yes,no,yes,no,no,2,no,furnished 428 | 3353000,2700,3,1,1,no,no,no,no,no,0,no,furnished 429 | 3332000,2145,3,1,2,yes,no,yes,no,no,0,yes,furnished 430 | 3325000,4040,2,1,1,yes,no,no,no,no,1,no,unfurnished 431 | 3325000,4775,4,1,2,yes,no,no,no,no,0,no,unfurnished 432 | 3290000,2500,2,1,1,no,no,no,no,yes,0,no,unfurnished 433 | 3290000,3180,4,1,2,yes,no,yes,no,yes,0,no,unfurnished 434 | 3290000,6060,3,1,1,yes,yes,yes,no,no,0,no,furnished 435 | 3290000,3480,4,1,2,no,no,no,no,no,1,no,semi-furnished 436 | 3290000,3792,4,1,2,yes,no,no,no,no,0,no,semi-furnished 437 | 3290000,4040,2,1,1,yes,no,no,no,no,0,no,unfurnished 438 | 3290000,2145,3,1,2,yes,no,yes,no,no,0,yes,furnished 439 | 3290000,5880,3,1,1,yes,no,no,no,no,1,no,unfurnished 440 | 3255000,4500,2,1,1,no,no,no,no,no,0,no,semi-furnished 441 | 3255000,3930,2,1,1,no,no,no,no,no,0,no,unfurnished 442 | 3234000,3640,4,1,2,yes,no,yes,no,no,0,no,unfurnished 443 | 3220000,4370,3,1,2,yes,no,no,no,no,0,no,unfurnished 444 | 3220000,2684,2,1,1,yes,no,no,no,yes,1,no,unfurnished 445 | 3220000,4320,3,1,1,no,no,no,no,no,1,no,unfurnished 446 | 3220000,3120,3,1,2,no,no,no,no,no,0,no,furnished 447 | 3150000,3450,1,1,1,yes,no,no,no,no,0,no,furnished 448 | 3150000,3986,2,2,1,no,yes,yes,no,no,1,no,unfurnished 449 | 3150000,3500,2,1,1,no,no,yes,no,no,0,no,semi-furnished 450 | 3150000,4095,2,1,1,yes,no,no,no,no,2,no,semi-furnished 451 | 3150000,1650,3,1,2,no,no,yes,no,no,0,no,unfurnished 452 | 3150000,3450,3,1,2,yes,no,yes,no,no,0,no,semi-furnished 453 | 3150000,6750,2,1,1,yes,no,no,no,no,0,no,semi-furnished 454 | 3150000,9000,3,1,2,yes,no,no,no,no,2,no,semi-furnished 455 | 3150000,3069,2,1,1,yes,no,no,no,no,1,no,unfurnished 456 | 3143000,4500,3,1,2,yes,no,no,no,yes,0,no,unfurnished 457 | 3129000,5495,3,1,1,yes,no,yes,no,no,0,no,unfurnished 458 | 3118850,2398,3,1,1,yes,no,no,no,no,0,yes,semi-furnished 459 | 3115000,3000,3,1,1,no,no,no,no,yes,0,no,unfurnished 460 | 3115000,3850,3,1,2,yes,no,no,no,no,0,no,unfurnished 461 | 3115000,3500,2,1,1,yes,no,no,no,no,0,no,unfurnished 462 | 3087000,8100,2,1,1,yes,no,no,no,no,1,no,unfurnished 463 | 3080000,4960,2,1,1,yes,no,yes,no,yes,0,no,unfurnished 464 | 3080000,2160,3,1,2,no,no,yes,no,no,0,no,semi-furnished 465 | 3080000,3090,2,1,1,yes,yes,yes,no,no,0,no,unfurnished 466 | 3080000,4500,2,1,2,yes,no,no,yes,no,1,no,semi-furnished 467 | 3045000,3800,2,1,1,yes,no,no,no,no,0,no,unfurnished 468 | 3010000,3090,3,1,2,no,no,no,no,no,0,no,semi-furnished 469 | 3010000,3240,3,1,2,yes,no,no,no,no,2,no,semi-furnished 470 | 3010000,2835,2,1,1,yes,no,no,no,no,0,no,semi-furnished 471 | 3010000,4600,2,1,1,yes,no,no,no,no,0,no,furnished 472 | 3010000,5076,3,1,1,no,no,no,no,no,0,no,unfurnished 473 | 3010000,3750,3,1,2,yes,no,no,no,no,0,no,unfurnished 474 | 3010000,3630,4,1,2,yes,no,no,no,no,3,no,semi-furnished 475 | 3003000,8050,2,1,1,yes,no,no,no,no,0,no,unfurnished 476 | 2975000,4352,4,1,2,no,no,no,no,no,1,no,unfurnished 477 | 2961000,3000,2,1,2,yes,no,no,no,no,0,no,semi-furnished 478 | 2940000,5850,3,1,2,yes,no,yes,no,no,1,no,unfurnished 479 | 2940000,4960,2,1,1,yes,no,no,no,no,0,no,unfurnished 480 | 2940000,3600,3,1,2,no,no,no,no,no,1,no,unfurnished 481 | 2940000,3660,4,1,2,no,no,no,no,no,0,no,unfurnished 482 | 2940000,3480,3,1,2,no,no,no,no,no,1,no,semi-furnished 483 | 2940000,2700,2,1,1,no,no,no,no,no,0,no,furnished 484 | 2940000,3150,3,1,2,no,no,no,no,no,0,no,unfurnished 485 | 2940000,6615,3,1,2,yes,no,no,no,no,0,no,semi-furnished 486 | 2870000,3040,2,1,1,no,no,no,no,no,0,no,unfurnished 487 | 2870000,3630,2,1,1,yes,no,no,no,no,0,no,unfurnished 488 | 2870000,6000,2,1,1,yes,no,no,no,no,0,no,semi-furnished 489 | 2870000,5400,4,1,2,yes,no,no,no,no,0,no,unfurnished 490 | 2852500,5200,4,1,3,yes,no,no,no,no,0,no,unfurnished 491 | 2835000,3300,3,1,2,no,no,no,no,no,1,no,semi-furnished 492 | 2835000,4350,3,1,2,no,no,no,yes,no,1,no,unfurnished 493 | 2835000,2640,2,1,1,no,no,no,no,no,1,no,furnished 494 | 2800000,2650,3,1,2,yes,no,yes,no,no,1,no,unfurnished 495 | 2800000,3960,3,1,1,yes,no,no,no,no,0,no,furnished 496 | 2730000,6800,2,1,1,yes,no,no,no,no,0,no,unfurnished 497 | 2730000,4000,3,1,2,yes,no,no,no,no,1,no,unfurnished 498 | 2695000,4000,2,1,1,yes,no,no,no,no,0,no,unfurnished 499 | 2660000,3934,2,1,1,yes,no,no,no,no,0,no,unfurnished 500 | 2660000,2000,2,1,2,yes,no,no,no,no,0,no,semi-furnished 501 | 2660000,3630,3,3,2,no,yes,no,no,no,0,no,unfurnished 502 | 2660000,2800,3,1,1,yes,no,no,no,no,0,no,unfurnished 503 | 2660000,2430,3,1,1,no,no,no,no,no,0,no,unfurnished 504 | 2660000,3480,2,1,1,yes,no,no,no,no,1,no,semi-furnished 505 | 2660000,4000,3,1,1,yes,no,no,no,no,0,no,semi-furnished 506 | 2653000,3185,2,1,1,yes,no,no,no,yes,0,no,unfurnished 507 | 2653000,4000,3,1,2,yes,no,no,no,yes,0,no,unfurnished 508 | 2604000,2910,2,1,1,no,no,no,no,no,0,no,unfurnished 509 | 2590000,3600,2,1,1,yes,no,no,no,no,0,no,unfurnished 510 | 2590000,4400,2,1,1,yes,no,no,no,no,0,no,unfurnished 511 | 2590000,3600,2,2,2,yes,no,yes,no,no,1,no,furnished 512 | 2520000,2880,3,1,1,no,no,no,no,no,0,no,unfurnished 513 | 2520000,3180,3,1,1,no,no,no,no,no,0,no,unfurnished 514 | 2520000,3000,2,1,2,yes,no,no,no,no,0,no,furnished 515 | 2485000,4400,3,1,2,yes,no,no,no,no,0,no,unfurnished 516 | 2485000,3000,3,1,2,no,no,no,no,no,0,no,semi-furnished 517 | 2450000,3210,3,1,2,yes,no,yes,no,no,0,no,unfurnished 518 | 2450000,3240,2,1,1,no,yes,no,no,no,1,no,unfurnished 519 | 2450000,3000,2,1,1,yes,no,no,no,no,1,no,unfurnished 520 | 2450000,3500,2,1,1,yes,yes,no,no,no,0,no,unfurnished 521 | 2450000,4840,2,1,2,yes,no,no,no,no,0,no,unfurnished 522 | 2450000,7700,2,1,1,yes,no,no,no,no,0,no,unfurnished 523 | 2408000,3635,2,1,1,no,no,no,no,no,0,no,unfurnished 524 | 2380000,2475,3,1,2,yes,no,no,no,no,0,no,furnished 525 | 2380000,2787,4,2,2,yes,no,no,no,no,0,no,furnished 526 | 2380000,3264,2,1,1,yes,no,no,no,no,0,no,unfurnished 527 | 2345000,3640,2,1,1,yes,no,no,no,no,0,no,unfurnished 528 | 2310000,3180,2,1,1,yes,no,no,no,no,0,no,unfurnished 529 | 2275000,1836,2,1,1,no,no,yes,no,no,0,no,semi-furnished 530 | 2275000,3970,1,1,1,no,no,no,no,no,0,no,unfurnished 531 | 2275000,3970,3,1,2,yes,no,yes,no,no,0,no,unfurnished 532 | 2240000,1950,3,1,1,no,no,no,yes,no,0,no,unfurnished 533 | 2233000,5300,3,1,1,no,no,no,no,yes,0,yes,unfurnished 534 | 2135000,3000,2,1,1,no,no,no,no,no,0,no,unfurnished 535 | 2100000,2400,3,1,2,yes,no,no,no,no,0,no,unfurnished 536 | 2100000,3000,4,1,2,yes,no,no,no,no,0,no,unfurnished 537 | 2100000,3360,2,1,1,yes,no,no,no,no,1,no,unfurnished 538 | 1960000,3420,5,1,2,no,no,no,no,no,0,no,unfurnished 539 | 1890000,1700,3,1,2,yes,no,no,no,no,0,no,unfurnished 540 | 1890000,3649,2,1,1,yes,no,no,no,no,0,no,unfurnished 541 | 1855000,2990,2,1,1,no,no,no,no,no,1,no,unfurnished 542 | 1820000,3000,2,1,1,yes,no,yes,no,no,2,no,unfurnished 543 | 1767150,2400,3,1,1,no,no,no,no,no,0,no,semi-furnished 544 | 1750000,3620,2,1,1,yes,no,no,no,no,0,no,unfurnished 545 | 1750000,2910,3,1,1,no,no,no,no,no,0,no,furnished 546 | 1750000,3850,3,1,2,yes,no,no,no,no,0,no,unfurnished 547 | -------------------------------------------------------------------------------- /Session-02_14-08-23_Linear-Regression/14th_August_2023.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sarthakharne/Machine-Learning-TA-Material-Fall-2023/f2da173f11a4ae44807aa32f343d5e196a6cda9f/Session-02_14-08-23_Linear-Regression/14th_August_2023.pdf -------------------------------------------------------------------------------- /Session-03_01-09-23_MLE_Bayesian/Regularisation, Gaussian, MLE..pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sarthakharne/Machine-Learning-TA-Material-Fall-2023/f2da173f11a4ae44807aa32f343d5e196a6cda9f/Session-03_01-09-23_MLE_Bayesian/Regularisation, Gaussian, MLE..pdf -------------------------------------------------------------------------------- /Session-03_01-09-23_MLE_Bayesian/auto-mpg.csv: -------------------------------------------------------------------------------- 1 | mpg,cylinders,displacement,horsepower,weight,acceleration,model-year 2 | 18,8,307,130,3504,12,70 3 | 15,8,350,165,3693,11.5,70 4 | 18,8,318,150,3436,11,70 5 | 16,8,304,150,3433,12,70 6 | 17,8,302,140,3449,10.5,70 7 | 15,8,429,198,4341,10,70 8 | 14,8,454,220,4354,9,70 9 | 14,8,440,215,4312,8.5,70 10 | 14,8,455,225,4425,10,70 11 | 15,8,390,190,3850,8.5,70 12 | 15,8,383,170,3563,10,70 13 | 14,8,340,160,3609,8,70 14 | 15,8,400,150,3761,9.5,70 15 | 14,8,455,225,3086,10,70 16 | 24,4,113,95,2372,15,70 17 | 22,6,198,95,2833,15.5,70 18 | 18,6,199,97,2774,15.5,70 19 | 21,6,200,85,2587,16,70 20 | 27,4,97,88,2130,14.5,70 21 | 26,4,97,46,1835,20.5,70 22 | 25,4,110,87,2672,17.5,70 23 | 24,4,107,90,2430,14.5,70 24 | 25,4,104,95,2375,17.5,70 25 | 26,4,121,113,2234,12.5,70 26 | 21,6,199,90,2648,15,70 27 | 10,8,360,215,4615,14,70 28 | 10,8,307,200,4376,15,70 29 | 11,8,318,210,4382,13.5,70 30 | 9,8,304,193,4732,18.5,70 31 | 27,4,97,88,2130,14.5,71 32 | 28,4,140,90,2264,15.5,71 33 | 25,4,113,95,2228,14,71 34 | 25,4,98,,2046,19,71 35 | 19,6,232,100,2634,13,71 36 | 16,6,225,105,3439,15.5,71 37 | 17,6,250,100,3329,15.5,71 38 | 19,6,250,88,3302,15.5,71 39 | 18,6,232,100,3288,15.5,71 40 | 14,8,350,165,4209,12,71 41 | 14,8,400,175,4464,11.5,71 42 | 14,8,351,153,4154,13.5,71 43 | 14,8,318,150,4096,13,71 44 | 12,8,383,180,4955,11.5,71 45 | 13,8,400,170,4746,12,71 46 | 13,8,400,175,5140,12,71 47 | 18,6,258,110,2962,13.5,71 48 | 22,4,140,72,2408,19,71 49 | 19,6,250,100,3282,15,71 50 | 18,6,250,88,3139,14.5,71 51 | 23,4,122,86,2220,14,71 52 | 28,4,116,90,2123,14,71 53 | 30,4,79,70,2074,19.5,71 54 | 30,4,88,76,2065,14.5,71 55 | 31,4,71,65,1773,19,71 56 | 35,4,72,69,1613,18,71 57 | 27,4,97,60,1834,19,71 58 | 26,4,91,70,1955,20.5,71 59 | 24,4,113,95,2278,15.5,72 60 | 25,4,97.5,80,2126,17,72 61 | 23,4,97,54,2254,23.5,72 62 | 20,4,140,90,2408,19.5,72 63 | 21,4,122,86,2226,16.5,72 64 | 13,8,350,165,4274,12,72 65 | 14,8,400,175,4385,12,72 66 | 15,8,318,150,4135,13.5,72 67 | 14,8,351,153,4129,13,72 68 | 17,8,304,150,3672,11.5,72 69 | 11,8,429,208,4633,11,72 70 | 13,8,350,155,4502,13.5,72 71 | 12,8,350,160,4456,13.5,72 72 | 13,8,400,190,4422,12.5,72 73 | 19,3,70,97,2330,13.5,72 74 | 15,8,304,150,3892,12.5,72 75 | 13,8,307,130,4098,14,72 76 | 13,8,302,140,4294,16,72 77 | 14,8,318,150,4077,14,72 78 | 18,4,121,112,2933,14.5,72 79 | 22,4,121,76,2511,18,72 80 | 21,4,120,87,2979,19.5,72 81 | 26,4,96,69,2189,18,72 82 | 22,4,122,86,2395,16,72 83 | 28,4,97,92,2288,17,72 84 | 23,4,120,97,2506,14.5,72 85 | 28,4,98,80,2164,15,72 86 | 27,4,97,88,2100,16.5,72 87 | 13,8,350,175,4100,13,73 88 | 14,8,304,150,3672,11.5,73 89 | 13,8,350,145,3988,13,73 90 | 14,8,302,137,4042,14.5,73 91 | 15,8,318,150,3777,12.5,73 92 | 12,8,429,198,4952,11.5,73 93 | 13,8,400,150,4464,12,73 94 | 13,8,351,158,4363,13,73 95 | 14,8,318,150,4237,14.5,73 96 | 13,8,440,215,4735,11,73 97 | 12,8,455,225,4951,11,73 98 | 13,8,360,175,3821,11,73 99 | 18,6,225,105,3121,16.5,73 100 | 16,6,250,100,3278,18,73 101 | 18,6,232,100,2945,16,73 102 | 18,6,250,88,3021,16.5,73 103 | 23,6,198,95,2904,16,73 104 | 26,4,97,46,1950,21,73 105 | 11,8,400,150,4997,14,73 106 | 12,8,400,167,4906,12.5,73 107 | 13,8,360,170,4654,13,73 108 | 12,8,350,180,4499,12.5,73 109 | 18,6,232,100,2789,15,73 110 | 20,4,97,88,2279,19,73 111 | 21,4,140,72,2401,19.5,73 112 | 22,4,108,94,2379,16.5,73 113 | 18,3,70,90,2124,13.5,73 114 | 19,4,122,85,2310,18.5,73 115 | 21,6,155,107,2472,14,73 116 | 26,4,98,90,2265,15.5,73 117 | 15,8,350,145,4082,13,73 118 | 16,8,400,230,4278,9.5,73 119 | 29,4,68,49,1867,19.5,73 120 | 24,4,116,75,2158,15.5,73 121 | 20,4,114,91,2582,14,73 122 | 19,4,121,112,2868,15.5,73 123 | 15,8,318,150,3399,11,73 124 | 24,4,121,110,2660,14,73 125 | 20,6,156,122,2807,13.5,73 126 | 11,8,350,180,3664,11,73 127 | 20,6,198,95,3102,16.5,74 128 | 21,6,200,,2875,17,74 129 | 19,6,232,100,2901,16,74 130 | 15,6,250,100,3336,17,74 131 | 31,4,79,67,1950,19,74 132 | 26,4,122,80,2451,16.5,74 133 | 32,4,71,65,1836,21,74 134 | 25,4,140,75,2542,17,74 135 | 16,6,250,100,3781,17,74 136 | 16,6,258,110,3632,18,74 137 | 18,6,225,105,3613,16.5,74 138 | 16,8,302,140,4141,14,74 139 | 13,8,350,150,4699,14.5,74 140 | 14,8,318,150,4457,13.5,74 141 | 14,8,302,140,4638,16,74 142 | 14,8,304,150,4257,15.5,74 143 | 29,4,98,83,2219,16.5,74 144 | 26,4,79,67,1963,15.5,74 145 | 26,4,97,78,2300,14.5,74 146 | 31,4,76,52,1649,16.5,74 147 | 32,4,83,61,2003,19,74 148 | 28,4,90,75,2125,14.5,74 149 | 24,4,90,75,2108,15.5,74 150 | 26,4,116,75,2246,14,74 151 | 24,4,120,97,2489,15,74 152 | 26,4,108,93,2391,15.5,74 153 | 31,4,79,67,2000,16,74 154 | 19,6,225,95,3264,16,75 155 | 18,6,250,105,3459,16,75 156 | 15,6,250,72,3432,21,75 157 | 15,6,250,72,3158,19.5,75 158 | 16,8,400,170,4668,11.5,75 159 | 15,8,350,145,4440,14,75 160 | 16,8,318,150,4498,14.5,75 161 | 14,8,351,148,4657,13.5,75 162 | 17,6,231,110,3907,21,75 163 | 16,6,250,105,3897,18.5,75 164 | 15,6,258,110,3730,19,75 165 | 18,6,225,95,3785,19,75 166 | 21,6,231,110,3039,15,75 167 | 20,8,262,110,3221,13.5,75 168 | 13,8,302,129,3169,12,75 169 | 29,4,97,75,2171,16,75 170 | 23,4,140,83,2639,17,75 171 | 20,6,232,100,2914,16,75 172 | 23,4,140,78,2592,18.5,75 173 | 24,4,134,96,2702,13.5,75 174 | 25,4,90,71,2223,16.5,75 175 | 24,4,119,97,2545,17,75 176 | 18,6,171,97,2984,14.5,75 177 | 29,4,90,70,1937,14,75 178 | 19,6,232,90,3211,17,75 179 | 23,4,115,95,2694,15,75 180 | 23,4,120,88,2957,17,75 181 | 22,4,121,98,2945,14.5,75 182 | 25,4,121,115,2671,13.5,75 183 | 33,4,91,53,1795,17.5,75 184 | 28,4,107,86,2464,15.5,76 185 | 25,4,116,81,2220,16.9,76 186 | 25,4,140,92,2572,14.9,76 187 | 26,4,98,79,2255,17.7,76 188 | 27,4,101,83,2202,15.3,76 189 | 17.5,8,305,140,4215,13,76 190 | 16,8,318,150,4190,13,76 191 | 15.5,8,304,120,3962,13.9,76 192 | 14.5,8,351,152,4215,12.8,76 193 | 22,6,225,100,3233,15.4,76 194 | 22,6,250,105,3353,14.5,76 195 | 24,6,200,81,3012,17.6,76 196 | 22.5,6,232,90,3085,17.6,76 197 | 29,4,85,52,2035,22.2,76 198 | 24.5,4,98,60,2164,22.1,76 199 | 29,4,90,70,1937,14.2,76 200 | 33,4,91,53,1795,17.4,76 201 | 20,6,225,100,3651,17.7,76 202 | 18,6,250,78,3574,21,76 203 | 18.5,6,250,110,3645,16.2,76 204 | 17.5,6,258,95,3193,17.8,76 205 | 29.5,4,97,71,1825,12.2,76 206 | 32,4,85,70,1990,17,76 207 | 28,4,97,75,2155,16.4,76 208 | 26.5,4,140,72,2565,13.6,76 209 | 20,4,130,102,3150,15.7,76 210 | 13,8,318,150,3940,13.2,76 211 | 19,4,120,88,3270,21.9,76 212 | 19,6,156,108,2930,15.5,76 213 | 16.5,6,168,120,3820,16.7,76 214 | 16.5,8,350,180,4380,12.1,76 215 | 13,8,350,145,4055,12,76 216 | 13,8,302,130,3870,15,76 217 | 13,8,318,150,3755,14,76 218 | 31.5,4,98,68,2045,18.5,77 219 | 30,4,111,80,2155,14.8,77 220 | 36,4,79,58,1825,18.6,77 221 | 25.5,4,122,96,2300,15.5,77 222 | 33.5,4,85,70,1945,16.8,77 223 | 17.5,8,305,145,3880,12.5,77 224 | 17,8,260,110,4060,19,77 225 | 15.5,8,318,145,4140,13.7,77 226 | 15,8,302,130,4295,14.9,77 227 | 17.5,6,250,110,3520,16.4,77 228 | 20.5,6,231,105,3425,16.9,77 229 | 19,6,225,100,3630,17.7,77 230 | 18.5,6,250,98,3525,19,77 231 | 16,8,400,180,4220,11.1,77 232 | 15.5,8,350,170,4165,11.4,77 233 | 15.5,8,400,190,4325,12.2,77 234 | 16,8,351,149,4335,14.5,77 235 | 29,4,97,78,1940,14.5,77 236 | 24.5,4,151,88,2740,16,77 237 | 26,4,97,75,2265,18.2,77 238 | 25.5,4,140,89,2755,15.8,77 239 | 30.5,4,98,63,2051,17,77 240 | 33.5,4,98,83,2075,15.9,77 241 | 30,4,97,67,1985,16.4,77 242 | 30.5,4,97,78,2190,14.1,77 243 | 22,6,146,97,2815,14.5,77 244 | 21.5,4,121,110,2600,12.8,77 245 | 21.5,3,80,110,2720,13.5,77 246 | 43.1,4,90,48,1985,21.5,78 247 | 36.1,4,98,66,1800,14.4,78 248 | 32.8,4,78,52,1985,19.4,78 249 | 39.4,4,85,70,2070,18.6,78 250 | 36.1,4,91,60,1800,16.4,78 251 | 19.9,8,260,110,3365,15.5,78 252 | 19.4,8,318,140,3735,13.2,78 253 | 20.2,8,302,139,3570,12.8,78 254 | 19.2,6,231,105,3535,19.2,78 255 | 20.5,6,200,95,3155,18.2,78 256 | 20.2,6,200,85,2965,15.8,78 257 | 25.1,4,140,88,2720,15.4,78 258 | 20.5,6,225,100,3430,17.2,78 259 | 19.4,6,232,90,3210,17.2,78 260 | 20.6,6,231,105,3380,15.8,78 261 | 20.8,6,200,85,3070,16.7,78 262 | 18.6,6,225,110,3620,18.7,78 263 | 18.1,6,258,120,3410,15.1,78 264 | 19.2,8,305,145,3425,13.2,78 265 | 17.7,6,231,165,3445,13.4,78 266 | 18.1,8,302,139,3205,11.2,78 267 | 17.5,8,318,140,4080,13.7,78 268 | 30,4,98,68,2155,16.5,78 269 | 27.5,4,134,95,2560,14.2,78 270 | 27.2,4,119,97,2300,14.7,78 271 | 30.9,4,105,75,2230,14.5,78 272 | 21.1,4,134,95,2515,14.8,78 273 | 23.2,4,156,105,2745,16.7,78 274 | 23.8,4,151,85,2855,17.6,78 275 | 23.9,4,119,97,2405,14.9,78 276 | 20.3,5,131,103,2830,15.9,78 277 | 17,6,163,125,3140,13.6,78 278 | 21.6,4,121,115,2795,15.7,78 279 | 16.2,6,163,133,3410,15.8,78 280 | 31.5,4,89,71,1990,14.9,78 281 | 29.5,4,98,68,2135,16.6,78 282 | 21.5,6,231,115,3245,15.4,79 283 | 19.8,6,200,85,2990,18.2,79 284 | 22.3,4,140,88,2890,17.3,79 285 | 20.2,6,232,90,3265,18.2,79 286 | 20.6,6,225,110,3360,16.6,79 287 | 17,8,305,130,3840,15.4,79 288 | 17.6,8,302,129,3725,13.4,79 289 | 16.5,8,351,138,3955,13.2,79 290 | 18.2,8,318,135,3830,15.2,79 291 | 16.9,8,350,155,4360,14.9,79 292 | 15.5,8,351,142,4054,14.3,79 293 | 19.2,8,267,125,3605,15,79 294 | 18.5,8,360,150,3940,13,79 295 | 31.9,4,89,71,1925,14,79 296 | 34.1,4,86,65,1975,15.2,79 297 | 35.7,4,98,80,1915,14.4,79 298 | 27.4,4,121,80,2670,15,79 299 | 25.4,5,183,77,3530,20.1,79 300 | 23,8,350,125,3900,17.4,79 301 | 27.2,4,141,71,3190,24.8,79 302 | 23.9,8,260,90,3420,22.2,79 303 | 34.2,4,105,70,2200,13.2,79 304 | 34.5,4,105,70,2150,14.9,79 305 | 31.8,4,85,65,2020,19.2,79 306 | 37.3,4,91,69,2130,14.7,79 307 | 28.4,4,151,90,2670,16,79 308 | 28.8,6,173,115,2595,11.3,79 309 | 26.8,6,173,115,2700,12.9,79 310 | 33.5,4,151,90,2556,13.2,79 311 | 41.5,4,98,76,2144,14.7,80 312 | 38.1,4,89,60,1968,18.8,80 313 | 32.1,4,98,70,2120,15.5,80 314 | 37.2,4,86,65,2019,16.4,80 315 | 28,4,151,90,2678,16.5,80 316 | 26.4,4,140,88,2870,18.1,80 317 | 24.3,4,151,90,3003,20.1,80 318 | 19.1,6,225,90,3381,18.7,80 319 | 34.3,4,97,78,2188,15.8,80 320 | 29.8,4,134,90,2711,15.5,80 321 | 31.3,4,120,75,2542,17.5,80 322 | 37,4,119,92,2434,15,80 323 | 32.2,4,108,75,2265,15.2,80 324 | 46.6,4,86,65,2110,17.9,80 325 | 27.9,4,156,105,2800,14.4,80 326 | 40.8,4,85,65,2110,19.2,80 327 | 44.3,4,90,48,2085,21.7,80 328 | 43.4,4,90,48,2335,23.7,80 329 | 36.4,5,121,67,2950,19.9,80 330 | 30,4,146,67,3250,21.8,80 331 | 44.6,4,91,67,1850,13.8,80 332 | 40.9,4,85,67,1835,17.3,80 333 | 33.8,4,97,67,2145,18,80 334 | 29.8,4,89,62,1845,15.3,80 335 | 32.7,6,168,132,2910,11.4,80 336 | 23.7,3,70,100,2420,12.5,80 337 | 35,4,122,88,2500,15.1,80 338 | 23.6,4,140,80,2905,14.3,80 339 | 32.4,4,107,72,2290,17,80 340 | 27.2,4,135,84,2490,15.7,81 341 | 26.6,4,151,84,2635,16.4,81 342 | 25.8,4,156,92,2620,14.4,81 343 | 23.5,6,173,110,2725,12.6,81 344 | 30,4,135,84,2385,12.9,81 345 | 39.1,4,79,58,1755,16.9,81 346 | 39,4,86,64,1875,16.4,81 347 | 35.1,4,81,60,1760,16.1,81 348 | 32.3,4,97,67,2065,17.8,81 349 | 37,4,85,65,1975,19.4,81 350 | 37.7,4,89,62,2050,17.3,81 351 | 34.1,4,91,68,1985,16,81 352 | 34.7,4,105,63,2215,14.9,81 353 | 34.4,4,98,65,2045,16.2,81 354 | 29.9,4,98,65,2380,20.7,81 355 | 33,4,105,74,2190,14.2,81 356 | 34.5,4,100,75,2320,15.8,81 357 | 33.7,4,107,75,2210,14.4,81 358 | 32.4,4,108,75,2350,16.8,81 359 | 32.9,4,119,100,2615,14.8,81 360 | 31.6,4,120,74,2635,18.3,81 361 | 28.1,4,141,80,3230,20.4,81 362 | 30.7,6,145,76,3160,19.6,81 363 | 25.4,6,168,116,2900,12.6,81 364 | 24.2,6,146,120,2930,13.8,81 365 | 22.4,6,231,110,3415,15.8,81 366 | 26.6,8,350,105,3725,19,81 367 | 20.2,6,200,88,3060,17.1,81 368 | 17.6,6,225,85,3465,16.6,81 369 | 28,4,112,88,2605,19.6,82 370 | 27,4,112,88,2640,18.6,82 371 | 34,4,112,88,2395,18,82 372 | 31,4,112,85,2575,16.2,82 373 | 29,4,135,84,2525,16,82 374 | 27,4,151,90,2735,18,82 375 | 24,4,140,92,2865,16.4,82 376 | 23,4,151,85,3035,20.5,82 377 | 36,4,105,74,1980,15.3,82 378 | 37,4,91,68,2025,18.2,82 379 | 31,4,91,68,1970,17.6,82 380 | 38,4,105,63,2125,14.7,82 381 | 36,4,98,70,2125,17.3,82 382 | 36,4,120,88,2160,14.5,82 383 | 36,4,107,75,2205,14.5,82 384 | 34,4,108,70,2245,16.9,82 385 | 38,4,91,67,1965,15,82 386 | 32,4,91,67,1965,15.7,82 387 | 38,4,91,67,1995,16.2,82 388 | 25,6,181,110,2945,16.4,82 389 | 38,6,262,85,3015,17,82 390 | 26,4,156,92,2585,14.5,82 391 | 22,6,232,112,2835,14.7,82 392 | 32,4,144,96,2665,13.9,82 393 | 36,4,135,84,2370,13,82 394 | 27,4,151,90,2950,17.3,82 395 | 27,4,140,86,2790,15.6,82 396 | 44,4,97,52,2130,24.6,82 397 | 32,4,135,84,2295,11.6,82 398 | 28,4,120,79,2625,18.6,82 399 | 31,4,119,82,2720,19.4,82 400 | -------------------------------------------------------------------------------- /Session-04_08-09-23_Bayes_LogisticRegression_KMeans_KNN/Naive Bayes, Logistic Regression, KNNs and KMeans.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sarthakharne/Machine-Learning-TA-Material-Fall-2023/f2da173f11a4ae44807aa32f343d5e196a6cda9f/Session-04_08-09-23_Bayes_LogisticRegression_KMeans_KNN/Naive Bayes, Logistic Regression, KNNs and KMeans.pptx -------------------------------------------------------------------------------- /Session-05_19-09-23_PCA_and_Decision_Trees/PCA and Decision Trees.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sarthakharne/Machine-Learning-TA-Material-Fall-2023/f2da173f11a4ae44807aa32f343d5e196a6cda9f/Session-05_19-09-23_PCA_and_Decision_Trees/PCA and Decision Trees.pptx -------------------------------------------------------------------------------- /Session-05_19-09-23_PCA_and_Decision_Trees/titanic/gender_submission.csv: -------------------------------------------------------------------------------- 1 | PassengerId,Survived 2 | 892,0 3 | 893,1 4 | 894,0 5 | 895,0 6 | 896,1 7 | 897,0 8 | 898,1 9 | 899,0 10 | 900,1 11 | 901,0 12 | 902,0 13 | 903,0 14 | 904,1 15 | 905,0 16 | 906,1 17 | 907,1 18 | 908,0 19 | 909,0 20 | 910,1 21 | 911,1 22 | 912,0 23 | 913,0 24 | 914,1 25 | 915,0 26 | 916,1 27 | 917,0 28 | 918,1 29 | 919,0 30 | 920,0 31 | 921,0 32 | 922,0 33 | 923,0 34 | 924,1 35 | 925,1 36 | 926,0 37 | 927,0 38 | 928,1 39 | 929,1 40 | 930,0 41 | 931,0 42 | 932,0 43 | 933,0 44 | 934,0 45 | 935,1 46 | 936,1 47 | 937,0 48 | 938,0 49 | 939,0 50 | 940,1 51 | 941,1 52 | 942,0 53 | 943,0 54 | 944,1 55 | 945,1 56 | 946,0 57 | 947,0 58 | 948,0 59 | 949,0 60 | 950,0 61 | 951,1 62 | 952,0 63 | 953,0 64 | 954,0 65 | 955,1 66 | 956,0 67 | 957,1 68 | 958,1 69 | 959,0 70 | 960,0 71 | 961,1 72 | 962,1 73 | 963,0 74 | 964,1 75 | 965,0 76 | 966,1 77 | 967,0 78 | 968,0 79 | 969,1 80 | 970,0 81 | 971,1 82 | 972,0 83 | 973,0 84 | 974,0 85 | 975,0 86 | 976,0 87 | 977,0 88 | 978,1 89 | 979,1 90 | 980,1 91 | 981,0 92 | 982,1 93 | 983,0 94 | 984,1 95 | 985,0 96 | 986,0 97 | 987,0 98 | 988,1 99 | 989,0 100 | 990,1 101 | 991,0 102 | 992,1 103 | 993,0 104 | 994,0 105 | 995,0 106 | 996,1 107 | 997,0 108 | 998,0 109 | 999,0 110 | 1000,0 111 | 1001,0 112 | 1002,0 113 | 1003,1 114 | 1004,1 115 | 1005,1 116 | 1006,1 117 | 1007,0 118 | 1008,0 119 | 1009,1 120 | 1010,0 121 | 1011,1 122 | 1012,1 123 | 1013,0 124 | 1014,1 125 | 1015,0 126 | 1016,0 127 | 1017,1 128 | 1018,0 129 | 1019,1 130 | 1020,0 131 | 1021,0 132 | 1022,0 133 | 1023,0 134 | 1024,1 135 | 1025,0 136 | 1026,0 137 | 1027,0 138 | 1028,0 139 | 1029,0 140 | 1030,1 141 | 1031,0 142 | 1032,1 143 | 1033,1 144 | 1034,0 145 | 1035,0 146 | 1036,0 147 | 1037,0 148 | 1038,0 149 | 1039,0 150 | 1040,0 151 | 1041,0 152 | 1042,1 153 | 1043,0 154 | 1044,0 155 | 1045,1 156 | 1046,0 157 | 1047,0 158 | 1048,1 159 | 1049,1 160 | 1050,0 161 | 1051,1 162 | 1052,1 163 | 1053,0 164 | 1054,1 165 | 1055,0 166 | 1056,0 167 | 1057,1 168 | 1058,0 169 | 1059,0 170 | 1060,1 171 | 1061,1 172 | 1062,0 173 | 1063,0 174 | 1064,0 175 | 1065,0 176 | 1066,0 177 | 1067,1 178 | 1068,1 179 | 1069,0 180 | 1070,1 181 | 1071,1 182 | 1072,0 183 | 1073,0 184 | 1074,1 185 | 1075,0 186 | 1076,1 187 | 1077,0 188 | 1078,1 189 | 1079,0 190 | 1080,1 191 | 1081,0 192 | 1082,0 193 | 1083,0 194 | 1084,0 195 | 1085,0 196 | 1086,0 197 | 1087,0 198 | 1088,0 199 | 1089,1 200 | 1090,0 201 | 1091,1 202 | 1092,1 203 | 1093,0 204 | 1094,0 205 | 1095,1 206 | 1096,0 207 | 1097,0 208 | 1098,1 209 | 1099,0 210 | 1100,1 211 | 1101,0 212 | 1102,0 213 | 1103,0 214 | 1104,0 215 | 1105,1 216 | 1106,1 217 | 1107,0 218 | 1108,1 219 | 1109,0 220 | 1110,1 221 | 1111,0 222 | 1112,1 223 | 1113,0 224 | 1114,1 225 | 1115,0 226 | 1116,1 227 | 1117,1 228 | 1118,0 229 | 1119,1 230 | 1120,0 231 | 1121,0 232 | 1122,0 233 | 1123,1 234 | 1124,0 235 | 1125,0 236 | 1126,0 237 | 1127,0 238 | 1128,0 239 | 1129,0 240 | 1130,1 241 | 1131,1 242 | 1132,1 243 | 1133,1 244 | 1134,0 245 | 1135,0 246 | 1136,0 247 | 1137,0 248 | 1138,1 249 | 1139,0 250 | 1140,1 251 | 1141,1 252 | 1142,1 253 | 1143,0 254 | 1144,0 255 | 1145,0 256 | 1146,0 257 | 1147,0 258 | 1148,0 259 | 1149,0 260 | 1150,1 261 | 1151,0 262 | 1152,0 263 | 1153,0 264 | 1154,1 265 | 1155,1 266 | 1156,0 267 | 1157,0 268 | 1158,0 269 | 1159,0 270 | 1160,1 271 | 1161,0 272 | 1162,0 273 | 1163,0 274 | 1164,1 275 | 1165,1 276 | 1166,0 277 | 1167,1 278 | 1168,0 279 | 1169,0 280 | 1170,0 281 | 1171,0 282 | 1172,1 283 | 1173,0 284 | 1174,1 285 | 1175,1 286 | 1176,1 287 | 1177,0 288 | 1178,0 289 | 1179,0 290 | 1180,0 291 | 1181,0 292 | 1182,0 293 | 1183,1 294 | 1184,0 295 | 1185,0 296 | 1186,0 297 | 1187,0 298 | 1188,1 299 | 1189,0 300 | 1190,0 301 | 1191,0 302 | 1192,0 303 | 1193,0 304 | 1194,0 305 | 1195,0 306 | 1196,1 307 | 1197,1 308 | 1198,0 309 | 1199,0 310 | 1200,0 311 | 1201,1 312 | 1202,0 313 | 1203,0 314 | 1204,0 315 | 1205,1 316 | 1206,1 317 | 1207,1 318 | 1208,0 319 | 1209,0 320 | 1210,0 321 | 1211,0 322 | 1212,0 323 | 1213,0 324 | 1214,0 325 | 1215,0 326 | 1216,1 327 | 1217,0 328 | 1218,1 329 | 1219,0 330 | 1220,0 331 | 1221,0 332 | 1222,1 333 | 1223,0 334 | 1224,0 335 | 1225,1 336 | 1226,0 337 | 1227,0 338 | 1228,0 339 | 1229,0 340 | 1230,0 341 | 1231,0 342 | 1232,0 343 | 1233,0 344 | 1234,0 345 | 1235,1 346 | 1236,0 347 | 1237,1 348 | 1238,0 349 | 1239,1 350 | 1240,0 351 | 1241,1 352 | 1242,1 353 | 1243,0 354 | 1244,0 355 | 1245,0 356 | 1246,1 357 | 1247,0 358 | 1248,1 359 | 1249,0 360 | 1250,0 361 | 1251,1 362 | 1252,0 363 | 1253,1 364 | 1254,1 365 | 1255,0 366 | 1256,1 367 | 1257,1 368 | 1258,0 369 | 1259,1 370 | 1260,1 371 | 1261,0 372 | 1262,0 373 | 1263,1 374 | 1264,0 375 | 1265,0 376 | 1266,1 377 | 1267,1 378 | 1268,1 379 | 1269,0 380 | 1270,0 381 | 1271,0 382 | 1272,0 383 | 1273,0 384 | 1274,1 385 | 1275,1 386 | 1276,0 387 | 1277,1 388 | 1278,0 389 | 1279,0 390 | 1280,0 391 | 1281,0 392 | 1282,0 393 | 1283,1 394 | 1284,0 395 | 1285,0 396 | 1286,0 397 | 1287,1 398 | 1288,0 399 | 1289,1 400 | 1290,0 401 | 1291,0 402 | 1292,1 403 | 1293,0 404 | 1294,1 405 | 1295,0 406 | 1296,0 407 | 1297,0 408 | 1298,0 409 | 1299,0 410 | 1300,1 411 | 1301,1 412 | 1302,1 413 | 1303,1 414 | 1304,1 415 | 1305,0 416 | 1306,1 417 | 1307,0 418 | 1308,0 419 | 1309,0 420 | -------------------------------------------------------------------------------- /Session-05_19-09-23_PCA_and_Decision_Trees/titanic/test.csv: -------------------------------------------------------------------------------- 1 | PassengerId,Pclass,Name,Sex,Age,SibSp,Parch,Ticket,Fare,Cabin,Embarked 2 | 892,3,"Kelly, Mr. James",male,34.5,0,0,330911,7.8292,,Q 3 | 893,3,"Wilkes, Mrs. James (Ellen Needs)",female,47,1,0,363272,7,,S 4 | 894,2,"Myles, Mr. Thomas Francis",male,62,0,0,240276,9.6875,,Q 5 | 895,3,"Wirz, Mr. Albert",male,27,0,0,315154,8.6625,,S 6 | 896,3,"Hirvonen, Mrs. Alexander (Helga E Lindqvist)",female,22,1,1,3101298,12.2875,,S 7 | 897,3,"Svensson, Mr. Johan Cervin",male,14,0,0,7538,9.225,,S 8 | 898,3,"Connolly, Miss. Kate",female,30,0,0,330972,7.6292,,Q 9 | 899,2,"Caldwell, Mr. Albert Francis",male,26,1,1,248738,29,,S 10 | 900,3,"Abrahim, Mrs. Joseph (Sophie Halaut Easu)",female,18,0,0,2657,7.2292,,C 11 | 901,3,"Davies, Mr. John Samuel",male,21,2,0,A/4 48871,24.15,,S 12 | 902,3,"Ilieff, Mr. Ylio",male,,0,0,349220,7.8958,,S 13 | 903,1,"Jones, Mr. Charles Cresson",male,46,0,0,694,26,,S 14 | 904,1,"Snyder, Mrs. John Pillsbury (Nelle Stevenson)",female,23,1,0,21228,82.2667,B45,S 15 | 905,2,"Howard, Mr. Benjamin",male,63,1,0,24065,26,,S 16 | 906,1,"Chaffee, Mrs. Herbert Fuller (Carrie Constance Toogood)",female,47,1,0,W.E.P. 5734,61.175,E31,S 17 | 907,2,"del Carlo, Mrs. Sebastiano (Argenia Genovesi)",female,24,1,0,SC/PARIS 2167,27.7208,,C 18 | 908,2,"Keane, Mr. Daniel",male,35,0,0,233734,12.35,,Q 19 | 909,3,"Assaf, Mr. Gerios",male,21,0,0,2692,7.225,,C 20 | 910,3,"Ilmakangas, Miss. Ida Livija",female,27,1,0,STON/O2. 3101270,7.925,,S 21 | 911,3,"Assaf Khalil, Mrs. Mariana (Miriam"")""",female,45,0,0,2696,7.225,,C 22 | 912,1,"Rothschild, Mr. Martin",male,55,1,0,PC 17603,59.4,,C 23 | 913,3,"Olsen, Master. Artur Karl",male,9,0,1,C 17368,3.1708,,S 24 | 914,1,"Flegenheim, Mrs. Alfred (Antoinette)",female,,0,0,PC 17598,31.6833,,S 25 | 915,1,"Williams, Mr. Richard Norris II",male,21,0,1,PC 17597,61.3792,,C 26 | 916,1,"Ryerson, Mrs. Arthur Larned (Emily Maria Borie)",female,48,1,3,PC 17608,262.375,B57 B59 B63 B66,C 27 | 917,3,"Robins, Mr. Alexander A",male,50,1,0,A/5. 3337,14.5,,S 28 | 918,1,"Ostby, Miss. Helene Ragnhild",female,22,0,1,113509,61.9792,B36,C 29 | 919,3,"Daher, Mr. Shedid",male,22.5,0,0,2698,7.225,,C 30 | 920,1,"Brady, Mr. John Bertram",male,41,0,0,113054,30.5,A21,S 31 | 921,3,"Samaan, Mr. Elias",male,,2,0,2662,21.6792,,C 32 | 922,2,"Louch, Mr. Charles Alexander",male,50,1,0,SC/AH 3085,26,,S 33 | 923,2,"Jefferys, Mr. Clifford Thomas",male,24,2,0,C.A. 31029,31.5,,S 34 | 924,3,"Dean, Mrs. Bertram (Eva Georgetta Light)",female,33,1,2,C.A. 2315,20.575,,S 35 | 925,3,"Johnston, Mrs. Andrew G (Elizabeth Lily"" Watson)""",female,,1,2,W./C. 6607,23.45,,S 36 | 926,1,"Mock, Mr. Philipp Edmund",male,30,1,0,13236,57.75,C78,C 37 | 927,3,"Katavelas, Mr. Vassilios (Catavelas Vassilios"")""",male,18.5,0,0,2682,7.2292,,C 38 | 928,3,"Roth, Miss. Sarah A",female,,0,0,342712,8.05,,S 39 | 929,3,"Cacic, Miss. Manda",female,21,0,0,315087,8.6625,,S 40 | 930,3,"Sap, Mr. Julius",male,25,0,0,345768,9.5,,S 41 | 931,3,"Hee, Mr. Ling",male,,0,0,1601,56.4958,,S 42 | 932,3,"Karun, Mr. Franz",male,39,0,1,349256,13.4167,,C 43 | 933,1,"Franklin, Mr. Thomas Parham",male,,0,0,113778,26.55,D34,S 44 | 934,3,"Goldsmith, Mr. Nathan",male,41,0,0,SOTON/O.Q. 3101263,7.85,,S 45 | 935,2,"Corbett, Mrs. Walter H (Irene Colvin)",female,30,0,0,237249,13,,S 46 | 936,1,"Kimball, Mrs. Edwin Nelson Jr (Gertrude Parsons)",female,45,1,0,11753,52.5542,D19,S 47 | 937,3,"Peltomaki, Mr. Nikolai Johannes",male,25,0,0,STON/O 2. 3101291,7.925,,S 48 | 938,1,"Chevre, Mr. Paul Romaine",male,45,0,0,PC 17594,29.7,A9,C 49 | 939,3,"Shaughnessy, Mr. Patrick",male,,0,0,370374,7.75,,Q 50 | 940,1,"Bucknell, Mrs. William Robert (Emma Eliza Ward)",female,60,0,0,11813,76.2917,D15,C 51 | 941,3,"Coutts, Mrs. William (Winnie Minnie"" Treanor)""",female,36,0,2,C.A. 37671,15.9,,S 52 | 942,1,"Smith, Mr. Lucien Philip",male,24,1,0,13695,60,C31,S 53 | 943,2,"Pulbaum, Mr. Franz",male,27,0,0,SC/PARIS 2168,15.0333,,C 54 | 944,2,"Hocking, Miss. Ellen Nellie""""",female,20,2,1,29105,23,,S 55 | 945,1,"Fortune, Miss. Ethel Flora",female,28,3,2,19950,263,C23 C25 C27,S 56 | 946,2,"Mangiavacchi, Mr. Serafino Emilio",male,,0,0,SC/A.3 2861,15.5792,,C 57 | 947,3,"Rice, Master. Albert",male,10,4,1,382652,29.125,,Q 58 | 948,3,"Cor, Mr. Bartol",male,35,0,0,349230,7.8958,,S 59 | 949,3,"Abelseth, Mr. Olaus Jorgensen",male,25,0,0,348122,7.65,F G63,S 60 | 950,3,"Davison, Mr. Thomas Henry",male,,1,0,386525,16.1,,S 61 | 951,1,"Chaudanson, Miss. Victorine",female,36,0,0,PC 17608,262.375,B61,C 62 | 952,3,"Dika, Mr. Mirko",male,17,0,0,349232,7.8958,,S 63 | 953,2,"McCrae, Mr. Arthur Gordon",male,32,0,0,237216,13.5,,S 64 | 954,3,"Bjorklund, Mr. Ernst Herbert",male,18,0,0,347090,7.75,,S 65 | 955,3,"Bradley, Miss. Bridget Delia",female,22,0,0,334914,7.725,,Q 66 | 956,1,"Ryerson, Master. John Borie",male,13,2,2,PC 17608,262.375,B57 B59 B63 B66,C 67 | 957,2,"Corey, Mrs. Percy C (Mary Phyllis Elizabeth Miller)",female,,0,0,F.C.C. 13534,21,,S 68 | 958,3,"Burns, Miss. Mary Delia",female,18,0,0,330963,7.8792,,Q 69 | 959,1,"Moore, Mr. Clarence Bloomfield",male,47,0,0,113796,42.4,,S 70 | 960,1,"Tucker, Mr. Gilbert Milligan Jr",male,31,0,0,2543,28.5375,C53,C 71 | 961,1,"Fortune, Mrs. Mark (Mary McDougald)",female,60,1,4,19950,263,C23 C25 C27,S 72 | 962,3,"Mulvihill, Miss. Bertha E",female,24,0,0,382653,7.75,,Q 73 | 963,3,"Minkoff, Mr. Lazar",male,21,0,0,349211,7.8958,,S 74 | 964,3,"Nieminen, Miss. Manta Josefina",female,29,0,0,3101297,7.925,,S 75 | 965,1,"Ovies y Rodriguez, Mr. Servando",male,28.5,0,0,PC 17562,27.7208,D43,C 76 | 966,1,"Geiger, Miss. Amalie",female,35,0,0,113503,211.5,C130,C 77 | 967,1,"Keeping, Mr. Edwin",male,32.5,0,0,113503,211.5,C132,C 78 | 968,3,"Miles, Mr. Frank",male,,0,0,359306,8.05,,S 79 | 969,1,"Cornell, Mrs. Robert Clifford (Malvina Helen Lamson)",female,55,2,0,11770,25.7,C101,S 80 | 970,2,"Aldworth, Mr. Charles Augustus",male,30,0,0,248744,13,,S 81 | 971,3,"Doyle, Miss. Elizabeth",female,24,0,0,368702,7.75,,Q 82 | 972,3,"Boulos, Master. Akar",male,6,1,1,2678,15.2458,,C 83 | 973,1,"Straus, Mr. Isidor",male,67,1,0,PC 17483,221.7792,C55 C57,S 84 | 974,1,"Case, Mr. Howard Brown",male,49,0,0,19924,26,,S 85 | 975,3,"Demetri, Mr. Marinko",male,,0,0,349238,7.8958,,S 86 | 976,2,"Lamb, Mr. John Joseph",male,,0,0,240261,10.7083,,Q 87 | 977,3,"Khalil, Mr. Betros",male,,1,0,2660,14.4542,,C 88 | 978,3,"Barry, Miss. Julia",female,27,0,0,330844,7.8792,,Q 89 | 979,3,"Badman, Miss. Emily Louisa",female,18,0,0,A/4 31416,8.05,,S 90 | 980,3,"O'Donoghue, Ms. Bridget",female,,0,0,364856,7.75,,Q 91 | 981,2,"Wells, Master. Ralph Lester",male,2,1,1,29103,23,,S 92 | 982,3,"Dyker, Mrs. Adolf Fredrik (Anna Elisabeth Judith Andersson)",female,22,1,0,347072,13.9,,S 93 | 983,3,"Pedersen, Mr. Olaf",male,,0,0,345498,7.775,,S 94 | 984,1,"Davidson, Mrs. Thornton (Orian Hays)",female,27,1,2,F.C. 12750,52,B71,S 95 | 985,3,"Guest, Mr. Robert",male,,0,0,376563,8.05,,S 96 | 986,1,"Birnbaum, Mr. Jakob",male,25,0,0,13905,26,,C 97 | 987,3,"Tenglin, Mr. Gunnar Isidor",male,25,0,0,350033,7.7958,,S 98 | 988,1,"Cavendish, Mrs. Tyrell William (Julia Florence Siegel)",female,76,1,0,19877,78.85,C46,S 99 | 989,3,"Makinen, Mr. Kalle Edvard",male,29,0,0,STON/O 2. 3101268,7.925,,S 100 | 990,3,"Braf, Miss. Elin Ester Maria",female,20,0,0,347471,7.8542,,S 101 | 991,3,"Nancarrow, Mr. William Henry",male,33,0,0,A./5. 3338,8.05,,S 102 | 992,1,"Stengel, Mrs. Charles Emil Henry (Annie May Morris)",female,43,1,0,11778,55.4417,C116,C 103 | 993,2,"Weisz, Mr. Leopold",male,27,1,0,228414,26,,S 104 | 994,3,"Foley, Mr. William",male,,0,0,365235,7.75,,Q 105 | 995,3,"Johansson Palmquist, Mr. Oskar Leander",male,26,0,0,347070,7.775,,S 106 | 996,3,"Thomas, Mrs. Alexander (Thamine Thelma"")""",female,16,1,1,2625,8.5167,,C 107 | 997,3,"Holthen, Mr. Johan Martin",male,28,0,0,C 4001,22.525,,S 108 | 998,3,"Buckley, Mr. Daniel",male,21,0,0,330920,7.8208,,Q 109 | 999,3,"Ryan, Mr. Edward",male,,0,0,383162,7.75,,Q 110 | 1000,3,"Willer, Mr. Aaron (Abi Weller"")""",male,,0,0,3410,8.7125,,S 111 | 1001,2,"Swane, Mr. George",male,18.5,0,0,248734,13,F,S 112 | 1002,2,"Stanton, Mr. Samuel Ward",male,41,0,0,237734,15.0458,,C 113 | 1003,3,"Shine, Miss. Ellen Natalia",female,,0,0,330968,7.7792,,Q 114 | 1004,1,"Evans, Miss. Edith Corse",female,36,0,0,PC 17531,31.6792,A29,C 115 | 1005,3,"Buckley, Miss. Katherine",female,18.5,0,0,329944,7.2833,,Q 116 | 1006,1,"Straus, Mrs. Isidor (Rosalie Ida Blun)",female,63,1,0,PC 17483,221.7792,C55 C57,S 117 | 1007,3,"Chronopoulos, Mr. Demetrios",male,18,1,0,2680,14.4542,,C 118 | 1008,3,"Thomas, Mr. John",male,,0,0,2681,6.4375,,C 119 | 1009,3,"Sandstrom, Miss. Beatrice Irene",female,1,1,1,PP 9549,16.7,G6,S 120 | 1010,1,"Beattie, Mr. Thomson",male,36,0,0,13050,75.2417,C6,C 121 | 1011,2,"Chapman, Mrs. John Henry (Sara Elizabeth Lawry)",female,29,1,0,SC/AH 29037,26,,S 122 | 1012,2,"Watt, Miss. Bertha J",female,12,0,0,C.A. 33595,15.75,,S 123 | 1013,3,"Kiernan, Mr. John",male,,1,0,367227,7.75,,Q 124 | 1014,1,"Schabert, Mrs. Paul (Emma Mock)",female,35,1,0,13236,57.75,C28,C 125 | 1015,3,"Carver, Mr. Alfred John",male,28,0,0,392095,7.25,,S 126 | 1016,3,"Kennedy, Mr. John",male,,0,0,368783,7.75,,Q 127 | 1017,3,"Cribb, Miss. Laura Alice",female,17,0,1,371362,16.1,,S 128 | 1018,3,"Brobeck, Mr. Karl Rudolf",male,22,0,0,350045,7.7958,,S 129 | 1019,3,"McCoy, Miss. Alicia",female,,2,0,367226,23.25,,Q 130 | 1020,2,"Bowenur, Mr. Solomon",male,42,0,0,211535,13,,S 131 | 1021,3,"Petersen, Mr. Marius",male,24,0,0,342441,8.05,,S 132 | 1022,3,"Spinner, Mr. Henry John",male,32,0,0,STON/OQ. 369943,8.05,,S 133 | 1023,1,"Gracie, Col. Archibald IV",male,53,0,0,113780,28.5,C51,C 134 | 1024,3,"Lefebre, Mrs. Frank (Frances)",female,,0,4,4133,25.4667,,S 135 | 1025,3,"Thomas, Mr. Charles P",male,,1,0,2621,6.4375,,C 136 | 1026,3,"Dintcheff, Mr. Valtcho",male,43,0,0,349226,7.8958,,S 137 | 1027,3,"Carlsson, Mr. Carl Robert",male,24,0,0,350409,7.8542,,S 138 | 1028,3,"Zakarian, Mr. Mapriededer",male,26.5,0,0,2656,7.225,,C 139 | 1029,2,"Schmidt, Mr. August",male,26,0,0,248659,13,,S 140 | 1030,3,"Drapkin, Miss. Jennie",female,23,0,0,SOTON/OQ 392083,8.05,,S 141 | 1031,3,"Goodwin, Mr. Charles Frederick",male,40,1,6,CA 2144,46.9,,S 142 | 1032,3,"Goodwin, Miss. Jessie Allis",female,10,5,2,CA 2144,46.9,,S 143 | 1033,1,"Daniels, Miss. Sarah",female,33,0,0,113781,151.55,,S 144 | 1034,1,"Ryerson, Mr. Arthur Larned",male,61,1,3,PC 17608,262.375,B57 B59 B63 B66,C 145 | 1035,2,"Beauchamp, Mr. Henry James",male,28,0,0,244358,26,,S 146 | 1036,1,"Lindeberg-Lind, Mr. Erik Gustaf (Mr Edward Lingrey"")""",male,42,0,0,17475,26.55,,S 147 | 1037,3,"Vander Planke, Mr. Julius",male,31,3,0,345763,18,,S 148 | 1038,1,"Hilliard, Mr. Herbert Henry",male,,0,0,17463,51.8625,E46,S 149 | 1039,3,"Davies, Mr. Evan",male,22,0,0,SC/A4 23568,8.05,,S 150 | 1040,1,"Crafton, Mr. John Bertram",male,,0,0,113791,26.55,,S 151 | 1041,2,"Lahtinen, Rev. William",male,30,1,1,250651,26,,S 152 | 1042,1,"Earnshaw, Mrs. Boulton (Olive Potter)",female,23,0,1,11767,83.1583,C54,C 153 | 1043,3,"Matinoff, Mr. Nicola",male,,0,0,349255,7.8958,,C 154 | 1044,3,"Storey, Mr. Thomas",male,60.5,0,0,3701,,,S 155 | 1045,3,"Klasen, Mrs. (Hulda Kristina Eugenia Lofqvist)",female,36,0,2,350405,12.1833,,S 156 | 1046,3,"Asplund, Master. Filip Oscar",male,13,4,2,347077,31.3875,,S 157 | 1047,3,"Duquemin, Mr. Joseph",male,24,0,0,S.O./P.P. 752,7.55,,S 158 | 1048,1,"Bird, Miss. Ellen",female,29,0,0,PC 17483,221.7792,C97,S 159 | 1049,3,"Lundin, Miss. Olga Elida",female,23,0,0,347469,7.8542,,S 160 | 1050,1,"Borebank, Mr. John James",male,42,0,0,110489,26.55,D22,S 161 | 1051,3,"Peacock, Mrs. Benjamin (Edith Nile)",female,26,0,2,SOTON/O.Q. 3101315,13.775,,S 162 | 1052,3,"Smyth, Miss. Julia",female,,0,0,335432,7.7333,,Q 163 | 1053,3,"Touma, Master. Georges Youssef",male,7,1,1,2650,15.2458,,C 164 | 1054,2,"Wright, Miss. Marion",female,26,0,0,220844,13.5,,S 165 | 1055,3,"Pearce, Mr. Ernest",male,,0,0,343271,7,,S 166 | 1056,2,"Peruschitz, Rev. Joseph Maria",male,41,0,0,237393,13,,S 167 | 1057,3,"Kink-Heilmann, Mrs. Anton (Luise Heilmann)",female,26,1,1,315153,22.025,,S 168 | 1058,1,"Brandeis, Mr. Emil",male,48,0,0,PC 17591,50.4958,B10,C 169 | 1059,3,"Ford, Mr. Edward Watson",male,18,2,2,W./C. 6608,34.375,,S 170 | 1060,1,"Cassebeer, Mrs. Henry Arthur Jr (Eleanor Genevieve Fosdick)",female,,0,0,17770,27.7208,,C 171 | 1061,3,"Hellstrom, Miss. Hilda Maria",female,22,0,0,7548,8.9625,,S 172 | 1062,3,"Lithman, Mr. Simon",male,,0,0,S.O./P.P. 251,7.55,,S 173 | 1063,3,"Zakarian, Mr. Ortin",male,27,0,0,2670,7.225,,C 174 | 1064,3,"Dyker, Mr. Adolf Fredrik",male,23,1,0,347072,13.9,,S 175 | 1065,3,"Torfa, Mr. Assad",male,,0,0,2673,7.2292,,C 176 | 1066,3,"Asplund, Mr. Carl Oscar Vilhelm Gustafsson",male,40,1,5,347077,31.3875,,S 177 | 1067,2,"Brown, Miss. Edith Eileen",female,15,0,2,29750,39,,S 178 | 1068,2,"Sincock, Miss. Maude",female,20,0,0,C.A. 33112,36.75,,S 179 | 1069,1,"Stengel, Mr. Charles Emil Henry",male,54,1,0,11778,55.4417,C116,C 180 | 1070,2,"Becker, Mrs. Allen Oliver (Nellie E Baumgardner)",female,36,0,3,230136,39,F4,S 181 | 1071,1,"Compton, Mrs. Alexander Taylor (Mary Eliza Ingersoll)",female,64,0,2,PC 17756,83.1583,E45,C 182 | 1072,2,"McCrie, Mr. James Matthew",male,30,0,0,233478,13,,S 183 | 1073,1,"Compton, Mr. Alexander Taylor Jr",male,37,1,1,PC 17756,83.1583,E52,C 184 | 1074,1,"Marvin, Mrs. Daniel Warner (Mary Graham Carmichael Farquarson)",female,18,1,0,113773,53.1,D30,S 185 | 1075,3,"Lane, Mr. Patrick",male,,0,0,7935,7.75,,Q 186 | 1076,1,"Douglas, Mrs. Frederick Charles (Mary Helene Baxter)",female,27,1,1,PC 17558,247.5208,B58 B60,C 187 | 1077,2,"Maybery, Mr. Frank Hubert",male,40,0,0,239059,16,,S 188 | 1078,2,"Phillips, Miss. Alice Frances Louisa",female,21,0,1,S.O./P.P. 2,21,,S 189 | 1079,3,"Davies, Mr. Joseph",male,17,2,0,A/4 48873,8.05,,S 190 | 1080,3,"Sage, Miss. Ada",female,,8,2,CA. 2343,69.55,,S 191 | 1081,2,"Veal, Mr. James",male,40,0,0,28221,13,,S 192 | 1082,2,"Angle, Mr. William A",male,34,1,0,226875,26,,S 193 | 1083,1,"Salomon, Mr. Abraham L",male,,0,0,111163,26,,S 194 | 1084,3,"van Billiard, Master. Walter John",male,11.5,1,1,A/5. 851,14.5,,S 195 | 1085,2,"Lingane, Mr. John",male,61,0,0,235509,12.35,,Q 196 | 1086,2,"Drew, Master. Marshall Brines",male,8,0,2,28220,32.5,,S 197 | 1087,3,"Karlsson, Mr. Julius Konrad Eugen",male,33,0,0,347465,7.8542,,S 198 | 1088,1,"Spedden, Master. Robert Douglas",male,6,0,2,16966,134.5,E34,C 199 | 1089,3,"Nilsson, Miss. Berta Olivia",female,18,0,0,347066,7.775,,S 200 | 1090,2,"Baimbrigge, Mr. Charles Robert",male,23,0,0,C.A. 31030,10.5,,S 201 | 1091,3,"Rasmussen, Mrs. (Lena Jacobsen Solvang)",female,,0,0,65305,8.1125,,S 202 | 1092,3,"Murphy, Miss. Nora",female,,0,0,36568,15.5,,Q 203 | 1093,3,"Danbom, Master. Gilbert Sigvard Emanuel",male,0.33,0,2,347080,14.4,,S 204 | 1094,1,"Astor, Col. John Jacob",male,47,1,0,PC 17757,227.525,C62 C64,C 205 | 1095,2,"Quick, Miss. Winifred Vera",female,8,1,1,26360,26,,S 206 | 1096,2,"Andrew, Mr. Frank Thomas",male,25,0,0,C.A. 34050,10.5,,S 207 | 1097,1,"Omont, Mr. Alfred Fernand",male,,0,0,F.C. 12998,25.7417,,C 208 | 1098,3,"McGowan, Miss. Katherine",female,35,0,0,9232,7.75,,Q 209 | 1099,2,"Collett, Mr. Sidney C Stuart",male,24,0,0,28034,10.5,,S 210 | 1100,1,"Rosenbaum, Miss. Edith Louise",female,33,0,0,PC 17613,27.7208,A11,C 211 | 1101,3,"Delalic, Mr. Redjo",male,25,0,0,349250,7.8958,,S 212 | 1102,3,"Andersen, Mr. Albert Karvin",male,32,0,0,C 4001,22.525,,S 213 | 1103,3,"Finoli, Mr. Luigi",male,,0,0,SOTON/O.Q. 3101308,7.05,,S 214 | 1104,2,"Deacon, Mr. Percy William",male,17,0,0,S.O.C. 14879,73.5,,S 215 | 1105,2,"Howard, Mrs. Benjamin (Ellen Truelove Arman)",female,60,1,0,24065,26,,S 216 | 1106,3,"Andersson, Miss. Ida Augusta Margareta",female,38,4,2,347091,7.775,,S 217 | 1107,1,"Head, Mr. Christopher",male,42,0,0,113038,42.5,B11,S 218 | 1108,3,"Mahon, Miss. Bridget Delia",female,,0,0,330924,7.8792,,Q 219 | 1109,1,"Wick, Mr. George Dennick",male,57,1,1,36928,164.8667,,S 220 | 1110,1,"Widener, Mrs. George Dunton (Eleanor Elkins)",female,50,1,1,113503,211.5,C80,C 221 | 1111,3,"Thomson, Mr. Alexander Morrison",male,,0,0,32302,8.05,,S 222 | 1112,2,"Duran y More, Miss. Florentina",female,30,1,0,SC/PARIS 2148,13.8583,,C 223 | 1113,3,"Reynolds, Mr. Harold J",male,21,0,0,342684,8.05,,S 224 | 1114,2,"Cook, Mrs. (Selena Rogers)",female,22,0,0,W./C. 14266,10.5,F33,S 225 | 1115,3,"Karlsson, Mr. Einar Gervasius",male,21,0,0,350053,7.7958,,S 226 | 1116,1,"Candee, Mrs. Edward (Helen Churchill Hungerford)",female,53,0,0,PC 17606,27.4458,,C 227 | 1117,3,"Moubarek, Mrs. George (Omine Amenia"" Alexander)""",female,,0,2,2661,15.2458,,C 228 | 1118,3,"Asplund, Mr. Johan Charles",male,23,0,0,350054,7.7958,,S 229 | 1119,3,"McNeill, Miss. Bridget",female,,0,0,370368,7.75,,Q 230 | 1120,3,"Everett, Mr. Thomas James",male,40.5,0,0,C.A. 6212,15.1,,S 231 | 1121,2,"Hocking, Mr. Samuel James Metcalfe",male,36,0,0,242963,13,,S 232 | 1122,2,"Sweet, Mr. George Frederick",male,14,0,0,220845,65,,S 233 | 1123,1,"Willard, Miss. Constance",female,21,0,0,113795,26.55,,S 234 | 1124,3,"Wiklund, Mr. Karl Johan",male,21,1,0,3101266,6.4958,,S 235 | 1125,3,"Linehan, Mr. Michael",male,,0,0,330971,7.8792,,Q 236 | 1126,1,"Cumings, Mr. John Bradley",male,39,1,0,PC 17599,71.2833,C85,C 237 | 1127,3,"Vendel, Mr. Olof Edvin",male,20,0,0,350416,7.8542,,S 238 | 1128,1,"Warren, Mr. Frank Manley",male,64,1,0,110813,75.25,D37,C 239 | 1129,3,"Baccos, Mr. Raffull",male,20,0,0,2679,7.225,,C 240 | 1130,2,"Hiltunen, Miss. Marta",female,18,1,1,250650,13,,S 241 | 1131,1,"Douglas, Mrs. Walter Donald (Mahala Dutton)",female,48,1,0,PC 17761,106.425,C86,C 242 | 1132,1,"Lindstrom, Mrs. Carl Johan (Sigrid Posse)",female,55,0,0,112377,27.7208,,C 243 | 1133,2,"Christy, Mrs. (Alice Frances)",female,45,0,2,237789,30,,S 244 | 1134,1,"Spedden, Mr. Frederic Oakley",male,45,1,1,16966,134.5,E34,C 245 | 1135,3,"Hyman, Mr. Abraham",male,,0,0,3470,7.8875,,S 246 | 1136,3,"Johnston, Master. William Arthur Willie""""",male,,1,2,W./C. 6607,23.45,,S 247 | 1137,1,"Kenyon, Mr. Frederick R",male,41,1,0,17464,51.8625,D21,S 248 | 1138,2,"Karnes, Mrs. J Frank (Claire Bennett)",female,22,0,0,F.C.C. 13534,21,,S 249 | 1139,2,"Drew, Mr. James Vivian",male,42,1,1,28220,32.5,,S 250 | 1140,2,"Hold, Mrs. Stephen (Annie Margaret Hill)",female,29,1,0,26707,26,,S 251 | 1141,3,"Khalil, Mrs. Betros (Zahie Maria"" Elias)""",female,,1,0,2660,14.4542,,C 252 | 1142,2,"West, Miss. Barbara J",female,0.92,1,2,C.A. 34651,27.75,,S 253 | 1143,3,"Abrahamsson, Mr. Abraham August Johannes",male,20,0,0,SOTON/O2 3101284,7.925,,S 254 | 1144,1,"Clark, Mr. Walter Miller",male,27,1,0,13508,136.7792,C89,C 255 | 1145,3,"Salander, Mr. Karl Johan",male,24,0,0,7266,9.325,,S 256 | 1146,3,"Wenzel, Mr. Linhart",male,32.5,0,0,345775,9.5,,S 257 | 1147,3,"MacKay, Mr. George William",male,,0,0,C.A. 42795,7.55,,S 258 | 1148,3,"Mahon, Mr. John",male,,0,0,AQ/4 3130,7.75,,Q 259 | 1149,3,"Niklasson, Mr. Samuel",male,28,0,0,363611,8.05,,S 260 | 1150,2,"Bentham, Miss. Lilian W",female,19,0,0,28404,13,,S 261 | 1151,3,"Midtsjo, Mr. Karl Albert",male,21,0,0,345501,7.775,,S 262 | 1152,3,"de Messemaeker, Mr. Guillaume Joseph",male,36.5,1,0,345572,17.4,,S 263 | 1153,3,"Nilsson, Mr. August Ferdinand",male,21,0,0,350410,7.8542,,S 264 | 1154,2,"Wells, Mrs. Arthur Henry (Addie"" Dart Trevaskis)""",female,29,0,2,29103,23,,S 265 | 1155,3,"Klasen, Miss. Gertrud Emilia",female,1,1,1,350405,12.1833,,S 266 | 1156,2,"Portaluppi, Mr. Emilio Ilario Giuseppe",male,30,0,0,C.A. 34644,12.7375,,C 267 | 1157,3,"Lyntakoff, Mr. Stanko",male,,0,0,349235,7.8958,,S 268 | 1158,1,"Chisholm, Mr. Roderick Robert Crispin",male,,0,0,112051,0,,S 269 | 1159,3,"Warren, Mr. Charles William",male,,0,0,C.A. 49867,7.55,,S 270 | 1160,3,"Howard, Miss. May Elizabeth",female,,0,0,A. 2. 39186,8.05,,S 271 | 1161,3,"Pokrnic, Mr. Mate",male,17,0,0,315095,8.6625,,S 272 | 1162,1,"McCaffry, Mr. Thomas Francis",male,46,0,0,13050,75.2417,C6,C 273 | 1163,3,"Fox, Mr. Patrick",male,,0,0,368573,7.75,,Q 274 | 1164,1,"Clark, Mrs. Walter Miller (Virginia McDowell)",female,26,1,0,13508,136.7792,C89,C 275 | 1165,3,"Lennon, Miss. Mary",female,,1,0,370371,15.5,,Q 276 | 1166,3,"Saade, Mr. Jean Nassr",male,,0,0,2676,7.225,,C 277 | 1167,2,"Bryhl, Miss. Dagmar Jenny Ingeborg ",female,20,1,0,236853,26,,S 278 | 1168,2,"Parker, Mr. Clifford Richard",male,28,0,0,SC 14888,10.5,,S 279 | 1169,2,"Faunthorpe, Mr. Harry",male,40,1,0,2926,26,,S 280 | 1170,2,"Ware, Mr. John James",male,30,1,0,CA 31352,21,,S 281 | 1171,2,"Oxenham, Mr. Percy Thomas",male,22,0,0,W./C. 14260,10.5,,S 282 | 1172,3,"Oreskovic, Miss. Jelka",female,23,0,0,315085,8.6625,,S 283 | 1173,3,"Peacock, Master. Alfred Edward",male,0.75,1,1,SOTON/O.Q. 3101315,13.775,,S 284 | 1174,3,"Fleming, Miss. Honora",female,,0,0,364859,7.75,,Q 285 | 1175,3,"Touma, Miss. Maria Youssef",female,9,1,1,2650,15.2458,,C 286 | 1176,3,"Rosblom, Miss. Salli Helena",female,2,1,1,370129,20.2125,,S 287 | 1177,3,"Dennis, Mr. William",male,36,0,0,A/5 21175,7.25,,S 288 | 1178,3,"Franklin, Mr. Charles (Charles Fardon)",male,,0,0,SOTON/O.Q. 3101314,7.25,,S 289 | 1179,1,"Snyder, Mr. John Pillsbury",male,24,1,0,21228,82.2667,B45,S 290 | 1180,3,"Mardirosian, Mr. Sarkis",male,,0,0,2655,7.2292,F E46,C 291 | 1181,3,"Ford, Mr. Arthur",male,,0,0,A/5 1478,8.05,,S 292 | 1182,1,"Rheims, Mr. George Alexander Lucien",male,,0,0,PC 17607,39.6,,S 293 | 1183,3,"Daly, Miss. Margaret Marcella Maggie""""",female,30,0,0,382650,6.95,,Q 294 | 1184,3,"Nasr, Mr. Mustafa",male,,0,0,2652,7.2292,,C 295 | 1185,1,"Dodge, Dr. Washington",male,53,1,1,33638,81.8583,A34,S 296 | 1186,3,"Wittevrongel, Mr. Camille",male,36,0,0,345771,9.5,,S 297 | 1187,3,"Angheloff, Mr. Minko",male,26,0,0,349202,7.8958,,S 298 | 1188,2,"Laroche, Miss. Louise",female,1,1,2,SC/Paris 2123,41.5792,,C 299 | 1189,3,"Samaan, Mr. Hanna",male,,2,0,2662,21.6792,,C 300 | 1190,1,"Loring, Mr. Joseph Holland",male,30,0,0,113801,45.5,,S 301 | 1191,3,"Johansson, Mr. Nils",male,29,0,0,347467,7.8542,,S 302 | 1192,3,"Olsson, Mr. Oscar Wilhelm",male,32,0,0,347079,7.775,,S 303 | 1193,2,"Malachard, Mr. Noel",male,,0,0,237735,15.0458,D,C 304 | 1194,2,"Phillips, Mr. Escott Robert",male,43,0,1,S.O./P.P. 2,21,,S 305 | 1195,3,"Pokrnic, Mr. Tome",male,24,0,0,315092,8.6625,,S 306 | 1196,3,"McCarthy, Miss. Catherine Katie""""",female,,0,0,383123,7.75,,Q 307 | 1197,1,"Crosby, Mrs. Edward Gifford (Catherine Elizabeth Halstead)",female,64,1,1,112901,26.55,B26,S 308 | 1198,1,"Allison, Mr. Hudson Joshua Creighton",male,30,1,2,113781,151.55,C22 C26,S 309 | 1199,3,"Aks, Master. Philip Frank",male,0.83,0,1,392091,9.35,,S 310 | 1200,1,"Hays, Mr. Charles Melville",male,55,1,1,12749,93.5,B69,S 311 | 1201,3,"Hansen, Mrs. Claus Peter (Jennie L Howard)",female,45,1,0,350026,14.1083,,S 312 | 1202,3,"Cacic, Mr. Jego Grga",male,18,0,0,315091,8.6625,,S 313 | 1203,3,"Vartanian, Mr. David",male,22,0,0,2658,7.225,,C 314 | 1204,3,"Sadowitz, Mr. Harry",male,,0,0,LP 1588,7.575,,S 315 | 1205,3,"Carr, Miss. Jeannie",female,37,0,0,368364,7.75,,Q 316 | 1206,1,"White, Mrs. John Stuart (Ella Holmes)",female,55,0,0,PC 17760,135.6333,C32,C 317 | 1207,3,"Hagardon, Miss. Kate",female,17,0,0,AQ/3. 30631,7.7333,,Q 318 | 1208,1,"Spencer, Mr. William Augustus",male,57,1,0,PC 17569,146.5208,B78,C 319 | 1209,2,"Rogers, Mr. Reginald Harry",male,19,0,0,28004,10.5,,S 320 | 1210,3,"Jonsson, Mr. Nils Hilding",male,27,0,0,350408,7.8542,,S 321 | 1211,2,"Jefferys, Mr. Ernest Wilfred",male,22,2,0,C.A. 31029,31.5,,S 322 | 1212,3,"Andersson, Mr. Johan Samuel",male,26,0,0,347075,7.775,,S 323 | 1213,3,"Krekorian, Mr. Neshan",male,25,0,0,2654,7.2292,F E57,C 324 | 1214,2,"Nesson, Mr. Israel",male,26,0,0,244368,13,F2,S 325 | 1215,1,"Rowe, Mr. Alfred G",male,33,0,0,113790,26.55,,S 326 | 1216,1,"Kreuchen, Miss. Emilie",female,39,0,0,24160,211.3375,,S 327 | 1217,3,"Assam, Mr. Ali",male,23,0,0,SOTON/O.Q. 3101309,7.05,,S 328 | 1218,2,"Becker, Miss. Ruth Elizabeth",female,12,2,1,230136,39,F4,S 329 | 1219,1,"Rosenshine, Mr. George (Mr George Thorne"")""",male,46,0,0,PC 17585,79.2,,C 330 | 1220,2,"Clarke, Mr. Charles Valentine",male,29,1,0,2003,26,,S 331 | 1221,2,"Enander, Mr. Ingvar",male,21,0,0,236854,13,,S 332 | 1222,2,"Davies, Mrs. John Morgan (Elizabeth Agnes Mary White) ",female,48,0,2,C.A. 33112,36.75,,S 333 | 1223,1,"Dulles, Mr. William Crothers",male,39,0,0,PC 17580,29.7,A18,C 334 | 1224,3,"Thomas, Mr. Tannous",male,,0,0,2684,7.225,,C 335 | 1225,3,"Nakid, Mrs. Said (Waika Mary"" Mowad)""",female,19,1,1,2653,15.7417,,C 336 | 1226,3,"Cor, Mr. Ivan",male,27,0,0,349229,7.8958,,S 337 | 1227,1,"Maguire, Mr. John Edward",male,30,0,0,110469,26,C106,S 338 | 1228,2,"de Brito, Mr. Jose Joaquim",male,32,0,0,244360,13,,S 339 | 1229,3,"Elias, Mr. Joseph",male,39,0,2,2675,7.2292,,C 340 | 1230,2,"Denbury, Mr. Herbert",male,25,0,0,C.A. 31029,31.5,,S 341 | 1231,3,"Betros, Master. Seman",male,,0,0,2622,7.2292,,C 342 | 1232,2,"Fillbrook, Mr. Joseph Charles",male,18,0,0,C.A. 15185,10.5,,S 343 | 1233,3,"Lundstrom, Mr. Thure Edvin",male,32,0,0,350403,7.5792,,S 344 | 1234,3,"Sage, Mr. John George",male,,1,9,CA. 2343,69.55,,S 345 | 1235,1,"Cardeza, Mrs. James Warburton Martinez (Charlotte Wardle Drake)",female,58,0,1,PC 17755,512.3292,B51 B53 B55,C 346 | 1236,3,"van Billiard, Master. James William",male,,1,1,A/5. 851,14.5,,S 347 | 1237,3,"Abelseth, Miss. Karen Marie",female,16,0,0,348125,7.65,,S 348 | 1238,2,"Botsford, Mr. William Hull",male,26,0,0,237670,13,,S 349 | 1239,3,"Whabee, Mrs. George Joseph (Shawneene Abi-Saab)",female,38,0,0,2688,7.2292,,C 350 | 1240,2,"Giles, Mr. Ralph",male,24,0,0,248726,13.5,,S 351 | 1241,2,"Walcroft, Miss. Nellie",female,31,0,0,F.C.C. 13528,21,,S 352 | 1242,1,"Greenfield, Mrs. Leo David (Blanche Strouse)",female,45,0,1,PC 17759,63.3583,D10 D12,C 353 | 1243,2,"Stokes, Mr. Philip Joseph",male,25,0,0,F.C.C. 13540,10.5,,S 354 | 1244,2,"Dibden, Mr. William",male,18,0,0,S.O.C. 14879,73.5,,S 355 | 1245,2,"Herman, Mr. Samuel",male,49,1,2,220845,65,,S 356 | 1246,3,"Dean, Miss. Elizabeth Gladys Millvina""""",female,0.17,1,2,C.A. 2315,20.575,,S 357 | 1247,1,"Julian, Mr. Henry Forbes",male,50,0,0,113044,26,E60,S 358 | 1248,1,"Brown, Mrs. John Murray (Caroline Lane Lamson)",female,59,2,0,11769,51.4792,C101,S 359 | 1249,3,"Lockyer, Mr. Edward",male,,0,0,1222,7.8792,,S 360 | 1250,3,"O'Keefe, Mr. Patrick",male,,0,0,368402,7.75,,Q 361 | 1251,3,"Lindell, Mrs. Edvard Bengtsson (Elin Gerda Persson)",female,30,1,0,349910,15.55,,S 362 | 1252,3,"Sage, Master. William Henry",male,14.5,8,2,CA. 2343,69.55,,S 363 | 1253,2,"Mallet, Mrs. Albert (Antoinette Magnin)",female,24,1,1,S.C./PARIS 2079,37.0042,,C 364 | 1254,2,"Ware, Mrs. John James (Florence Louise Long)",female,31,0,0,CA 31352,21,,S 365 | 1255,3,"Strilic, Mr. Ivan",male,27,0,0,315083,8.6625,,S 366 | 1256,1,"Harder, Mrs. George Achilles (Dorothy Annan)",female,25,1,0,11765,55.4417,E50,C 367 | 1257,3,"Sage, Mrs. John (Annie Bullen)",female,,1,9,CA. 2343,69.55,,S 368 | 1258,3,"Caram, Mr. Joseph",male,,1,0,2689,14.4583,,C 369 | 1259,3,"Riihivouri, Miss. Susanna Juhantytar Sanni""""",female,22,0,0,3101295,39.6875,,S 370 | 1260,1,"Gibson, Mrs. Leonard (Pauline C Boeson)",female,45,0,1,112378,59.4,,C 371 | 1261,2,"Pallas y Castello, Mr. Emilio",male,29,0,0,SC/PARIS 2147,13.8583,,C 372 | 1262,2,"Giles, Mr. Edgar",male,21,1,0,28133,11.5,,S 373 | 1263,1,"Wilson, Miss. Helen Alice",female,31,0,0,16966,134.5,E39 E41,C 374 | 1264,1,"Ismay, Mr. Joseph Bruce",male,49,0,0,112058,0,B52 B54 B56,S 375 | 1265,2,"Harbeck, Mr. William H",male,44,0,0,248746,13,,S 376 | 1266,1,"Dodge, Mrs. Washington (Ruth Vidaver)",female,54,1,1,33638,81.8583,A34,S 377 | 1267,1,"Bowen, Miss. Grace Scott",female,45,0,0,PC 17608,262.375,,C 378 | 1268,3,"Kink, Miss. Maria",female,22,2,0,315152,8.6625,,S 379 | 1269,2,"Cotterill, Mr. Henry Harry""""",male,21,0,0,29107,11.5,,S 380 | 1270,1,"Hipkins, Mr. William Edward",male,55,0,0,680,50,C39,S 381 | 1271,3,"Asplund, Master. Carl Edgar",male,5,4,2,347077,31.3875,,S 382 | 1272,3,"O'Connor, Mr. Patrick",male,,0,0,366713,7.75,,Q 383 | 1273,3,"Foley, Mr. Joseph",male,26,0,0,330910,7.8792,,Q 384 | 1274,3,"Risien, Mrs. Samuel (Emma)",female,,0,0,364498,14.5,,S 385 | 1275,3,"McNamee, Mrs. Neal (Eileen O'Leary)",female,19,1,0,376566,16.1,,S 386 | 1276,2,"Wheeler, Mr. Edwin Frederick""""",male,,0,0,SC/PARIS 2159,12.875,,S 387 | 1277,2,"Herman, Miss. Kate",female,24,1,2,220845,65,,S 388 | 1278,3,"Aronsson, Mr. Ernst Axel Algot",male,24,0,0,349911,7.775,,S 389 | 1279,2,"Ashby, Mr. John",male,57,0,0,244346,13,,S 390 | 1280,3,"Canavan, Mr. Patrick",male,21,0,0,364858,7.75,,Q 391 | 1281,3,"Palsson, Master. Paul Folke",male,6,3,1,349909,21.075,,S 392 | 1282,1,"Payne, Mr. Vivian Ponsonby",male,23,0,0,12749,93.5,B24,S 393 | 1283,1,"Lines, Mrs. Ernest H (Elizabeth Lindsey James)",female,51,0,1,PC 17592,39.4,D28,S 394 | 1284,3,"Abbott, Master. Eugene Joseph",male,13,0,2,C.A. 2673,20.25,,S 395 | 1285,2,"Gilbert, Mr. William",male,47,0,0,C.A. 30769,10.5,,S 396 | 1286,3,"Kink-Heilmann, Mr. Anton",male,29,3,1,315153,22.025,,S 397 | 1287,1,"Smith, Mrs. Lucien Philip (Mary Eloise Hughes)",female,18,1,0,13695,60,C31,S 398 | 1288,3,"Colbert, Mr. Patrick",male,24,0,0,371109,7.25,,Q 399 | 1289,1,"Frolicher-Stehli, Mrs. Maxmillian (Margaretha Emerentia Stehli)",female,48,1,1,13567,79.2,B41,C 400 | 1290,3,"Larsson-Rondberg, Mr. Edvard A",male,22,0,0,347065,7.775,,S 401 | 1291,3,"Conlon, Mr. Thomas Henry",male,31,0,0,21332,7.7333,,Q 402 | 1292,1,"Bonnell, Miss. Caroline",female,30,0,0,36928,164.8667,C7,S 403 | 1293,2,"Gale, Mr. Harry",male,38,1,0,28664,21,,S 404 | 1294,1,"Gibson, Miss. Dorothy Winifred",female,22,0,1,112378,59.4,,C 405 | 1295,1,"Carrau, Mr. Jose Pedro",male,17,0,0,113059,47.1,,S 406 | 1296,1,"Frauenthal, Mr. Isaac Gerald",male,43,1,0,17765,27.7208,D40,C 407 | 1297,2,"Nourney, Mr. Alfred (Baron von Drachstedt"")""",male,20,0,0,SC/PARIS 2166,13.8625,D38,C 408 | 1298,2,"Ware, Mr. William Jeffery",male,23,1,0,28666,10.5,,S 409 | 1299,1,"Widener, Mr. George Dunton",male,50,1,1,113503,211.5,C80,C 410 | 1300,3,"Riordan, Miss. Johanna Hannah""""",female,,0,0,334915,7.7208,,Q 411 | 1301,3,"Peacock, Miss. Treasteall",female,3,1,1,SOTON/O.Q. 3101315,13.775,,S 412 | 1302,3,"Naughton, Miss. Hannah",female,,0,0,365237,7.75,,Q 413 | 1303,1,"Minahan, Mrs. William Edward (Lillian E Thorpe)",female,37,1,0,19928,90,C78,Q 414 | 1304,3,"Henriksson, Miss. Jenny Lovisa",female,28,0,0,347086,7.775,,S 415 | 1305,3,"Spector, Mr. Woolf",male,,0,0,A.5. 3236,8.05,,S 416 | 1306,1,"Oliva y Ocana, Dona. Fermina",female,39,0,0,PC 17758,108.9,C105,C 417 | 1307,3,"Saether, Mr. Simon Sivertsen",male,38.5,0,0,SOTON/O.Q. 3101262,7.25,,S 418 | 1308,3,"Ware, Mr. Frederick",male,,0,0,359309,8.05,,S 419 | 1309,3,"Peter, Master. Michael J",male,,1,1,2668,22.3583,,C 420 | -------------------------------------------------------------------------------- /Session-06_14-10-23_DecisionTrees_RandomForests_Boosting/Boosting_hyperparameter_tuning.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "knwYV1QmCuEU" 7 | }, 8 | "source": [ 9 | "# Installing Dependencies" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": 1, 15 | "metadata": { 16 | "colab": { 17 | "base_uri": "https://localhost:8080/" 18 | }, 19 | "id": "tnwsW6x9w1QO", 20 | "outputId": "fad3ad0d-f838-4cfe-e95c-f8295d5fd365" 21 | }, 22 | "outputs": [ 23 | { 24 | "name": "stdout", 25 | "output_type": "stream", 26 | "text": [ 27 | "Requirement already satisfied: catboost in c:\\users\\abhin\\anaconda3\\lib\\site-packages (1.2.2)\n", 28 | "Requirement already satisfied: plotly in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from catboost) (5.6.0)\n", 29 | "Requirement already satisfied: six in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from catboost) (1.16.0)\n", 30 | "Requirement already satisfied: pandas>=0.24 in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from catboost) (1.4.2)\n", 31 | "Requirement already satisfied: graphviz in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from catboost) (0.20.1)\n", 32 | "Requirement already satisfied: numpy>=1.16.0 in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from catboost) (1.21.5)\n", 33 | "Requirement already satisfied: scipy in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from catboost) (1.7.3)\n", 34 | "Requirement already satisfied: matplotlib in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from catboost) (3.5.1)\n", 35 | "Requirement already satisfied: python-dateutil>=2.8.1 in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from pandas>=0.24->catboost) (2.8.2)\n", 36 | "Requirement already satisfied: pytz>=2020.1 in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from pandas>=0.24->catboost) (2021.3)\n", 37 | "Requirement already satisfied: pyparsing>=2.2.1 in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from matplotlib->catboost) (3.0.4)\n", 38 | "Requirement already satisfied: cycler>=0.10 in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from matplotlib->catboost) (0.11.0)\n", 39 | "Requirement already satisfied: fonttools>=4.22.0 in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from matplotlib->catboost) (4.25.0)" 40 | ] 41 | }, 42 | { 43 | "name": "stderr", 44 | "output_type": "stream", 45 | "text": [ 46 | "WARNING: You are using pip version 22.0.4; however, version 23.2.1 is available.\n", 47 | "You should consider upgrading via the 'C:\\Users\\abhin\\anaconda3\\python.exe -m pip install --upgrade pip' command.\n" 48 | ] 49 | }, 50 | { 51 | "name": "stdout", 52 | "output_type": "stream", 53 | "text": [ 54 | "\n", 55 | "Requirement already satisfied: pillow>=6.2.0 in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from matplotlib->catboost) (9.0.1)\n", 56 | "Requirement already satisfied: packaging>=20.0 in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from matplotlib->catboost) (21.3)\n", 57 | "Requirement already satisfied: kiwisolver>=1.0.1 in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from matplotlib->catboost) (1.3.2)\n", 58 | "Requirement already satisfied: tenacity>=6.2.0 in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from plotly->catboost) (8.0.1)\n", 59 | "Requirement already satisfied: lightgbm in c:\\users\\abhin\\anaconda3\\lib\\site-packages (4.1.0)\n", 60 | "Requirement already satisfied: numpy in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from lightgbm) (1.21.5)\n", 61 | "Requirement already satisfied: scipy in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from lightgbm) (1.7.3)\n" 62 | ] 63 | }, 64 | { 65 | "name": "stderr", 66 | "output_type": "stream", 67 | "text": [ 68 | "WARNING: You are using pip version 22.0.4; however, version 23.2.1 is available.\n", 69 | "You should consider upgrading via the 'C:\\Users\\abhin\\anaconda3\\python.exe -m pip install --upgrade pip' command.\n" 70 | ] 71 | }, 72 | { 73 | "name": "stdout", 74 | "output_type": "stream", 75 | "text": [ 76 | "Requirement already satisfied: xgboost in c:\\users\\abhin\\anaconda3\\lib\\site-packages (2.0.0)\n", 77 | "Requirement already satisfied: scipy in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from xgboost) (1.7.3)\n", 78 | "Requirement already satisfied: numpy in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from xgboost) (1.21.5)\n" 79 | ] 80 | }, 81 | { 82 | "name": "stderr", 83 | "output_type": "stream", 84 | "text": [ 85 | "WARNING: You are using pip version 22.0.4; however, version 23.2.1 is available.\n", 86 | "You should consider upgrading via the 'C:\\Users\\abhin\\anaconda3\\python.exe -m pip install --upgrade pip' command.\n" 87 | ] 88 | }, 89 | { 90 | "name": "stdout", 91 | "output_type": "stream", 92 | "text": [ 93 | "Collecting hyperopt\n", 94 | " Downloading hyperopt-0.2.7-py2.py3-none-any.whl (1.6 MB)\n", 95 | " ---------------------------------------- 1.6/1.6 MB 3.7 MB/s eta 0:00:00\n", 96 | "Requirement already satisfied: networkx>=2.2 in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from hyperopt) (2.7.1)\n", 97 | "Collecting py4j\n", 98 | " Downloading py4j-0.10.9.7-py2.py3-none-any.whl (200 kB)\n", 99 | " -------------------------------------- 200.5/200.5 KB 4.0 MB/s eta 0:00:00\n", 100 | "Requirement already satisfied: six in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from hyperopt) (1.16.0)\n", 101 | "Requirement already satisfied: numpy in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from hyperopt) (1.21.5)\n", 102 | "Requirement already satisfied: scipy in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from hyperopt) (1.7.3)\n" 103 | ] 104 | }, 105 | { 106 | "name": "stderr", 107 | "output_type": "stream", 108 | "text": [ 109 | "WARNING: You are using pip version 22.0.4; however, version 23.2.1 is available.\n", 110 | "You should consider upgrading via the 'C:\\Users\\abhin\\anaconda3\\python.exe -m pip install --upgrade pip' command.\n" 111 | ] 112 | }, 113 | { 114 | "name": "stdout", 115 | "output_type": "stream", 116 | "text": [ 117 | "Requirement already satisfied: future in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from hyperopt) (0.18.2)\n", 118 | "Requirement already satisfied: cloudpickle in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from hyperopt) (2.0.0)\n", 119 | "Requirement already satisfied: tqdm in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from hyperopt) (4.64.0)\n", 120 | "Requirement already satisfied: colorama in c:\\users\\abhin\\anaconda3\\lib\\site-packages (from tqdm->hyperopt) (0.4.6)\n", 121 | "Installing collected packages: py4j, hyperopt\n", 122 | "Successfully installed hyperopt-0.2.7 py4j-0.10.9.7\n" 123 | ] 124 | } 125 | ], 126 | "source": [ 127 | "!pip install catboost\n", 128 | "!pip install lightgbm\n", 129 | "!pip install xgboost\n", 130 | "!pip install hyperopt" 131 | ] 132 | }, 133 | { 134 | "cell_type": "markdown", 135 | "metadata": {}, 136 | "source": [ 137 | "# Importing Dependencies" 138 | ] 139 | }, 140 | { 141 | "cell_type": "code", 142 | "execution_count": 2, 143 | "metadata": { 144 | "id": "sp9bGvxdqiOw" 145 | }, 146 | "outputs": [], 147 | "source": [ 148 | "import numpy as np\n", 149 | "import pandas as pd\n", 150 | "import matplotlib.pyplot as plt\n", 151 | "import seaborn as sns\n", 152 | "import time\n", 153 | "\n", 154 | "import scipy.stats as stats\n", 155 | "from sklearn import metrics\n", 156 | "from sklearn.preprocessing import LabelEncoder\n", 157 | "from sklearn.model_selection import train_test_split\n", 158 | "from sklearn.model_selection import RepeatedStratifiedKFold\n", 159 | "from sklearn.model_selection import cross_val_score\n", 160 | "from sklearn.ensemble import AdaBoostClassifier\n", 161 | "from sklearn.ensemble import GradientBoostingClassifier\n", 162 | "from catboost import CatBoostClassifier\n", 163 | "from lightgbm import LGBMClassifier\n", 164 | "from xgboost import XGBClassifier\n", 165 | "from hyperopt import fmin, tpe, hp, STATUS_OK, Trials\n", 166 | "from sklearn.tree import DecisionTreeClassifier\n", 167 | "from sklearn.metrics import accuracy_score\n", 168 | "from hyperopt.pyll import scope\n", 169 | "import warnings\n", 170 | "# Filter out the FutureWarning related to is_sparse\n", 171 | "warnings.filterwarnings(\"ignore\", category=FutureWarning, module=\"xgboost\")" 172 | ] 173 | }, 174 | { 175 | "cell_type": "markdown", 176 | "metadata": { 177 | "id": "ByCnDDmkDayW" 178 | }, 179 | "source": [ 180 | "# Loading Dataset\n", 181 | "(Unbalanced) Wine Dataset\n", 182 | "You can download it from: https://archive.ics.uci.edu/dataset/109/wine" 183 | ] 184 | }, 185 | { 186 | "cell_type": "code", 187 | "execution_count": 3, 188 | "metadata": { 189 | "id": "23mGy-W6DZLy" 190 | }, 191 | "outputs": [], 192 | "source": [ 193 | "wine_df = pd.read_csv('wine.data', header=None)" 194 | ] 195 | }, 196 | { 197 | "cell_type": "code", 198 | "execution_count": 4, 199 | "metadata": { 200 | "id": "C0N1S4LWDnbw" 201 | }, 202 | "outputs": [], 203 | "source": [ 204 | "X = wine_df.iloc[:, 1:]\n", 205 | "y = wine_df.iloc[:, 0]" 206 | ] 207 | }, 208 | { 209 | "cell_type": "code", 210 | "execution_count": 5, 211 | "metadata": { 212 | "id": "omlj8qxkDoM1" 213 | }, 214 | "outputs": [], 215 | "source": [ 216 | "le = LabelEncoder()\n", 217 | "y = le.fit_transform(y)" 218 | ] 219 | }, 220 | { 221 | "cell_type": "code", 222 | "execution_count": 6, 223 | "metadata": { 224 | "id": "bEtKdQvTEsAR" 225 | }, 226 | "outputs": [], 227 | "source": [ 228 | "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)" 229 | ] 230 | }, 231 | { 232 | "cell_type": "markdown", 233 | "metadata": {}, 234 | "source": [ 235 | "# Training, Hyperparameter tuning and comparison" 236 | ] 237 | }, 238 | { 239 | "cell_type": "code", 240 | "execution_count": 9, 241 | "metadata": { 242 | "colab": { 243 | "base_uri": "https://localhost:8080/" 244 | }, 245 | "id": "vcZuN-z4CdXh", 246 | "outputId": "ee31c32a-6b6b-467e-f741-153da73f7c60" 247 | }, 248 | "outputs": [ 249 | { 250 | "name": "stdout", 251 | "output_type": "stream", 252 | "text": [ 253 | "100%|██████████| 50/50 [00:18<00:00, 2.65trial/s, best loss: -1.0] \n", 254 | "Best hyperparameters for AdaBoost:\n", 255 | "{'n_estimators': 200.0, 'learning_rate': 0.06659352635164861, 'max_depth': 4.0, 'max_features': 'sqrt', 'min_samples_leaf': 3.0, 'min_samples_split': 2.0, 'random_state': 42}\n", 256 | "100%|██████████| 50/50 [00:44<00:00, 1.12trial/s, best loss: -1.0] \n", 257 | "Best hyperparameters for GradBoost:\n", 258 | "{'criterion': 'friedman_mse', 'max_features': 'sqrt', 'n_estimators': 100, 'learning_rate': 0.04102652661864284, 'max_depth': 3, 'min_samples_split': 7, 'min_samples_leaf': 7, 'min_weight_fraction_leaf': 0.0, 'min_impurity_decrease': 1.0, 'ccp_alpha': 0.0, 'random_state': 42}\n", 259 | "100%|██████████| 50/50 [02:17<00:00, 2.75s/trial, best loss: -1.0]\n", 260 | "Best hyperparameters for CatBoost:\n", 261 | "{'n_estimators': 550, 'learning_rate': 0.0479901225935416, 'min_child_samples': 1, 'max_depth': 6, 'reg_lambda': 3.3766279624518107, 'silent': True, 'random_state': 42}\n", 262 | "100%|██████████| 50/50 [00:01<00:00, 29.11trial/s, best loss: -0.9722222222222222]\n", 263 | "Best hyperparameters for LightGBM:\n", 264 | "{'class_weight': 'balanced', 'boosting_type': 'gbdt', 'num_leaves': 55, 'learning_rate': 0.04496177447997528, 'min_child_samples': 10, 'reg_alpha': 0.3916912792044354, 'reg_lambda': 1.4941077467431771, 'colsample_by_tree': 0.379259630420579, 'verbosity': -1, 'random_state': 42}\n", 265 | "100%|██████████| 50/50 [00:21<00:00, 2.35trial/s, best loss: -1.0] \n", 266 | "Best hyperparameters for XGBoost:\n", 267 | "{'booster': 'gbtree', 'learning_rate': 0.011777426690454684, 'gamma': 2, 'max_depth': 4, 'min_child_weight': 1, 'colsample_bytree': 0.6642423404208758, 'colsample_bylevel': 0.8389604376670141, 'colsample_bynode': 0.46801910869053165, 'reg_alpha': 1.3842922617481603, 'reg_lambda': 0.25127542856871243, 'random_state': 42}\n" 268 | ] 269 | } 270 | ], 271 | "source": [ 272 | "best_hyperparams = {\n", 273 | " 'AdaBoost': {},\n", 274 | " 'GradBoost': {},\n", 275 | " 'CatBoost': {},\n", 276 | " 'LightGBM': {},\n", 277 | " 'XGBoost': {}\n", 278 | "}\n", 279 | "\n", 280 | "# Define the hyperparameter search space for each algorithm\n", 281 | "\n", 282 | "def optimize_adaboost(params):\n", 283 | " estimator_params = params['estimator']\n", 284 | " estimator_new = DecisionTreeClassifier(**estimator_params)\n", 285 | "\n", 286 | " clf = AdaBoostClassifier(base_estimator=estimator_new, n_estimators=params['n_estimators'], learning_rate=params['learning_rate'], random_state=params['random_state'])\n", 287 | " clf.fit(X_train, y_train)\n", 288 | " y_pred = clf.predict(X_test)\n", 289 | " return -accuracy_score(y_test, y_pred)\n", 290 | "\n", 291 | "def optimize_gradientboost(params):\n", 292 | " clf = GradientBoostingClassifier(**params)\n", 293 | " clf.fit(X_train, y_train)\n", 294 | " y_pred = clf.predict(X_test)\n", 295 | " return -accuracy_score(y_test, y_pred)\n", 296 | "\n", 297 | "def optimize_catboost(params):\n", 298 | " clf = CatBoostClassifier(**params)\n", 299 | " clf.fit(X_train, y_train)\n", 300 | " y_pred = clf.predict(X_test)\n", 301 | " return -accuracy_score(y_test, y_pred)\n", 302 | "\n", 303 | "def optimize_lightgbm(params):\n", 304 | " clf = LGBMClassifier(**params)\n", 305 | " clf.fit(X_train, y_train)\n", 306 | " y_pred = clf.predict(X_test)\n", 307 | " return -accuracy_score(y_test, y_pred)\n", 308 | "\n", 309 | "def optimize_xgboost(params):\n", 310 | " clf = XGBClassifier(**params)\n", 311 | " clf.fit(X_train, y_train)\n", 312 | " y_pred = clf.predict(X_test)\n", 313 | " return -accuracy_score(y_test, y_pred)\n", 314 | "\n", 315 | "# Define the hyperparameter search space for each algorithm\n", 316 | "\n", 317 | "max_features_choices = [None, 'sqrt', 'log2']\n", 318 | "space_adaboost = {\n", 319 | " 'n_estimators': 1 + scope.int(hp.quniform('n_estimators', 5, 1500, 50)),\n", 320 | " 'learning_rate': hp.loguniform('learning_rate', np.log(0.01), np.log(0.1)),\n", 321 | " 'estimator': {\n", 322 | " 'max_depth': scope.int(hp.quniform('max_depth', 1, 6, 1)), # Decision tree depth\n", 323 | " 'min_samples_split': scope.int(hp.quniform('min_samples_split', 2, 8, 2)), # Min samples required to split\n", 324 | " 'min_samples_leaf': scope.int(hp.quniform('min_samples_leaf', 1, 5, 1)), # Min samples required in a leaf node\n", 325 | " 'max_features': hp.choice('max_features', max_features_choices),\n", 326 | " },\n", 327 | " 'random_state': 42\n", 328 | "}\n", 329 | "\n", 330 | "criterion_choices = ['friedman_mse', 'squared_error']\n", 331 | "max_features_choices = [None, 'sqrt', 'log2']\n", 332 | "space_gradientboost = {\n", 333 | " 'criterion': hp.choice('criterion', criterion_choices),\n", 334 | " 'max_features': hp.choice('max_features', max_features_choices),\n", 335 | " 'n_estimators': 1 + scope.int(hp.quniform('n_estimators', 5, 1500, 50)),\n", 336 | " 'learning_rate': hp.loguniform('learning_rate', np.log(0.01), np.log(0.1)),\n", 337 | " 'max_depth': scope.int(hp.quniform('max_depth', 1, 6, 1)),\n", 338 | " 'min_samples_split': scope.int(hp.quniform('min_samples_split', 2, 10, 1)),\n", 339 | " 'min_samples_leaf': scope.int(hp.quniform('min_samples_leaf', 1, 10, 1)),\n", 340 | " 'min_weight_fraction_leaf': hp.quniform('min_weight_fraction_leaf', 0.0, 0.5, 0.1),\n", 341 | " 'min_impurity_decrease': hp.quniform('min_impurity_decrease', 0.0, 5, 1),\n", 342 | " 'ccp_alpha': hp.quniform('ccp_alpha', 0.0, 5, 1),\n", 343 | " 'random_state': 42\n", 344 | "}\n", 345 | "\n", 346 | "space_catboost = {\n", 347 | " 'n_estimators': 1 + scope.int(hp.quniform('n_estimators', 5, 1500, 50)),\n", 348 | " 'learning_rate': hp.loguniform('learning_rate', np.log(0.01), np.log(0.1)),\n", 349 | " 'min_child_samples': scope.int(hp.quniform('min_child_samples', 1, 10, 1)),\n", 350 | " 'max_depth': scope.int(hp.quniform('max_depth', 1, 10, 1)),\n", 351 | " 'reg_lambda': hp.uniform('reg_lambda', 0.0, 5.0),\n", 352 | " 'silent': True\n", 353 | "}\n", 354 | "\n", 355 | "class_weight_choices = ['balanced']\n", 356 | "boosting_type_choices = ['gbdt', 'dart', 'goss']\n", 357 | "space_lightgbm = {\n", 358 | " 'class_weight': hp.choice('class_weight', class_weight_choices), \n", 359 | " 'boosting_type': hp.choice('boosting_type', boosting_type_choices),\n", 360 | " 'num_leaves': scope.int(hp.quniform('num_leaves', 30, 100, 5)),\n", 361 | " 'learning_rate': hp.loguniform('learning_rate', np.log(0.01), np.log(0.1)),\n", 362 | " 'min_child_samples': scope.int(hp.quniform('min_child_samples', 10, 200, 10)),\n", 363 | " 'reg_alpha': hp.uniform('reg_alpha', 0.0, 2.0),\n", 364 | " 'reg_lambda': hp.uniform('reg_lambda', 0.0, 5.0),\n", 365 | " 'colsample_bytree': hp.uniform('colsample_by_tree', 0.1, 1.0),\n", 366 | " 'verbosity': -1,\n", 367 | " 'random_state': 42\n", 368 | "}\n", 369 | "\n", 370 | "booster_choices = ['gbtree', 'dart']\n", 371 | "space_xgboost = {\n", 372 | " 'booster': hp.choice('booster', booster_choices),\n", 373 | " 'learning_rate': hp.loguniform('learning_rate', np.log(0.01), np.log(0.1)),\n", 374 | " 'gamma': scope.int(hp.quniform('gamma', 0, 10, 1)),\n", 375 | " 'max_depth': scope.int(hp.quniform('max_depth', 1, 6, 1)),\n", 376 | " 'min_child_weight': scope.int(hp.quniform('min_child_weight', 0, 6, 1)),\n", 377 | " 'colsample_bytree': hp.uniform('colsample_bytree', 0.1, 1.0),\n", 378 | " 'colsample_bylevel': hp.uniform('colsample_bylevel', 0.1, 1.0),\n", 379 | " 'colsample_bynode': hp.uniform('colsample_bynode', 0.1, 1.0),\n", 380 | " 'reg_alpha': hp.uniform('reg_alpha', 0.0, 2.0),\n", 381 | " 'reg_lambda': hp.uniform('reg_lambda', 0.0, 5.0),\n", 382 | " 'verbosity': 0,\n", 383 | " 'random_state': 42\n", 384 | "}\n", 385 | "\n", 386 | "# Define optimization functions and algorithm names\n", 387 | "optimizers = [\n", 388 | " (optimize_adaboost, space_adaboost, 'AdaBoost'),\n", 389 | " (optimize_gradientboost, space_gradientboost, 'GradBoost'),\n", 390 | " (optimize_catboost, space_catboost, 'CatBoost'),\n", 391 | " (optimize_lightgbm, space_lightgbm, 'LightGBM'),\n", 392 | " (optimize_xgboost, space_xgboost, 'XGBoost')\n", 393 | "]\n", 394 | "\n", 395 | "\n", 396 | "# Performing hyperparameter tuning for each algorithm\n", 397 | "\n", 398 | "rstate=np.random.default_rng(42)\n", 399 | "\n", 400 | "for optimize_fn, space, algorithm_name in optimizers:\n", 401 | " if algorithm_name == 'AdaBoost':\n", 402 | " trials = Trials()\n", 403 | " best = fmin(fn=optimize_fn, space=space, algo=tpe.suggest, max_evals=50, trials=trials, rstate=rstate)\n", 404 | " \n", 405 | " # Map the choice labels\n", 406 | " max_features_label = max_features_choices[best['max_features']]\n", 407 | "\n", 408 | " # Store the best AdaBoost hyperparameters\n", 409 | " best_hyperparams[algorithm_name] = {\n", 410 | " 'n_estimators': best['n_estimators'],\n", 411 | " 'learning_rate': best['learning_rate'],\n", 412 | " 'max_depth': best['max_depth'],\n", 413 | " 'max_features': max_features_label,\n", 414 | " 'min_samples_leaf': best['min_samples_leaf'],\n", 415 | " 'min_samples_split': best['min_samples_split'],\n", 416 | " 'random_state': 42\n", 417 | " }\n", 418 | "\n", 419 | " print(f\"Best hyperparameters for {algorithm_name}:\")\n", 420 | " print(best_hyperparams[algorithm_name])\n", 421 | "\n", 422 | " if algorithm_name == 'GradBoost':\n", 423 | " trials = Trials()\n", 424 | " best = fmin(fn=optimize_fn, space=space, algo=tpe.suggest, max_evals=50, trials=trials, rstate=rstate)\n", 425 | "\n", 426 | "\n", 427 | " # Map the choice labels \n", 428 | " criterion_label = criterion_choices[best['criterion']]\n", 429 | " max_features_label = max_features_choices[best['max_features']]\n", 430 | "\n", 431 | " # Store the best GradBoost hyperparameters\n", 432 | " best_hyperparams[algorithm_name] = {\n", 433 | " 'criterion': criterion_label,\n", 434 | " 'max_features': max_features_label,\n", 435 | " 'n_estimators': int(best['n_estimators']),\n", 436 | " 'learning_rate': best['learning_rate'],\n", 437 | " 'max_depth': int(best['max_depth']),\n", 438 | " 'min_samples_split': int(best['min_samples_split']),\n", 439 | " 'min_samples_leaf': int(best['min_samples_leaf']),\n", 440 | " 'min_weight_fraction_leaf': best['min_weight_fraction_leaf'],\n", 441 | " 'min_impurity_decrease': best['min_impurity_decrease'],\n", 442 | " 'ccp_alpha': best['ccp_alpha'],\n", 443 | " 'random_state': 42\n", 444 | " }\n", 445 | "\n", 446 | " print(f\"Best hyperparameters for {algorithm_name}:\")\n", 447 | " print(best_hyperparams[algorithm_name]) \n", 448 | " \n", 449 | " if algorithm_name == 'CatBoost':\n", 450 | " trials = Trials()\n", 451 | " best = fmin(fn=optimize_fn, space=space, algo=tpe.suggest, max_evals=50, trials=trials, rstate=rstate)\n", 452 | " \n", 453 | " # Store the best CatBoost hyperparameters\n", 454 | " best_hyperparams[algorithm_name] = {\n", 455 | " 'n_estimators': int(best['n_estimators']),\n", 456 | " 'learning_rate': best['learning_rate'],\n", 457 | " 'min_child_samples': int(best['min_child_samples']),\n", 458 | " 'max_depth': int(best['max_depth']),\n", 459 | " 'reg_lambda': best['reg_lambda'],\n", 460 | " 'silent': True,\n", 461 | " 'random_state': 42\n", 462 | " }\n", 463 | "\n", 464 | " print(f\"Best hyperparameters for {algorithm_name}:\")\n", 465 | " print(best_hyperparams[algorithm_name])\n", 466 | "\n", 467 | " if algorithm_name == 'LightGBM':\n", 468 | " trials = Trials()\n", 469 | " best = fmin(fn=optimize_fn, space=space, algo=tpe.suggest, max_evals=50, trials=trials, rstate=rstate)\n", 470 | " \n", 471 | " # Map the choice labels\n", 472 | " class_weight_label = class_weight_choices[best['class_weight']]\n", 473 | " boosting_type_label = boosting_type_choices[best['boosting_type']]\n", 474 | "\n", 475 | " # Store the best LightGBM hyperparameters\n", 476 | " best_hyperparams[algorithm_name] = {\n", 477 | " 'class_weight': class_weight_label,\n", 478 | " 'boosting_type': boosting_type_label,\n", 479 | " 'num_leaves': int(best['num_leaves']),\n", 480 | " 'learning_rate': best['learning_rate'],\n", 481 | " 'min_child_samples': int(best['min_child_samples']),\n", 482 | " 'reg_alpha': best['reg_alpha'],\n", 483 | " 'reg_lambda': best['reg_lambda'],\n", 484 | " 'colsample_by_tree': best['colsample_by_tree'],\n", 485 | " 'verbosity': -1,\n", 486 | " 'random_state': 42\n", 487 | " }\n", 488 | "\n", 489 | " print(f\"Best hyperparameters for {algorithm_name}:\")\n", 490 | " print(best_hyperparams[algorithm_name])\n", 491 | "\n", 492 | " if algorithm_name == 'XGBoost':\n", 493 | " trials = Trials()\n", 494 | " best = fmin(fn=optimize_fn, space=space, algo=tpe.suggest, max_evals=50, trials=trials, rstate=rstate)\n", 495 | " \n", 496 | " # Map the choice labels\n", 497 | " booster_label = booster_choices[best['booster']] \n", 498 | " \n", 499 | " # Store the best XGBoost hyperparameters\n", 500 | " best_hyperparams[algorithm_name] = {\n", 501 | " 'booster': booster_label,\n", 502 | " 'learning_rate': best['learning_rate'],\n", 503 | " 'gamma': int(best['gamma']),\n", 504 | " 'max_depth': int(best['max_depth']),\n", 505 | " 'min_child_weight': int(best['min_child_weight']),\n", 506 | " 'colsample_bytree': best['colsample_bytree'],\n", 507 | " 'colsample_bylevel': best['colsample_bylevel'],\n", 508 | " 'colsample_bynode': best['colsample_bynode'], \n", 509 | " 'reg_alpha': best['reg_alpha'],\n", 510 | " 'reg_lambda': best['reg_lambda'], \n", 511 | " 'random_state': 42\n", 512 | " }\n", 513 | "\n", 514 | " print(f\"Best hyperparameters for {algorithm_name}:\")\n", 515 | " print(best_hyperparams[algorithm_name])" 516 | ] 517 | }, 518 | { 519 | "cell_type": "code", 520 | "execution_count": 10, 521 | "metadata": {}, 522 | "outputs": [ 523 | { 524 | "data": { 525 | "text/plain": [ 526 | "{'n_estimators': 200.0,\n", 527 | " 'learning_rate': 0.06659352635164861,\n", 528 | " 'max_depth': 4.0,\n", 529 | " 'max_features': 'sqrt',\n", 530 | " 'min_samples_leaf': 3.0,\n", 531 | " 'min_samples_split': 2.0,\n", 532 | " 'random_state': 42}" 533 | ] 534 | }, 535 | "execution_count": 10, 536 | "metadata": {}, 537 | "output_type": "execute_result" 538 | } 539 | ], 540 | "source": [ 541 | "best_hyperparams['AdaBoost']" 542 | ] 543 | }, 544 | { 545 | "cell_type": "code", 546 | "execution_count": 11, 547 | "metadata": {}, 548 | "outputs": [ 549 | { 550 | "data": { 551 | "text/plain": [ 552 | "{'criterion': 'friedman_mse',\n", 553 | " 'max_features': 'sqrt',\n", 554 | " 'n_estimators': 100,\n", 555 | " 'learning_rate': 0.04102652661864284,\n", 556 | " 'max_depth': 3,\n", 557 | " 'min_samples_split': 7,\n", 558 | " 'min_samples_leaf': 7,\n", 559 | " 'min_weight_fraction_leaf': 0.0,\n", 560 | " 'min_impurity_decrease': 1.0,\n", 561 | " 'ccp_alpha': 0.0,\n", 562 | " 'random_state': 42}" 563 | ] 564 | }, 565 | "execution_count": 11, 566 | "metadata": {}, 567 | "output_type": "execute_result" 568 | } 569 | ], 570 | "source": [ 571 | "best_hyperparams['GradBoost']" 572 | ] 573 | }, 574 | { 575 | "cell_type": "code", 576 | "execution_count": 12, 577 | "metadata": {}, 578 | "outputs": [ 579 | { 580 | "data": { 581 | "text/plain": [ 582 | "{'n_estimators': 550,\n", 583 | " 'learning_rate': 0.0479901225935416,\n", 584 | " 'min_child_samples': 1,\n", 585 | " 'max_depth': 6,\n", 586 | " 'reg_lambda': 3.3766279624518107,\n", 587 | " 'silent': True,\n", 588 | " 'random_state': 42}" 589 | ] 590 | }, 591 | "execution_count": 12, 592 | "metadata": {}, 593 | "output_type": "execute_result" 594 | } 595 | ], 596 | "source": [ 597 | "best_hyperparams['CatBoost']" 598 | ] 599 | }, 600 | { 601 | "cell_type": "code", 602 | "execution_count": 13, 603 | "metadata": {}, 604 | "outputs": [ 605 | { 606 | "data": { 607 | "text/plain": [ 608 | "{'class_weight': 'balanced',\n", 609 | " 'boosting_type': 'gbdt',\n", 610 | " 'num_leaves': 55,\n", 611 | " 'learning_rate': 0.04496177447997528,\n", 612 | " 'min_child_samples': 10,\n", 613 | " 'reg_alpha': 0.3916912792044354,\n", 614 | " 'reg_lambda': 1.4941077467431771,\n", 615 | " 'colsample_by_tree': 0.379259630420579,\n", 616 | " 'verbosity': -1,\n", 617 | " 'random_state': 42}" 618 | ] 619 | }, 620 | "execution_count": 13, 621 | "metadata": {}, 622 | "output_type": "execute_result" 623 | } 624 | ], 625 | "source": [ 626 | "best_hyperparams['LightGBM']" 627 | ] 628 | }, 629 | { 630 | "cell_type": "code", 631 | "execution_count": 14, 632 | "metadata": {}, 633 | "outputs": [ 634 | { 635 | "data": { 636 | "text/plain": [ 637 | "{'booster': 'gbtree',\n", 638 | " 'learning_rate': 0.011777426690454684,\n", 639 | " 'gamma': 2,\n", 640 | " 'max_depth': 4,\n", 641 | " 'min_child_weight': 1,\n", 642 | " 'colsample_bytree': 0.6642423404208758,\n", 643 | " 'colsample_bylevel': 0.8389604376670141,\n", 644 | " 'colsample_bynode': 0.46801910869053165,\n", 645 | " 'reg_alpha': 1.3842922617481603,\n", 646 | " 'reg_lambda': 0.25127542856871243,\n", 647 | " 'random_state': 42}" 648 | ] 649 | }, 650 | "execution_count": 14, 651 | "metadata": {}, 652 | "output_type": "execute_result" 653 | } 654 | ], 655 | "source": [ 656 | "best_hyperparams['XGBoost']" 657 | ] 658 | }, 659 | { 660 | "cell_type": "code", 661 | "execution_count": 15, 662 | "metadata": { 663 | "id": "AiGBWUhXmjty" 664 | }, 665 | "outputs": [], 666 | "source": [ 667 | "rskf = RepeatedStratifiedKFold(n_splits=10, n_repeats=10, random_state=42)" 668 | ] 669 | }, 670 | { 671 | "cell_type": "code", 672 | "execution_count": 16, 673 | "metadata": {}, 674 | "outputs": [], 675 | "source": [ 676 | "names = ['AdaBoost', 'GradBoost', 'CatBoost', 'LightGBM', 'XGBoost']" 677 | ] 678 | }, 679 | { 680 | "cell_type": "code", 681 | "execution_count": 18, 682 | "metadata": { 683 | "id": "x7JQf94WmaZT" 684 | }, 685 | "outputs": [ 686 | { 687 | "name": "stdout", 688 | "output_type": "stream", 689 | "text": [ 690 | "--------- AdaBoost on Wine Dataset ---------\n", 691 | "Accuracy: 96.72% (4.17%)\n", 692 | "Execution Time: 18.45 seconds\n", 693 | "------------------------------\n", 694 | "--------- GradBoost on Wine Dataset ---------\n", 695 | "Accuracy: 98.08% (3.44%)\n", 696 | "Execution Time: 10.51 seconds\n", 697 | "------------------------------\n", 698 | "--------- CatBoost on Wine Dataset ---------\n", 699 | "Accuracy: 97.97% (3.03%)\n", 700 | "Execution Time: 103.71 seconds\n", 701 | "------------------------------\n", 702 | "--------- LightGBM on Wine Dataset ---------\n", 703 | "Accuracy: 97.12% (4.03%)\n", 704 | "Execution Time: 3.20 seconds\n", 705 | "------------------------------\n", 706 | "--------- XGBoost on Wine Dataset ---------\n", 707 | "Accuracy: 98.19% (3.40%)\n", 708 | "Execution Time: 5.71 seconds\n", 709 | "------------------------------\n" 710 | ] 711 | } 712 | ], 713 | "source": [ 714 | "wine_scores = []\n", 715 | "wine_scores_mean = []\n", 716 | "wine_scores_std = []\n", 717 | "model_names = []\n", 718 | "execution_times = []\n", 719 | "\n", 720 | "for algorithm_name in names:\n", 721 | " if algorithm_name == 'AdaBoost':\n", 722 | " base_estimator = DecisionTreeClassifier(max_depth=int(best_hyperparams[algorithm_name]['max_depth']),\n", 723 | " max_features=best_hyperparams[algorithm_name]['max_features'],\n", 724 | " min_samples_leaf=int(best_hyperparams[algorithm_name]['min_samples_leaf']),\n", 725 | " min_samples_split=int(best_hyperparams[algorithm_name]['min_samples_split']))\n", 726 | "\n", 727 | " clf = AdaBoostClassifier(base_estimator=base_estimator, \n", 728 | " n_estimators=int(best_hyperparams[algorithm_name]['n_estimators']), \n", 729 | " learning_rate=best_hyperparams[algorithm_name]['learning_rate'],\n", 730 | " random_state=42) \n", 731 | "\n", 732 | " if algorithm_name == 'GradBoost':\n", 733 | " clf = GradientBoostingClassifier(criterion=best_hyperparams[algorithm_name]['criterion'], \n", 734 | " max_features=best_hyperparams[algorithm_name]['max_features'], \n", 735 | " n_estimators=best_hyperparams[algorithm_name]['n_estimators'],\n", 736 | " learning_rate=best_hyperparams[algorithm_name]['learning_rate'],\n", 737 | " max_depth=best_hyperparams[algorithm_name]['max_depth'],\n", 738 | " min_samples_split=best_hyperparams[algorithm_name]['min_samples_split'],\n", 739 | " min_samples_leaf=best_hyperparams[algorithm_name]['min_samples_leaf'],\n", 740 | " min_weight_fraction_leaf=best_hyperparams[algorithm_name]['min_weight_fraction_leaf'],\n", 741 | " min_impurity_decrease=best_hyperparams[algorithm_name]['min_impurity_decrease'],\n", 742 | " ccp_alpha=best_hyperparams[algorithm_name]['ccp_alpha'],\n", 743 | " random_state=42)\n", 744 | " \n", 745 | " if algorithm_name == 'CatBoost':\n", 746 | " clf = CatBoostClassifier(n_estimators=best_hyperparams[algorithm_name]['n_estimators'],\n", 747 | " learning_rate=best_hyperparams[algorithm_name]['learning_rate'],\n", 748 | " min_child_samples=best_hyperparams[algorithm_name]['min_child_samples'],\n", 749 | " max_depth=best_hyperparams[algorithm_name]['max_depth'],\n", 750 | " reg_lambda=best_hyperparams[algorithm_name]['reg_lambda'],\n", 751 | " silent=True,\n", 752 | " random_state=42) \n", 753 | " \n", 754 | " if algorithm_name == 'LightGBM':\n", 755 | " clf = LGBMClassifier(boosting_type=best_hyperparams[algorithm_name]['boosting_type'], \n", 756 | " class_weight=best_hyperparams[algorithm_name]['class_weight'], \n", 757 | " colsample_by_tree=best_hyperparams[algorithm_name]['colsample_by_tree'],\n", 758 | " learning_rate=best_hyperparams[algorithm_name]['learning_rate'],\n", 759 | " min_child_samples=best_hyperparams[algorithm_name]['min_child_samples'],\n", 760 | " num_leaves=best_hyperparams[algorithm_name]['num_leaves'],\n", 761 | " reg_alpha=best_hyperparams[algorithm_name]['reg_alpha'],\n", 762 | " reg_lambda=best_hyperparams[algorithm_name]['reg_lambda'],\n", 763 | " verbosity=-1,\n", 764 | " random_state=42)\n", 765 | " \n", 766 | " if algorithm_name == 'XGBoost':\n", 767 | " clf = XGBClassifier(booster=best_hyperparams[algorithm_name]['booster'], \n", 768 | " learning_rate=best_hyperparams[algorithm_name]['learning_rate'],\n", 769 | " gamma=best_hyperparams[algorithm_name]['gamma'], \n", 770 | " max_depth=best_hyperparams[algorithm_name]['max_depth'], \n", 771 | " min_child_weight=best_hyperparams[algorithm_name]['min_child_weight'],\n", 772 | " colsample_bytree=best_hyperparams[algorithm_name]['colsample_bytree'],\n", 773 | " colsample_bylevel=best_hyperparams[algorithm_name]['colsample_bylevel'],\n", 774 | " colsample_bynode=best_hyperparams[algorithm_name]['colsample_bynode'], \n", 775 | " reg_alpha=best_hyperparams[algorithm_name]['reg_alpha'],\n", 776 | " reg_lambda=best_hyperparams[algorithm_name]['reg_lambda'],\n", 777 | " verbosity=0,\n", 778 | " random_state=42)\n", 779 | " \n", 780 | " start_time = time.time() \n", 781 | " results = cross_val_score(clf, X, y, cv=rskf)\n", 782 | " end_time = time.time()\n", 783 | " wine_scores.append(results)\n", 784 | " wine_scores_mean.append(results.mean()*100)\n", 785 | " wine_scores_std.append(results.std()*100)\n", 786 | " model_names.append(algorithm_name)\n", 787 | " execution_time = end_time - start_time \n", 788 | " execution_times.append(execution_time)\n", 789 | "\n", 790 | " print(f'--------- {algorithm_name} on Wine Dataset ---------')\n", 791 | " # print(results)\n", 792 | " print('Accuracy: %.2f%% (%.2f%%)' % (results.mean()*100, results.std()*100))\n", 793 | " print(f'Execution Time: {execution_time:.2f} seconds')\n", 794 | " print('------------------------------')" 795 | ] 796 | }, 797 | { 798 | "cell_type": "code", 799 | "execution_count": 19, 800 | "metadata": {}, 801 | "outputs": [], 802 | "source": [ 803 | "Algo_results = pd.DataFrame()\n", 804 | "Algo_results['Names'] = names" 805 | ] 806 | }, 807 | { 808 | "cell_type": "code", 809 | "execution_count": 20, 810 | "metadata": {}, 811 | "outputs": [], 812 | "source": [ 813 | "Algo_results['Wine'] = wine_scores_mean" 814 | ] 815 | }, 816 | { 817 | "cell_type": "code", 818 | "execution_count": 21, 819 | "metadata": {}, 820 | "outputs": [ 821 | { 822 | "data": { 823 | "text/html": [ 824 | "
\n", 825 | "\n", 838 | "\n", 839 | " \n", 840 | " \n", 841 | " \n", 842 | " \n", 843 | " \n", 844 | " \n", 845 | " \n", 846 | " \n", 847 | " \n", 848 | " \n", 849 | " \n", 850 | " \n", 851 | " \n", 852 | " \n", 853 | " \n", 854 | " \n", 855 | " \n", 856 | " \n", 857 | " \n", 858 | " \n", 859 | " \n", 860 | " \n", 861 | " \n", 862 | " \n", 863 | " \n", 864 | " \n", 865 | " \n", 866 | " \n", 867 | " \n", 868 | " \n", 869 | " \n", 870 | " \n", 871 | " \n", 872 | " \n", 873 | "
NamesWine
0AdaBoost96.722222
1GradBoost98.075163
2CatBoost97.967320
3LightGBM97.120915
4XGBoost98.186275
\n", 874 | "
" 875 | ], 876 | "text/plain": [ 877 | " Names Wine\n", 878 | "0 AdaBoost 96.722222\n", 879 | "1 GradBoost 98.075163\n", 880 | "2 CatBoost 97.967320\n", 881 | "3 LightGBM 97.120915\n", 882 | "4 XGBoost 98.186275" 883 | ] 884 | }, 885 | "execution_count": 21, 886 | "metadata": {}, 887 | "output_type": "execute_result" 888 | } 889 | ], 890 | "source": [ 891 | "Algo_results" 892 | ] 893 | }, 894 | { 895 | "cell_type": "code", 896 | "execution_count": 22, 897 | "metadata": {}, 898 | "outputs": [], 899 | "source": [ 900 | "Algo_time_results = pd.DataFrame()\n", 901 | "Algo_time_results['Names'] = names" 902 | ] 903 | }, 904 | { 905 | "cell_type": "code", 906 | "execution_count": 23, 907 | "metadata": {}, 908 | "outputs": [], 909 | "source": [ 910 | "Algo_time_results['Wine'] = pd.Series(execution_times)" 911 | ] 912 | }, 913 | { 914 | "cell_type": "code", 915 | "execution_count": 24, 916 | "metadata": {}, 917 | "outputs": [ 918 | { 919 | "data": { 920 | "text/html": [ 921 | "
\n", 922 | "\n", 935 | "\n", 936 | " \n", 937 | " \n", 938 | " \n", 939 | " \n", 940 | " \n", 941 | " \n", 942 | " \n", 943 | " \n", 944 | " \n", 945 | " \n", 946 | " \n", 947 | " \n", 948 | " \n", 949 | " \n", 950 | " \n", 951 | " \n", 952 | " \n", 953 | " \n", 954 | " \n", 955 | " \n", 956 | " \n", 957 | " \n", 958 | " \n", 959 | " \n", 960 | " \n", 961 | " \n", 962 | " \n", 963 | " \n", 964 | " \n", 965 | " \n", 966 | " \n", 967 | " \n", 968 | " \n", 969 | " \n", 970 | "
NamesWine
0AdaBoost18.447767
1GradBoost10.506224
2CatBoost103.706576
3LightGBM3.198158
4XGBoost5.706122
\n", 971 | "
" 972 | ], 973 | "text/plain": [ 974 | " Names Wine\n", 975 | "0 AdaBoost 18.447767\n", 976 | "1 GradBoost 10.506224\n", 977 | "2 CatBoost 103.706576\n", 978 | "3 LightGBM 3.198158\n", 979 | "4 XGBoost 5.706122" 980 | ] 981 | }, 982 | "execution_count": 24, 983 | "metadata": {}, 984 | "output_type": "execute_result" 985 | } 986 | ], 987 | "source": [ 988 | "Algo_time_results" 989 | ] 990 | } 991 | ], 992 | "metadata": { 993 | "colab": { 994 | "authorship_tag": "ABX9TyMVO8koMTTTdYQJS3YoNuih", 995 | "include_colab_link": true, 996 | "provenance": [] 997 | }, 998 | "kernelspec": { 999 | "display_name": "Python 3", 1000 | "name": "python3" 1001 | }, 1002 | "language_info": { 1003 | "codemirror_mode": { 1004 | "name": "ipython", 1005 | "version": 3 1006 | }, 1007 | "file_extension": ".py", 1008 | "mimetype": "text/x-python", 1009 | "name": "python", 1010 | "nbconvert_exporter": "python", 1011 | "pygments_lexer": "ipython3", 1012 | "version": "3.9.12" 1013 | } 1014 | }, 1015 | "nbformat": 4, 1016 | "nbformat_minor": 0 1017 | } 1018 | -------------------------------------------------------------------------------- /Session-06_14-10-23_DecisionTrees_RandomForests_Boosting/DT_RF_Boosting.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sarthakharne/Machine-Learning-TA-Material-Fall-2023/f2da173f11a4ae44807aa32f343d5e196a6cda9f/Session-06_14-10-23_DecisionTrees_RandomForests_Boosting/DT_RF_Boosting.pptx -------------------------------------------------------------------------------- /Session-07_30-10-23_ConstrainedOptimisation/Constrained_Optimization_KKT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sarthakharne/Machine-Learning-TA-Material-Fall-2023/f2da173f11a4ae44807aa32f343d5e196a6cda9f/Session-07_30-10-23_ConstrainedOptimisation/Constrained_Optimization_KKT.pdf -------------------------------------------------------------------------------- /Session-08_06-11-23_SVM/SVM.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "nbformat": 4, 3 | "nbformat_minor": 0, 4 | "metadata": { 5 | "colab": { 6 | "provenance": [] 7 | }, 8 | "kernelspec": { 9 | "name": "python3", 10 | "display_name": "Python 3" 11 | }, 12 | "language_info": { 13 | "name": "python" 14 | } 15 | }, 16 | "cells": [ 17 | { 18 | "cell_type": "code", 19 | "execution_count": null, 20 | "metadata": { 21 | "id": "qeV_uNcKGIlX" 22 | }, 23 | "outputs": [], 24 | "source": [ 25 | "import pandas as pd\n", 26 | "import numpy as np\n", 27 | "from sklearn import svm\n", 28 | "from sklearn.model_selection import train_test_split\n", 29 | "from sklearn.metrics import accuracy_score" 30 | ] 31 | }, 32 | { 33 | "cell_type": "code", 34 | "source": [ 35 | "from sklearn.datasets import load_breast_cancer\n", 36 | "data = load_breast_cancer()\n", 37 | "dataset = pd.DataFrame(data=data.data, columns=data.feature_names)" 38 | ], 39 | "metadata": { 40 | "id": "Aru5nkhPMdd3" 41 | }, 42 | "execution_count": null, 43 | "outputs": [] 44 | }, 45 | { 46 | "cell_type": "code", 47 | "source": [ 48 | "dataset" 49 | ], 50 | "metadata": { 51 | "colab": { 52 | "base_uri": "https://localhost:8080/", 53 | "height": 478 54 | }, 55 | "id": "zRl9oTn5RpmE", 56 | "outputId": "0beba0f2-c21e-4dd6-ed66-cf6bffe4fa74" 57 | }, 58 | "execution_count": null, 59 | "outputs": [ 60 | { 61 | "output_type": "execute_result", 62 | "data": { 63 | "text/plain": [ 64 | " mean radius mean texture mean perimeter mean area mean smoothness \\\n", 65 | "0 17.99 10.38 122.80 1001.0 0.11840 \n", 66 | "1 20.57 17.77 132.90 1326.0 0.08474 \n", 67 | "2 19.69 21.25 130.00 1203.0 0.10960 \n", 68 | "3 11.42 20.38 77.58 386.1 0.14250 \n", 69 | "4 20.29 14.34 135.10 1297.0 0.10030 \n", 70 | ".. ... ... ... ... ... \n", 71 | "564 21.56 22.39 142.00 1479.0 0.11100 \n", 72 | "565 20.13 28.25 131.20 1261.0 0.09780 \n", 73 | "566 16.60 28.08 108.30 858.1 0.08455 \n", 74 | "567 20.60 29.33 140.10 1265.0 0.11780 \n", 75 | "568 7.76 24.54 47.92 181.0 0.05263 \n", 76 | "\n", 77 | " mean compactness mean concavity mean concave points mean symmetry \\\n", 78 | "0 0.27760 0.30010 0.14710 0.2419 \n", 79 | "1 0.07864 0.08690 0.07017 0.1812 \n", 80 | "2 0.15990 0.19740 0.12790 0.2069 \n", 81 | "3 0.28390 0.24140 0.10520 0.2597 \n", 82 | "4 0.13280 0.19800 0.10430 0.1809 \n", 83 | ".. ... ... ... ... \n", 84 | "564 0.11590 0.24390 0.13890 0.1726 \n", 85 | "565 0.10340 0.14400 0.09791 0.1752 \n", 86 | "566 0.10230 0.09251 0.05302 0.1590 \n", 87 | "567 0.27700 0.35140 0.15200 0.2397 \n", 88 | "568 0.04362 0.00000 0.00000 0.1587 \n", 89 | "\n", 90 | " mean fractal dimension ... worst radius worst texture \\\n", 91 | "0 0.07871 ... 25.380 17.33 \n", 92 | "1 0.05667 ... 24.990 23.41 \n", 93 | "2 0.05999 ... 23.570 25.53 \n", 94 | "3 0.09744 ... 14.910 26.50 \n", 95 | "4 0.05883 ... 22.540 16.67 \n", 96 | ".. ... ... ... ... \n", 97 | "564 0.05623 ... 25.450 26.40 \n", 98 | "565 0.05533 ... 23.690 38.25 \n", 99 | "566 0.05648 ... 18.980 34.12 \n", 100 | "567 0.07016 ... 25.740 39.42 \n", 101 | "568 0.05884 ... 9.456 30.37 \n", 102 | "\n", 103 | " worst perimeter worst area worst smoothness worst compactness \\\n", 104 | "0 184.60 2019.0 0.16220 0.66560 \n", 105 | "1 158.80 1956.0 0.12380 0.18660 \n", 106 | "2 152.50 1709.0 0.14440 0.42450 \n", 107 | "3 98.87 567.7 0.20980 0.86630 \n", 108 | "4 152.20 1575.0 0.13740 0.20500 \n", 109 | ".. ... ... ... ... \n", 110 | "564 166.10 2027.0 0.14100 0.21130 \n", 111 | "565 155.00 1731.0 0.11660 0.19220 \n", 112 | "566 126.70 1124.0 0.11390 0.30940 \n", 113 | "567 184.60 1821.0 0.16500 0.86810 \n", 114 | "568 59.16 268.6 0.08996 0.06444 \n", 115 | "\n", 116 | " worst concavity worst concave points worst symmetry \\\n", 117 | "0 0.7119 0.2654 0.4601 \n", 118 | "1 0.2416 0.1860 0.2750 \n", 119 | "2 0.4504 0.2430 0.3613 \n", 120 | "3 0.6869 0.2575 0.6638 \n", 121 | "4 0.4000 0.1625 0.2364 \n", 122 | ".. ... ... ... \n", 123 | "564 0.4107 0.2216 0.2060 \n", 124 | "565 0.3215 0.1628 0.2572 \n", 125 | "566 0.3403 0.1418 0.2218 \n", 126 | "567 0.9387 0.2650 0.4087 \n", 127 | "568 0.0000 0.0000 0.2871 \n", 128 | "\n", 129 | " worst fractal dimension \n", 130 | "0 0.11890 \n", 131 | "1 0.08902 \n", 132 | "2 0.08758 \n", 133 | "3 0.17300 \n", 134 | "4 0.07678 \n", 135 | ".. ... \n", 136 | "564 0.07115 \n", 137 | "565 0.06637 \n", 138 | "566 0.07820 \n", 139 | "567 0.12400 \n", 140 | "568 0.07039 \n", 141 | "\n", 142 | "[569 rows x 30 columns]" 143 | ], 144 | "text/html": [ 145 | "\n", 146 | "
\n", 147 | "
\n", 148 | "\n", 161 | "\n", 162 | " \n", 163 | " \n", 164 | " \n", 165 | " \n", 166 | " \n", 167 | " \n", 168 | " \n", 169 | " \n", 170 | " \n", 171 | " \n", 172 | " \n", 173 | " \n", 174 | " \n", 175 | " \n", 176 | " \n", 177 | " \n", 178 | " \n", 179 | " \n", 180 | " \n", 181 | " \n", 182 | " \n", 183 | " \n", 184 | " \n", 185 | " \n", 186 | " \n", 187 | " \n", 188 | " \n", 189 | " \n", 190 | " \n", 191 | " \n", 192 | " \n", 193 | " \n", 194 | " \n", 195 | " \n", 196 | " \n", 197 | " \n", 198 | " \n", 199 | " \n", 200 | " \n", 201 | " \n", 202 | " \n", 203 | " \n", 204 | " \n", 205 | " \n", 206 | " \n", 207 | " \n", 208 | " \n", 209 | " \n", 210 | " \n", 211 | " \n", 212 | " \n", 213 | " \n", 214 | " \n", 215 | " \n", 216 | " \n", 217 | " \n", 218 | " \n", 219 | " \n", 220 | " \n", 221 | " \n", 222 | " \n", 223 | " \n", 224 | " \n", 225 | " \n", 226 | " \n", 227 | " \n", 228 | " \n", 229 | " \n", 230 | " \n", 231 | " \n", 232 | " \n", 233 | " \n", 234 | " \n", 235 | " \n", 236 | " \n", 237 | " \n", 238 | " \n", 239 | " \n", 240 | " \n", 241 | " \n", 242 | " \n", 243 | " \n", 244 | " \n", 245 | " \n", 246 | " \n", 247 | " \n", 248 | " \n", 249 | " \n", 250 | " \n", 251 | " \n", 252 | " \n", 253 | " \n", 254 | " \n", 255 | " \n", 256 | " \n", 257 | " \n", 258 | " \n", 259 | " \n", 260 | " \n", 261 | " \n", 262 | " \n", 263 | " \n", 264 | " \n", 265 | " \n", 266 | " \n", 267 | " \n", 268 | " \n", 269 | " \n", 270 | " \n", 271 | " \n", 272 | " \n", 273 | " \n", 274 | " \n", 275 | " \n", 276 | " \n", 277 | " \n", 278 | " \n", 279 | " \n", 280 | " \n", 281 | " \n", 282 | " \n", 283 | " \n", 284 | " \n", 285 | " \n", 286 | " \n", 287 | " \n", 288 | " \n", 289 | " \n", 290 | " \n", 291 | " \n", 292 | " \n", 293 | " \n", 294 | " \n", 295 | " \n", 296 | " \n", 297 | " \n", 298 | " \n", 299 | " \n", 300 | " \n", 301 | " \n", 302 | " \n", 303 | " \n", 304 | " \n", 305 | " \n", 306 | " \n", 307 | " \n", 308 | " \n", 309 | " \n", 310 | " \n", 311 | " \n", 312 | " \n", 313 | " \n", 314 | " \n", 315 | " \n", 316 | " \n", 317 | " \n", 318 | " \n", 319 | " \n", 320 | " \n", 321 | " \n", 322 | " \n", 323 | " \n", 324 | " \n", 325 | " \n", 326 | " \n", 327 | " \n", 328 | " \n", 329 | " \n", 330 | " \n", 331 | " \n", 332 | " \n", 333 | " \n", 334 | " \n", 335 | " \n", 336 | " \n", 337 | " \n", 338 | " \n", 339 | " \n", 340 | " \n", 341 | " \n", 342 | " \n", 343 | " \n", 344 | " \n", 345 | " \n", 346 | " \n", 347 | " \n", 348 | " \n", 349 | " \n", 350 | " \n", 351 | " \n", 352 | " \n", 353 | " \n", 354 | " \n", 355 | " \n", 356 | " \n", 357 | " \n", 358 | " \n", 359 | " \n", 360 | " \n", 361 | " \n", 362 | " \n", 363 | " \n", 364 | " \n", 365 | " \n", 366 | " \n", 367 | " \n", 368 | " \n", 369 | " \n", 370 | " \n", 371 | " \n", 372 | " \n", 373 | " \n", 374 | " \n", 375 | " \n", 376 | " \n", 377 | " \n", 378 | " \n", 379 | " \n", 380 | " \n", 381 | " \n", 382 | " \n", 383 | " \n", 384 | " \n", 385 | " \n", 386 | " \n", 387 | " \n", 388 | " \n", 389 | " \n", 390 | " \n", 391 | " \n", 392 | " \n", 393 | " \n", 394 | " \n", 395 | " \n", 396 | " \n", 397 | " \n", 398 | " \n", 399 | " \n", 400 | " \n", 401 | " \n", 402 | " \n", 403 | " \n", 404 | " \n", 405 | " \n", 406 | " \n", 407 | " \n", 408 | " \n", 409 | " \n", 410 | " \n", 411 | " \n", 412 | " \n", 413 | " \n", 414 | " \n", 415 | " \n", 416 | " \n", 417 | " \n", 418 | " \n", 419 | " \n", 420 | " \n", 421 | " \n", 422 | " \n", 423 | " \n", 424 | " \n", 425 | " \n", 426 | " \n", 427 | " \n", 428 | " \n", 429 | " \n", 430 | " \n", 431 | " \n", 432 | " \n", 433 | " \n", 434 | " \n", 435 | " \n", 436 | " \n", 437 | " \n", 438 | " \n", 439 | " \n", 440 | " \n", 441 | " \n", 442 | " \n", 443 | " \n", 444 | " \n", 445 | " \n", 446 | " \n", 447 | " \n", 448 | " \n", 449 | " \n", 450 | " \n", 451 | " \n", 452 | " \n", 453 | " \n", 454 | "
mean radiusmean texturemean perimetermean areamean smoothnessmean compactnessmean concavitymean concave pointsmean symmetrymean fractal dimension...worst radiusworst textureworst perimeterworst areaworst smoothnessworst compactnessworst concavityworst concave pointsworst symmetryworst fractal dimension
017.9910.38122.801001.00.118400.277600.300100.147100.24190.07871...25.38017.33184.602019.00.162200.665600.71190.26540.46010.11890
120.5717.77132.901326.00.084740.078640.086900.070170.18120.05667...24.99023.41158.801956.00.123800.186600.24160.18600.27500.08902
219.6921.25130.001203.00.109600.159900.197400.127900.20690.05999...23.57025.53152.501709.00.144400.424500.45040.24300.36130.08758
311.4220.3877.58386.10.142500.283900.241400.105200.25970.09744...14.91026.5098.87567.70.209800.866300.68690.25750.66380.17300
420.2914.34135.101297.00.100300.132800.198000.104300.18090.05883...22.54016.67152.201575.00.137400.205000.40000.16250.23640.07678
..................................................................
56421.5622.39142.001479.00.111000.115900.243900.138900.17260.05623...25.45026.40166.102027.00.141000.211300.41070.22160.20600.07115
56520.1328.25131.201261.00.097800.103400.144000.097910.17520.05533...23.69038.25155.001731.00.116600.192200.32150.16280.25720.06637
56616.6028.08108.30858.10.084550.102300.092510.053020.15900.05648...18.98034.12126.701124.00.113900.309400.34030.14180.22180.07820
56720.6029.33140.101265.00.117800.277000.351400.152000.23970.07016...25.74039.42184.601821.00.165000.868100.93870.26500.40870.12400
5687.7624.5447.92181.00.052630.043620.000000.000000.15870.05884...9.45630.3759.16268.60.089960.064440.00000.00000.28710.07039
\n", 455 | "

569 rows × 30 columns

\n", 456 | "
\n", 457 | "
\n", 458 | "\n", 459 | "
\n", 460 | " \n", 468 | "\n", 469 | " \n", 509 | "\n", 510 | " \n", 534 | "
\n", 535 | "\n", 536 | "\n", 537 | "
\n", 538 | " \n", 549 | "\n", 550 | "\n", 639 | "\n", 640 | " \n", 662 | "
\n", 663 | "
\n", 664 | "
\n" 665 | ] 666 | }, 667 | "metadata": {}, 668 | "execution_count": 32 669 | } 670 | ] 671 | }, 672 | { 673 | "cell_type": "code", 674 | "source": [ 675 | "target = data.target" 676 | ], 677 | "metadata": { 678 | "id": "l9rjLT17Sann" 679 | }, 680 | "execution_count": null, 681 | "outputs": [] 682 | }, 683 | { 684 | "cell_type": "code", 685 | "source": [ 686 | "target" 687 | ], 688 | "metadata": { 689 | "colab": { 690 | "base_uri": "https://localhost:8080/" 691 | }, 692 | "id": "xHpz0ZJ4SfUC", 693 | "outputId": "8a48517a-dddf-452f-cab0-935bc2c74c58" 694 | }, 695 | "execution_count": null, 696 | "outputs": [ 697 | { 698 | "output_type": "execute_result", 699 | "data": { 700 | "text/plain": [ 701 | "array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,\n", 702 | " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,\n", 703 | " 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0,\n", 704 | " 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0,\n", 705 | " 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1,\n", 706 | " 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0,\n", 707 | " 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1,\n", 708 | " 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1,\n", 709 | " 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0,\n", 710 | " 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0,\n", 711 | " 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1,\n", 712 | " 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n", 713 | " 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1,\n", 714 | " 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1,\n", 715 | " 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0,\n", 716 | " 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0,\n", 717 | " 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0,\n", 718 | " 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1,\n", 719 | " 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0,\n", 720 | " 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1,\n", 721 | " 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,\n", 722 | " 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,\n", 723 | " 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1,\n", 724 | " 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1,\n", 725 | " 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n", 726 | " 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1])" 727 | ] 728 | }, 729 | "metadata": {}, 730 | "execution_count": 9 731 | } 732 | ] 733 | }, 734 | { 735 | "cell_type": "code", 736 | "source": [ 737 | "X = dataset.to_numpy()" 738 | ], 739 | "metadata": { 740 | "id": "4ZvD6tCsSmI9" 741 | }, 742 | "execution_count": null, 743 | "outputs": [] 744 | }, 745 | { 746 | "cell_type": "code", 747 | "source": [ 748 | "X_train, X_test, y_train, y_test = train_test_split(X, target, test_size=0.25, random_state=42)" 749 | ], 750 | "metadata": { 751 | "id": "N5yVRybTSt_i" 752 | }, 753 | "execution_count": null, 754 | "outputs": [] 755 | }, 756 | { 757 | "cell_type": "markdown", 758 | "source": [ 759 | "Since the sklearn Breast cancer dataset is linearly separable, SVMs with linear kernels perform best on it. SVMs that use polynomial kernels perform best on data that is not linearly separable. SVMs that use radial kernels generally perform better than polynomial kernels since they find SVCs in infinite dimensions. " 760 | ], 761 | "metadata": { 762 | "id": "n9qwMFiEUpNc" 763 | } 764 | }, 765 | { 766 | "cell_type": "code", 767 | "source": [ 768 | "linear_svc = svm.SVC(kernel='linear')\n", 769 | "linear_svc.fit(X_train, y_train)\n", 770 | "y_pred=linear_svc.predict(X_test)\n", 771 | "accuracy_score(y_test, y_pred)" 772 | ], 773 | "metadata": { 774 | "colab": { 775 | "base_uri": "https://localhost:8080/" 776 | }, 777 | "id": "7PfLnlmHMc6i", 778 | "outputId": "f3ccce36-66d0-4b1f-b26a-66f9dcb469d3" 779 | }, 780 | "execution_count": null, 781 | "outputs": [ 782 | { 783 | "output_type": "execute_result", 784 | "data": { 785 | "text/plain": [ 786 | "0.958041958041958" 787 | ] 788 | }, 789 | "metadata": {}, 790 | "execution_count": 18 791 | } 792 | ] 793 | }, 794 | { 795 | "cell_type": "code", 796 | "source": [ 797 | "poly_svc = svm.SVC(kernel='poly')\n", 798 | "poly_svc.fit(X_train, y_train)\n", 799 | "y_pred=poly_svc.predict(X_test)\n", 800 | "accuracy_score(y_test, y_pred)" 801 | ], 802 | "metadata": { 803 | "colab": { 804 | "base_uri": "https://localhost:8080/" 805 | }, 806 | "id": "ld0ZSTejTDJe", 807 | "outputId": "d14853df-a722-4241-890b-09aa0f578a6f" 808 | }, 809 | "execution_count": null, 810 | "outputs": [ 811 | { 812 | "output_type": "execute_result", 813 | "data": { 814 | "text/plain": [ 815 | "0.9440559440559441" 816 | ] 817 | }, 818 | "metadata": {}, 819 | "execution_count": 26 820 | } 821 | ] 822 | }, 823 | { 824 | "cell_type": "code", 825 | "source": [ 826 | "rbf_svc = svm.SVC(kernel='rbf')\n", 827 | "rbf_svc.fit(X_train, y_train)\n", 828 | "y_pred=rbf_svc.predict(X_test)\n", 829 | "accuracy_score(y_test, y_pred)" 830 | ], 831 | "metadata": { 832 | "colab": { 833 | "base_uri": "https://localhost:8080/" 834 | }, 835 | "id": "ZXiO7suZTzDw", 836 | "outputId": "fe58ed75-8f62-4f0c-bd21-506ebb5adbb4" 837 | }, 838 | "execution_count": null, 839 | "outputs": [ 840 | { 841 | "output_type": "execute_result", 842 | "data": { 843 | "text/plain": [ 844 | "0.951048951048951" 845 | ] 846 | }, 847 | "metadata": {}, 848 | "execution_count": 30 849 | } 850 | ] 851 | }, 852 | { 853 | "cell_type": "markdown", 854 | "source": [ 855 | "Depending on the dataset, SVMs may or may not perform better than random forests (bagging algorithms) or boosting models such as XGBoost and AdaBoost. Since SVMs use Soft Margin Classifiers, they avoid overfitting better than bagging and boosting algorithms (lower variance), but they may not perform as well on datasets with a lower amount of outliers since they may have a higher bias than bagging and boosting algorithms." 856 | ], 857 | "metadata": { 858 | "id": "IJgkZycoVUI6" 859 | } 860 | } 861 | ] 862 | } -------------------------------------------------------------------------------- /Session-08_06-11-23_SVM/Support Vector Machines.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sarthakharne/Machine-Learning-TA-Material-Fall-2023/f2da173f11a4ae44807aa32f343d5e196a6cda9f/Session-08_06-11-23_SVM/Support Vector Machines.pdf -------------------------------------------------------------------------------- /Session-09_20-11-23_NeuralNetworks_PyTorch/NeuralNetworks.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sarthakharne/Machine-Learning-TA-Material-Fall-2023/f2da173f11a4ae44807aa32f343d5e196a6cda9f/Session-09_20-11-23_NeuralNetworks_PyTorch/NeuralNetworks.pdf -------------------------------------------------------------------------------- /Session-09_20-11-23_NeuralNetworks_PyTorch/pytorch-mnist-example.ipynb: -------------------------------------------------------------------------------- 1 | {"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import pandas as pd\nimport numpy as np\nfrom sklearn.metrics import accuracy_score, f1_score\nfrom sklearn.preprocessing import MinMaxScaler, StandardScaler\n\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data import Dataset, DataLoader\nfrom tqdm import tqdm\n\nimport gc\nimport time\n\ndevice = torch.device('cuda' if torch.cuda.is_available() else 'cpu')","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2023-11-19T18:59:51.440856Z","iopub.execute_input":"2023-11-19T18:59:51.441734Z","iopub.status.idle":"2023-11-19T18:59:51.447316Z","shell.execute_reply.started":"2023-11-19T18:59:51.441697Z","shell.execute_reply":"2023-11-19T18:59:51.446472Z"},"trusted":true},"execution_count":2,"outputs":[]},{"cell_type":"code","source":"class ANN(nn.Module):\n def __init__(\n self,\n in_dim: int,\n hidden_dim_1: int,\n hidden_dim_2: int,\n hidden_dim_3: int,\n n_classes:int = 10,\n dropout: float = 0.3\n ):\n super().__init__()\n \n self.layer1 = nn.Sequential(\n nn.Linear(in_features=in_dim, out_features=hidden_dim_1),\n nn.ReLU(),\n nn.BatchNorm1d(hidden_dim_1),\n nn.Dropout(dropout),\n )\n self.layer2 = nn.Sequential(\n nn.Linear(in_features=hidden_dim_1, out_features=hidden_dim_2),\n nn.ReLU(),\n nn.BatchNorm1d(hidden_dim_2),\n nn.Dropout(dropout),\n )\n self.layer3 = nn.Sequential(\n nn.Linear(in_features=hidden_dim_2, out_features=hidden_dim_3),\n nn.ReLU(),\n nn.BatchNorm1d(hidden_dim_3),\n nn.Dropout(dropout),\n )\n self.output_layer = nn.Linear(in_features=hidden_dim_3, out_features=n_classes)\n \n def forward(self, x: torch.Tensor) -> torch.Tensor:\n \"\"\"\n Args:\n x (torch.Tensor): (batch_size, in_dim) the input\n \n Output:\n (torch.Tensor): (batch_size, n_classes) the output\n \"\"\"\n x = self.layer1(x)\n x = self.layer2(x)\n x = self.layer3(x)\n x = self.output_layer(x)\n \n return x","metadata":{"execution":{"iopub.status.busy":"2023-11-19T18:59:51.449227Z","iopub.execute_input":"2023-11-19T18:59:51.450010Z","iopub.status.idle":"2023-11-19T18:59:51.473529Z","shell.execute_reply.started":"2023-11-19T18:59:51.449976Z","shell.execute_reply":"2023-11-19T18:59:51.472734Z"},"trusted":true},"execution_count":3,"outputs":[]},{"cell_type":"code","source":"class MNIST(Dataset):\n def __init__(\n self,\n data,\n ):\n self.data = data\n # def _build(self):\n # scaler = MinMaxScaler(feature_range=())\n # scaler = StandardScaler()\n \n def __getitem__(self, index) -> (torch.Tensor, torch.Tensor):\n return torch.tensor(self.data.iloc[index, 1:], dtype=torch.float32).to(device), torch.tensor(self.data.iloc[index, 0]).to(device)\n \n def __len__(self):\n return self.data.shape[0]","metadata":{"execution":{"iopub.status.busy":"2023-11-19T18:59:51.474598Z","iopub.execute_input":"2023-11-19T18:59:51.474858Z","iopub.status.idle":"2023-11-19T18:59:51.488188Z","shell.execute_reply.started":"2023-11-19T18:59:51.474835Z","shell.execute_reply":"2023-11-19T18:59:51.487326Z"},"trusted":true},"execution_count":4,"outputs":[]},{"cell_type":"code","source":"train = pd.read_csv('/kaggle/input/mnist-in-csv/mnist_train.csv')\ntest = pd.read_csv('/kaggle/input/mnist-in-csv/mnist_test.csv')","metadata":{"execution":{"iopub.status.busy":"2023-11-19T19:00:27.413676Z","iopub.execute_input":"2023-11-19T19:00:27.414042Z","iopub.status.idle":"2023-11-19T19:00:33.143565Z","shell.execute_reply.started":"2023-11-19T19:00:27.414016Z","shell.execute_reply":"2023-11-19T19:00:33.142750Z"},"trusted":true},"execution_count":6,"outputs":[]},{"cell_type":"code","source":"scaler = StandardScaler()\ntrain.iloc[:, 1:] = scaler.fit_transform(X=train.iloc[:, 1:])\ntest.iloc[:, 1:] = scaler.transform(X=test.iloc[:, 1:])","metadata":{"execution":{"iopub.status.busy":"2023-11-19T19:00:33.145329Z","iopub.execute_input":"2023-11-19T19:00:33.145638Z","iopub.status.idle":"2023-11-19T19:00:34.762186Z","shell.execute_reply.started":"2023-11-19T19:00:33.145613Z","shell.execute_reply":"2023-11-19T19:00:34.761397Z"},"trusted":true},"execution_count":7,"outputs":[{"name":"stderr","text":"/opt/conda/lib/python3.10/site-packages/sklearn/utils/validation.py:767: FutureWarning: is_sparse is deprecated and will be removed in a future version. Check `isinstance(dtype, pd.SparseDtype)` instead.\n if not hasattr(array, \"sparse\") and array.dtypes.apply(is_sparse).any():\n/opt/conda/lib/python3.10/site-packages/sklearn/utils/validation.py:605: FutureWarning: is_sparse is deprecated and will be removed in a future version. Check `isinstance(dtype, pd.SparseDtype)` instead.\n if is_sparse(pd_dtype):\n/opt/conda/lib/python3.10/site-packages/sklearn/utils/validation.py:614: FutureWarning: is_sparse is deprecated and will be removed in a future version. Check `isinstance(dtype, pd.SparseDtype)` instead.\n if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):\n/opt/conda/lib/python3.10/site-packages/sklearn/utils/validation.py:767: FutureWarning: is_sparse is deprecated and will be removed in a future version. Check `isinstance(dtype, pd.SparseDtype)` instead.\n if not hasattr(array, \"sparse\") and array.dtypes.apply(is_sparse).any():\n/opt/conda/lib/python3.10/site-packages/sklearn/utils/validation.py:605: FutureWarning: is_sparse is deprecated and will be removed in a future version. Check `isinstance(dtype, pd.SparseDtype)` instead.\n if is_sparse(pd_dtype):\n/opt/conda/lib/python3.10/site-packages/sklearn/utils/validation.py:614: FutureWarning: is_sparse is deprecated and will be removed in a future version. Check `isinstance(dtype, pd.SparseDtype)` instead.\n if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):\n/opt/conda/lib/python3.10/site-packages/sklearn/utils/validation.py:767: FutureWarning: is_sparse is deprecated and will be removed in a future version. Check `isinstance(dtype, pd.SparseDtype)` instead.\n if not hasattr(array, \"sparse\") and array.dtypes.apply(is_sparse).any():\n/opt/conda/lib/python3.10/site-packages/sklearn/utils/validation.py:605: FutureWarning: is_sparse is deprecated and will be removed in a future version. Check `isinstance(dtype, pd.SparseDtype)` instead.\n if is_sparse(pd_dtype):\n/opt/conda/lib/python3.10/site-packages/sklearn/utils/validation.py:614: FutureWarning: is_sparse is deprecated and will be removed in a future version. Check `isinstance(dtype, pd.SparseDtype)` instead.\n if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):\n","output_type":"stream"}]},{"cell_type":"code","source":"train_dataset = MNIST(data=train)\ntest_dataset = MNIST(data=test)","metadata":{"execution":{"iopub.status.busy":"2023-11-19T19:00:34.763387Z","iopub.execute_input":"2023-11-19T19:00:34.763767Z","iopub.status.idle":"2023-11-19T19:00:34.768528Z","shell.execute_reply.started":"2023-11-19T19:00:34.763733Z","shell.execute_reply":"2023-11-19T19:00:34.767490Z"},"trusted":true},"execution_count":8,"outputs":[]},{"cell_type":"code","source":"train_batchsize = 512\nval_batchsize = 512","metadata":{"execution":{"iopub.status.busy":"2023-11-19T19:00:34.769664Z","iopub.execute_input":"2023-11-19T19:00:34.770020Z","iopub.status.idle":"2023-11-19T19:00:34.780003Z","shell.execute_reply.started":"2023-11-19T19:00:34.769989Z","shell.execute_reply":"2023-11-19T19:00:34.778997Z"},"trusted":true},"execution_count":9,"outputs":[]},{"cell_type":"code","source":"train_dataloader = DataLoader(dataset=train_dataset, batch_size=train_batchsize, shuffle=True)\ntest_dataloader = DataLoader(dataset=test_dataset, batch_size=val_batchsize, shuffle=True)","metadata":{"execution":{"iopub.status.busy":"2023-11-19T19:00:34.782963Z","iopub.execute_input":"2023-11-19T19:00:34.783293Z","iopub.status.idle":"2023-11-19T19:00:34.791010Z","shell.execute_reply.started":"2023-11-19T19:00:34.783264Z","shell.execute_reply":"2023-11-19T19:00:34.790141Z"},"trusted":true},"execution_count":10,"outputs":[]},{"cell_type":"code","source":"model = ANN(\n in_dim=784,\n hidden_dim_1=784//2,\n hidden_dim_2=784//4,\n hidden_dim_3=784//8\n).to(device)","metadata":{"execution":{"iopub.status.busy":"2023-11-19T19:00:34.792040Z","iopub.execute_input":"2023-11-19T19:00:34.792297Z","iopub.status.idle":"2023-11-19T19:00:37.673670Z","shell.execute_reply.started":"2023-11-19T19:00:34.792275Z","shell.execute_reply":"2023-11-19T19:00:37.672894Z"},"trusted":true},"execution_count":11,"outputs":[]},{"cell_type":"code","source":"n_epochs = 20","metadata":{"execution":{"iopub.status.busy":"2023-11-19T19:00:37.674733Z","iopub.execute_input":"2023-11-19T19:00:37.675000Z","iopub.status.idle":"2023-11-19T19:00:37.679288Z","shell.execute_reply.started":"2023-11-19T19:00:37.674977Z","shell.execute_reply":"2023-11-19T19:00:37.678206Z"},"trusted":true},"execution_count":12,"outputs":[]},{"cell_type":"code","source":"lr = 1e-3\noptimiser = torch.optim.Adam(model.parameters(), lr=lr)\n\nloss_fn = torch.nn.CrossEntropyLoss()","metadata":{"execution":{"iopub.status.busy":"2023-11-19T19:00:37.680365Z","iopub.execute_input":"2023-11-19T19:00:37.680660Z","iopub.status.idle":"2023-11-19T19:00:37.691844Z","shell.execute_reply.started":"2023-11-19T19:00:37.680636Z","shell.execute_reply":"2023-11-19T19:00:37.691067Z"},"trusted":true},"execution_count":13,"outputs":[]},{"cell_type":"code","source":"def train_epoch(\n model,\n dataloader,\n optimiser\n):\n model.train()\n \n for batch in tqdm(dataloader):\n x, y = batch[0], batch[1]\n \n output = model(x)\n output = nn.Softmax(dim=-1)(output)\n loss = loss_fn(output, y)\n \n optimiser.zero_grad()\n loss.backward()\n optimiser.step()\n \n if sanity_check:\n break\n \ndef validate(\n model,\n dataloader\n):\n model.eval()\n total_loss = 0\n predictions = []\n truths = []\n \n with torch.no_grad():\n for batch in tqdm(dataloader):\n x, y = batch[0], batch[1]\n \n output = model(x)\n output = nn.Softmax(dim=-1)(output)\n loss = loss_fn(output, y)\n total_loss += loss.detach().cpu().item()/len(dataloader)\n \n preds = torch.argmax(output, dim=-1)\n predictions.extend(preds.cpu())\n truths.extend(y.cpu())\n \n if sanity_check:\n break\n \n acc = accuracy_score(y_true=truths, y_pred=predictions)\n f1 = f1_score(y_true=truths, y_pred=predictions, average='macro')\n \n return total_loss, acc, f1","metadata":{"execution":{"iopub.status.busy":"2023-11-19T19:00:37.692844Z","iopub.execute_input":"2023-11-19T19:00:37.693103Z","iopub.status.idle":"2023-11-19T19:00:37.703320Z","shell.execute_reply.started":"2023-11-19T19:00:37.693081Z","shell.execute_reply":"2023-11-19T19:00:37.702576Z"},"trusted":true},"execution_count":14,"outputs":[]},{"cell_type":"code","source":"def train_model(\n model,\n train_dataloader,\n test_dataloader,\n optimiser,\n):\n for epoch in range(1, n_epochs+1):\n start_time = time.time()\n \n print(f\"========= EPOCH {epoch} STARTED =========\")\n train_epoch(model=model, dataloader=train_dataloader, optimiser=optimiser)\n \n print(f\"========= TRAIN EVALUATION STARTED =========\")\n train_val_op = validate(model=model, dataloader=train_dataloader)\n \n print(f\"========= TEST EVALUATION STARTED =========\")\n test_val_op = validate(model=model, dataloader=test_dataloader)\n \n print(f\"END OF {epoch} EPOCH\")\n print(f\"| Time taken: {time.time() - start_time: 7.3f} |\")\n print(f\"| Train Loss: {train_val_op[0]: 7.3f} | Train acc: {train_val_op[1]: 1.5f} | Train f1: {train_val_op[2]: 1.5f} |\")\n print(f\"| Test Loss: {test_val_op[0]: 7.3f} | Test acc: {test_val_op[1]: 1.5f} | Test f1: {test_val_op[2]: 1.5f} |\")\n \n if sanity_check:\n break\n ","metadata":{"execution":{"iopub.status.busy":"2023-11-19T19:00:37.704519Z","iopub.execute_input":"2023-11-19T19:00:37.705255Z","iopub.status.idle":"2023-11-19T19:00:37.718727Z","shell.execute_reply.started":"2023-11-19T19:00:37.705221Z","shell.execute_reply":"2023-11-19T19:00:37.717878Z"},"trusted":true},"execution_count":15,"outputs":[]},{"cell_type":"code","source":"sanity_check=False","metadata":{"execution":{"iopub.status.busy":"2023-11-19T19:00:37.719661Z","iopub.execute_input":"2023-11-19T19:00:37.719906Z","iopub.status.idle":"2023-11-19T19:00:37.732471Z","shell.execute_reply.started":"2023-11-19T19:00:37.719885Z","shell.execute_reply":"2023-11-19T19:00:37.731694Z"},"trusted":true},"execution_count":16,"outputs":[]},{"cell_type":"code","source":"train_model(\n model=model,\n train_dataloader=train_dataloader,\n test_dataloader=test_dataloader,\n optimiser=optimiser,\n)","metadata":{"execution":{"iopub.status.busy":"2023-11-19T19:00:37.733622Z","iopub.execute_input":"2023-11-19T19:00:37.734053Z","iopub.status.idle":"2023-11-19T20:38:39.869400Z","shell.execute_reply.started":"2023-11-19T19:00:37.734023Z","shell.execute_reply":"2023-11-19T20:38:39.868461Z"},"trusted":true},"execution_count":17,"outputs":[{"name":"stdout","text":"========= EPOCH 1 STARTED =========\n","output_type":"stream"},{"name":"stderr","text":" 0%| | 0/118 [00:00