<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[bbm406f17 - Medium]]></title>
        <description><![CDATA[Course Projects for Introduction to Machine Learning, an undergraduate class at Hacettepe University — This semester the theme is Machine Learning and The City.. - Medium]]></description>
        <link>https://medium.com/bbm406f17?source=rss----98e37200303a---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>bbm406f17 - Medium</title>
            <link>https://medium.com/bbm406f17?source=rss----98e37200303a---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 09:57:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/bbm406f17" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Week 7- FINAL-Prediction of life quality]]></title>
            <link>https://medium.com/bbm406f17/week-7-final-prediction-of-life-quality-a255f338e754?source=rss----98e37200303a---4</link>
            <guid isPermaLink="false">https://medium.com/p/a255f338e754</guid>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Tarık Başoğlu]]></dc:creator>
            <pubDate>Mon, 08 Jan 2018 04:30:43 GMT</pubDate>
            <atom:updated>2018-01-08T04:30:43.203Z</atom:updated>
            <content:encoded><![CDATA[<p>Until now we were developing our project as a solution to a regression problem,but in the last weeks, we came across a related work that was solved through classification and we have been thinking about how to get results if our problem is transformed into a classification problem. We tried to get results for both regression and classification models and we have seen that classification can be a good approach for this project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5PgcHFlz5P5QSC4dmAmP9w.jpeg" /><figcaption>Miami,Florida</figcaption></figure><p>For both approaches, we tried 3 methods to predict the scores:</p><p>• Support Vector Machines ( with 3 kernel functions: Linear, Sigmoid, RBF )</p><p>• Decision Trees</p><ul><li>Random Forest ( with bootstrap )</li></ul><p>For classification, we labeled the life quality scores as a range 2, 4 and 10 class.</p><p>You can see the results below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gqhupunzeVKnAyT1agjbxg.png" /><figcaption>Classification Results</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GlggGP_1EO2pFXjRndLhVg.png" /><figcaption>Regression Results</figcaption></figure><p>Unfortunately, we could not get the results we expected and there are a few reasons for this. For some cities, the geojson files that we used in the feature extraction, are quite large that we could not process, and we could not solve the “stop iteration” error we had in processing some files. So we were not able to use data fully (almost 1/3 of the data is not able to be used especially major cities and the small cities can keep more exceptions). In addition to this, the features were not stable enough and they caused the results to deviate considerably.</p><p>Although we could not achieve a successful result, we think that we have made the process analysis sufficiently. We are aware of what we need to achieve and what problems we need to solve, for a successful outcome. And we have got ideas for future of the process. Despite the time we have lost in the first weeks and the difficulties, we have experienced a project process that is as enjoyable as it is challenging.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a255f338e754" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f17/week-7-final-prediction-of-life-quality-a255f338e754">Week 7- FINAL-Prediction of life quality</a> was originally published in <a href="https://medium.com/bbm406f17">bbm406f17</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[WEEK 5-6] Getting into it]]></title>
            <link>https://medium.com/bbm406f17/week-5-6-getting-into-it-8d99d5b47c8d?source=rss----98e37200303a---4</link>
            <guid isPermaLink="false">https://medium.com/p/8d99d5b47c8d</guid>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[muhammet özgür]]></dc:creator>
            <pubDate>Sat, 06 Jan 2018 04:10:16 GMT</pubDate>
            <atom:updated>2018-01-06T04:10:15.849Z</atom:updated>
            <content:encoded><![CDATA[<p>Different approaches, classifiers, data-sets have been tried to get right choice. First of all, features were picked which would be used later as any machine learning problem.KNN, SVM and CNN classifiers are used for this project.SVM and KNN is implemented by scikit-learn pythonmodule. We used keras with tensorflow backend for CNN implementation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*FtKEdo_Y1juF_LcYisXZgw.png" /></figure><p>In implementation detail, we try to design our project according to OOP and modularity rules. We implemented abstract base classifier as super class to other models and we could use inheritance abilities of python which reduced number of code line so much. At the same time, we could implement another classifiers easily with this strategy.</p><p>For instance, before we changed our feature extraction method, our CNN model could not fit because of RAM, too. That is why, we implemented basic fully connected Neural Network by using keras to see how it ended up with features and that was pretty fast to implement.<br> Lack of RAM and lack of NVDIA card, we could fit our model on GPU with keras if we had one which would speed up whole project process time, forced us to use batch learning. CNN supports that kind of learning natively, but KNN does not so we had to keep whole feature array on the disk. Linear SVM does not support in sci-kit library.</p><p>Thus, we used SGDClassifier from scikit-learn library which uses Stochastic Gradient Descent (SGD) with linear classifiers such as SVM, logistic regression etc. <br> Before explaining our CNN model, our basic approach was using some kind of voting system with those models for our prediction method.</p><p>Firstly, songs were splited as you remembered. In the case of 30 seconds part with 41 overlapping frames, 60 mel-band, we had about 63 parts from only one song. Thus, the most predicted label is picked for that song with its possibility. For instance, 53 parts are predicted as ’ege’, label ’ege’ would be picked with possibility 53<em>=</em>60 for that song. Those possibilities are needed because of our voting system.</p><p>After whole models predicted songs, algorithm averages possibilities of same songs that has same label from different models.That average probability is vote number of that label for the song. Say, if we have 3 models and first model predicts first song as ’ege’ with 30% probability, second model predicts first song as ’ege’ with 80% probability and third model predicts first song as ’trakya’ with 70% probability. In that case, first and second model probabilities average which is 55 would be vote number of ’ege’ and 70 would be vote number of ’trakya’. Thus ’trakya’ would be picked as a final label.</p><p>Also, some threshold value can be sent that if final predicted label’s probability is smaller than that threshold value, that means that value does not satisfy and any label cannot be picked. Actually, we used that property as trust parameter which means if probability is smaller than trust value, it is not trustful. Surely that property does not gain any advantage for system but we can see the trust level of predictions. However it has weakness such as if labels has same probabilities, it picks label arbitrarily</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d99d5b47c8d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f17/week-5-6-getting-into-it-8d99d5b47c8d">[WEEK 5-6] Getting into it</a> was originally published in <a href="https://medium.com/bbm406f17">bbm406f17</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[WEEK 7] Results]]></title>
            <link>https://medium.com/bbm406f17/week-7-results-6eebbf6fea7?source=rss----98e37200303a---4</link>
            <guid isPermaLink="false">https://medium.com/p/6eebbf6fea7</guid>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[muhammet özgür]]></dc:creator>
            <pubDate>Sat, 06 Jan 2018 04:09:46 GMT</pubDate>
            <atom:updated>2018-01-06T04:09:46.381Z</atom:updated>
            <content:encoded><![CDATA[<p>We had trained 3 classifiers(SVM, CNN, KNN) with randomly sampled dataset we had gathered. Even tough KNN is a crude machine learning algorithm we had seen that it shows good results in practice. Unfortunately not in our case. KNN results in this experiment was always under 20 percent accuracy in the training which led to us not testing with test dataset. SVM model have given around between 30–35 percent accuracy. It had maximum 38 percent accuracy. CNN fared better but with much difficulty. Training<br> CNN was a bothersome, time-consuming processes. Initially we had trained 4 convolutional layers 96 filters for each layers, kernel sizes (1,1) for performance, reasons, 2 dense layers which all layers activation function relu except the last layer which is softmax, with 5 epochs. Training accuracy was around 34 percent and testing was 29 percent. In order to increase accuracy we increased epochs sizes however the training was excruciating slow and only increasing epochs would not do. Hence we drop one convolutional layer and other optimizers and instead made kernel sizes (5,5) and epochs 100. It had reached 80 percent<strong> </strong>accuracy after 40 epochs. However it started over-fitting. Testing accuracy between 60 and 70 epochs started to decrease which meant over-fitting. We have tested for every 10 epochs therefore the exact point can not be provided. This model took more than hour to train 10 epochs. It can be seen that for every feature we had to train it and test it. In<br> the end we had skipped some test such as doing it for every 10 epochs or so. Our result might be crude in that regard. The features that have been mentioned are used one by one for every model. In the tests Spectral features have given poor results. Generally lower 10 percent if we make a ratio between other corresponding models and feature accuracies. The best feature to use was MFCC which was the feature used when we hit the 80 percent accuracy result on the training data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*ZWGtfM8Qn31Kl6xcZPWfDA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6eebbf6fea7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f17/week-7-results-6eebbf6fea7">[WEEK 7] Results</a> was originally published in <a href="https://medium.com/bbm406f17">bbm406f17</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Week-7 Buildings In The City]]]></title>
            <link>https://medium.com/bbm406f17/week-7-buildings-in-the-city-af04bc0294df?source=rss----98e37200303a---4</link>
            <guid isPermaLink="false">https://medium.com/p/af04bc0294df</guid>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Harun Doğanay]]></dc:creator>
            <pubDate>Fri, 05 Jan 2018 19:07:24 GMT</pubDate>
            <atom:updated>2018-01-05T19:07:24.233Z</atom:updated>
            <content:encoded><![CDATA[<p>Our project was a photo classification project. We tried to make this classification based on the building objects in the photographs. The classes we used in our classification phase were 7. 7 Class 7 meant the geographical regions in Turkey. What we want to do is to classify buildings that<br> are shaped according to geographical features. The probability of knowing correctly is 14 percent when you randomly guess what geographical area your building photograph belongs to. We estimated it by 57 percent using machine learning methods and algorithms. We have trained<br> our system in this direction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/267/1*x9it9vhYd-a3h91sSMCNKw.jpeg" /></figure><p>We were hoping to get the best result using CNN. We achieved the best skull in CNN with 57 percent success. But the SVM also gave a good result. with 55 percent sitting on his second seat and leaving behind most CNN models. Other algorithms have good results but are the lowest in succession.</p><p>All the results we get are obtained with a dataset that is not at all good. However, we have achieved very successful results. Because if someone who examines the dataset does so with his eyes, he will not get much results from the results we have obtained .</p><p>We only deal with 7 regions in Turkey. However, with the development of the project, tests on larger scales can be realized and become the first machine learning based work in the field of geographical architecture.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af04bc0294df" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f17/week-7-buildings-in-the-city-af04bc0294df">[Week-7 Buildings In The City]</a> was originally published in <a href="https://medium.com/bbm406f17">bbm406f17</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Week 5–6 Buildings In The City]]]></title>
            <link>https://medium.com/bbm406f17/week-5-6-buildings-in-the-city-ec83551847c7?source=rss----98e37200303a---4</link>
            <guid isPermaLink="false">https://medium.com/p/ec83551847c7</guid>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Harun Doğanay]]></dc:creator>
            <pubDate>Fri, 05 Jan 2018 18:56:12 GMT</pubDate>
            <atom:updated>2018-01-05T18:56:11.859Z</atom:updated>
            <content:encoded><![CDATA[<p>In 5th an 6th weeks we have worked on methods. Then we gathered result from each.</p><p>We used 5 different methods. These are Convolutional Neural Networks,Support-Vector Machine, Decision Tree,Random Forest,Gradient Boosting.</p><h3>Convolutional Neural Network</h3><p>One of the most popular techniques used in improving the accuracy of image classification is Convolutional Neural Networks (CNNs for short).<br> Building a Convolutional Neural Network We used 80% of the data as the training set and 20% as the test set. X train, X test, y train, y test = train test split(X, y, test size=0.2, random state=4) Now that we’re done pre-processing and splitting our dataset we can start implementing our neural network. We used Keras deep learning library in python to build our CNN(Convolutional Neural Network). The process of building a Convolutional Neural Network always involves four major steps.<br> Step — 1 : Convolution<br> Step — 2 : Pooling<br> Step — 3 : Flattening<br> Step — 4 : Fully connection</p><p>We have been through each of the above procedures while coding our neural network. First let us import all the required keras packages using which we are going to build our CNN, make sure that every package is installed properly in your machine, there is two ways os using keras, i.e Using Tensorflow backend and by using Theano backend.We tested the below code using Theano backend</p><h3>Support Vector Machines</h3><p>In Python, scikit-learn is a widely used library for implementing machine learning algorithms, SVM is also available in scikit-learn library and follow the same structure.(Import library, object creation, fitting model and prediction).</p><h3>Decision Tree</h3><p>While building our decision tree classifier, we can improve its accuracy by tuning it with different parameters(you can see below). But this tuning should be done carefully since by doing this our algorithm can overfit on our training data &amp; ultimately it will build bad generalization model.</p><p>DecisionTreeClassifier(): This is the classifier function for DecisionTree. It is the main function for implementing the algorithms</p><h3>Random Forest</h3><p>Random forest algorithm is a supervised classification algorithm and an ensemble learning method. As the name suggest, this algorithm creates the forest with a number of trees. Random Forest is less vulnerable to overfitting.Random Forest is also available in scikitlearn library and we used it from scikit</p><h3>Gradient Boosting</h3><p>Stochastic Gradient Boosting (also called Gradient Boosting Machines) is one of the most sophisticated ensemble techniques. Gradient Boosting is also available in scikit-learn library and follow the same structure (Import library, object creation, fitting model and prediction). It is also a technique that is proving to be perhaps of the the best techniques available for improving performance via ensembles.</p><p>We construct a Gradient Boosting model for classification using the GradientBoostingClassifier class. This technique employs the logic in which the subsequent predictors learn from the mistakes of the previous predictors. Therefore, the observations have an unequal probability of appearing in subsequent models and ones with the highest error appear most.</p><h3>RESULTS</h3><p>In fact, after we selected this project, it was stated that the research that we conducted resulted in the best result cnn in such photo classification projects. We gave our concentration to CNN. We tested 4–5 models. Some of them gave bad results. We’ll examine the top three models here. We have tried dozens of different configurations for these three models. We have updated the parameters according to the results we have achieved.</p><h3>Convolutional Neural Network</h3><p><strong>Model 1 accuracy: 50% </strong>Our first model 2 convolution layer, 4 activation layer, 1 max pooling, dropout flatten and dense layers. We have used relu as an activation function.The last layers are softmax.</p><p><strong>Model 2 accuracy: 54% </strong>Our second model has 6 convolution layer, 6 dropout layer, 3 max pooling, flatten and dense layers.We have used relu as an activation function.The last layers are softmax.</p><p><strong>Model 3 accuracy: 57% </strong>Our last and third model has 6 convolution layer, 4 dropout layer, 3 max pooling, flatten and dense layers. We have used relu as an activation function. The last layers are softmax</p><p><strong>Support Vector Machines</strong></p><p><strong>Best accuracy: 55%</strong><br> One of the most preferred photo classification algorithms is SVMs. We tested the SVM algorithm to see and compare how successful our CNN models are. With SVM we have achieved much better results than we expected. Obviously, we were not hoping that SVM could get such close results to CNN</p><h4>Decision Tree</h4><p>if we give ’gini’ as criterion parameter we get 34% accuracy and if we give ’entropy’ as criterion parameter we get 35% accuracy.</p><p><strong>Random Forest Best accuracy: 45%</strong></p><p><strong>Gradient Boosting Best accuracy: 48%</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec83551847c7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f17/week-5-6-buildings-in-the-city-ec83551847c7">[Week 5–6 Buildings In The City]</a> was originally published in <a href="https://medium.com/bbm406f17">bbm406f17</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Week 5–6] What Does The City Say?]]></title>
            <link>https://medium.com/bbm406f17/week-5-6-what-does-the-city-say-cd082f996a1e?source=rss----98e37200303a---4</link>
            <guid isPermaLink="false">https://medium.com/p/cd082f996a1e</guid>
            <dc:creator><![CDATA[What does the city say?]]></dc:creator>
            <pubDate>Fri, 05 Jan 2018 12:53:35 GMT</pubDate>
            <atom:updated>2018-01-05T19:01:31.763Z</atom:updated>
            <content:encoded><![CDATA[<p>We’ve been doing classroom and video presentations since our previous blog. We also finished our final report. As we said before, we put our DNN and GMM-DNN comparison results this week.</p><p>We created 747 for training, 240 for validation and 150 for testing by reducing all dataset. However, while minimizing the data (from 1170 to 747) some of the situations (pay attention to the segments extracted from same original recordings, make sure that all files recorded in the same location are placed on the same side of the evaluation[<a href="http://www.cs.tut.fi/sgn/arg/dcase2016/task-acoustic-scene-classification">1</a>] and deal with the data contain errors) are very difficult to achieve, very time-consuming, requires special attention. We made 2 tests for GMM-DNN and DNN test with using MFCC features.</p><ul><li><strong>GMM-DNN test &amp; results:</strong></li></ul><p>As a result of our tests, we achieved a maximum of 76% validation accuracy for GMM and 61.66% for DNN. As a consequence of DNN being lower than GMM, it may be that DNN needs more train data [<a href="http://www.cs.tut.fi/sgn/arg/dcase2016/documents/challenge_technical_reports/DCASE2016_Pugachev_1015.pdf">2</a>] and looks at the general characteristics of the data and is not as sensitive as GMM to local differences. GMM is good in small data sets and clean data. GMM gave higher accuracy than DNN because we created a small and clean dataset.</p><ul><li><strong>DNN Test &amp; Results:</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/0*tUN7BA5fqFFYEpbD." /></figure><p>We get %65.33 test accuracy with DNN+MFCC in the large dataset. As you can see from the above confusion matrix, our model always classified the car sounds correctly. It classifies the city center sounds correct. Sometimes it confused residential-area with park and forest path. This is a reasonable confusion because they contain similar voices such as human voice, birds, water. The model has correctly classified the bus but sometimes confused with train or car. As it can be understood from our results, if background sounds are similar, it might make sense to mix them. Sometimes irrational classifications can also be done because the MFCC features may be inadequate alone [<a href="https://pdfs.semanticscholar.org/b460/5c7dede7443b40170718d8395f872bc0fa1d.pdf">3</a>].</p><ul><li><strong>Future Work</strong></li></ul><p>MFCC usually gives good results when used alone in speech recognition. However, for Scene classification, using just MFCC may be insufficient. <br>As future work, we can use other features, different methods, cleaner and more train data. Also, feature reduction can be done with PCA and regularizer can be used to reduce overfitting. This way we can get better results.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd082f996a1e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f17/week-5-6-what-does-the-city-say-cd082f996a1e">[Week 5–6] What Does The City Say?</a> was originally published in <a href="https://medium.com/bbm406f17">bbm406f17</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[WEEK 4–5] - Brand Recognition Using Machine Learning from Google Street View Images]]></title>
            <link>https://medium.com/bbm406f17/week-4-5-brand-recognition-using-machine-learning-from-google-street-view-images-2877bb6e9411?source=rss----98e37200303a---4</link>
            <guid isPermaLink="false">https://medium.com/p/2877bb6e9411</guid>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Hulya Sermin Karakas]]></dc:creator>
            <pubDate>Fri, 05 Jan 2018 04:15:57 GMT</pubDate>
            <atom:updated>2018-01-05T04:15:57.217Z</atom:updated>
            <content:encoded><![CDATA[<p>Theme: Predicting the Brands</p><p>Team Members : Alper Fırat Kaya, Hülya Şermin Karakaş</p><p>We didn’t write for a while because of the homework density from all other courses but we have lots of exciting news! Finally we finished the Brand Recognition project and the results are much better than we predict from the beginning of the project.</p><p>On those two weeks, we worked on the localization, classification and recognition parts of the project. The most challenging an informative part of the project is the recognition part of the project. We used multilayer perceptron known as multilayer neural network on the project with using Char 74k dataset.</p><p>The dataset contains 74k images but we used the 25k of them which are related to the natural image based approach. The 75 percent of the images used for the training and the 25 percent of the images used for validation.</p><p>For the MLP, we used 2 hidden layer and we got %83.16 accuracy from from validation dataset.</p><p>For the test part, we collected the Google Street Images manually from the web worldwide. According to our experiment, we got %55.62 accuracy rate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AFYteCUnkfwg2bdEnPD1wQ.png" /></figure><p>It was a great opportunity to work on such a project about cities and machine learning. We learned a lot about scene text recognition, localization/classification of natural images and machine learning libraries.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2877bb6e9411" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f17/week-4-5-brand-recognition-using-machine-learning-from-google-street-view-images-2877bb6e9411">[WEEK 4–5] - Brand Recognition Using Machine Learning from Google Street View Images</a> was originally published in <a href="https://medium.com/bbm406f17">bbm406f17</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 7 — Landmark Identifier]]></title>
            <link>https://medium.com/bbm406f17/week-7-landmark-identifier-44981a1e23fc?source=rss----98e37200303a---4</link>
            <guid isPermaLink="false">https://medium.com/p/44981a1e23fc</guid>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Serhat Sağlık]]></dc:creator>
            <pubDate>Thu, 04 Jan 2018 04:34:19 GMT</pubDate>
            <atom:updated>2018-01-04T04:34:18.890Z</atom:updated>
            <content:encoded><![CDATA[<p>After weeks of experimenting with different neural network models and optimization algorithms we’ve decided to use ResNet50 model with Stochastic Gradient Descent optimizer and we’ve made some changes on our code for it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pBG9EupH3hdprskH.png" /><figcaption>ResNet is a short name for Residual Network.</figcaption></figure><p>To solve the problem of deep neural networks being more difficult to train, researchers Kaiming He, Xiangyu Zhang, Shaoqing Ren and Jian Sun from Microsoft developed Deep Residual Learning for Image Classification in 2015.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/0*ZqVbIjnOJUEsOC_l." /></figure><p>Residual Networks have shortcut connections. Shortcut connections (connections that skips one or more layers) perform identity mapping and the result is added to the output of the stacked layers, effetively reducing the complexity of having a deep network while keeping the accuracy gains that comes with it. For detailed information you can check their paper: <a href="https://arxiv.org/pdf/1512.03385.pdf">https://arxiv.org/pdf/1512.03385.pdf</a></p><p>We didn’t want to train our network from scratch as it would take a lot of time. Instead we used ResNet50 weights that’s been trained on ImageNet dataset to fine-tune them to best suit our needs.</p><p>We used ResNet50 as our base model and added our own softmax output layer for our 176 classes.</p><p>ResNet50 has 174 layers. At the beginning we froze all ResNet50 layers to train our output layers for a few epochs to give the model a general idea of our classes. Then we unfroze the last identity blocks and started fine-tuning resnet50, not touching the first 153 blocks.</p><p>For more accurate training we used Keras’ ImageDataGenerator library. With that library we are able to rotate, shift and zoom an image and use the created images to increase our training set’s size.</p><p>We’ve tried different learning rates for our model. And at the end we decided to use a learning rate of 0.0001 as it gave the best results.</p><p>We saved the weights after each epoch. After around 100 epochs it converged and gave us these results:</p><pre>loss: 0.0825 - acc: 0.9793 - top_5_categorical_accuracy: 0.9994 <br>val_loss: 2.1778 - val_acc: 0.6548 <br>val_top_5_categorical_accuracy: 0.8372</pre><p>Some of the reasons behind the difference between validation accuracy/loss and training accuracy/loss are the small size of our dataset (~24k training ~6k test images) and the noise we failed to clean. It can learn the given images’ classes with an outstanding accuracy but can’t apply its knowledge to different real life images with the same accuracy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*pTp_0YG0d_aAHBwdJttuVA.png" /><figcaption>Our valuable project member Ege Ucak, behind Tarihi Asansor, İzmir</figcaption></figure><p>For example:<br>We have a total of 244 training images (2 times the number of average images per class) for Tarihi Asansor and most of them are full sized images from the front. There are only 2 similar pictures in our training set. So when the network looks at Ege’s photo it recognizes the street and buildings around it before it recognizes the top of the Tarihi Asansor building and guesses the class as <em>Fransız Sokağı (La Rue Française) with 33% certainty.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*7n_h1QjuKkM4GxB11gxmjQ.png" /><figcaption>Fransız Sokağı (La Rue Française), Istanbul</figcaption></figure><p>This showed us the importance of the size and variety of the dataset.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44981a1e23fc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f17/week-7-landmark-identifier-44981a1e23fc">Week 7 — Landmark Identifier</a> was originally published in <a href="https://medium.com/bbm406f17">bbm406f17</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 6 — MAKE WORLD GREEN AGAIN!]]></title>
            <link>https://medium.com/bbm406f17/week-6-make-world-green-again-5f588e7c479b?source=rss----98e37200303a---4</link>
            <guid isPermaLink="false">https://medium.com/p/5f588e7c479b</guid>
            <category><![CDATA[aqi]]></category>
            <category><![CDATA[svm]]></category>
            <category><![CDATA[regression]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[İhsan Baran Sönmez]]></dc:creator>
            <pubDate>Tue, 02 Jan 2018 04:18:11 GMT</pubDate>
            <atom:updated>2018-01-02T04:18:10.913Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sABc9PoBFmuMaNH3.jpg" /><figcaption>Eiffel tower from Montmartre</figcaption></figure><p>In this week, we have worked on finalizing the code part and we tried to extend our dataset for pollutants other than NO2. This way we aimed to extend our design for predicting the AQI of the day with help of the peak values estimated. We were only able to add CO because the raw data for SO2 wasn’t suitable for our project.</p><h4>WHAT IS AQI?</h4><p>AQI -air quality index- is a number calculated for measuring how much the air is polluted. AQI is directly related to unwanted ratios of molecules in the air. In short, it gives us an idea of air quality and we can say that higher AQI means more polluted air.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/0*MHh4537QwpttvVvy.gif" /><figcaption>-Aqi Table-</figcaption></figure><h3>OVERVIEW OF THE APPROACH</h3><p>As the summary, we can say that we have approached the problem in two different ways.</p><h4>1- Classification Problem</h4><p>1.1 — Peak Value Level Estimation: Neural Network, Decision Tree (Week 5)</p><p>1.2 — AQI Estimation: Since the discrete case is not a sensible approach to this problem, it is not an appropriate way to estimate the AQI level.</p><h4>2- Regression Problem</h4><p>2.1 — Peak Value Estimation (First Phase): Linear Regression, Polynomial Regression (Week 4)</p><p>2.2 — AQI Estimation: Polynomial Regression, SVM (This Week)</p><h3>AQI ESTIMATION</h3><p>The model used for AQI estimation takes the pollutant densities -peak values of NO2 and CO in our project- as input. It outputs the predicted AQI of the day in the regression model and it outputs the predicted level of AQI of the day in the classification model. The wide of each level is 15. In our dataset, this range corresponds to 7 levels. So the minimum AQI belongs to level 1 and maximum AQI belongs to level 7 in our dataset.</p><p>Firstly, we tested this part with a dataset consists of peak values of NO2, peak values of CO and AQI of days. For predicting AQI -continuous case-, when we trained an SVM model using this dataset, it gives the accuracy of 0.96 and the regression model gives nearly 1.0 with mean-squared error 0.18. For predicting AQI level -using 7 levels-, the SVM model gives the accuracy of 1.0. From these results, we concluded that if we succeed at estimating the peak value, estimating the AQI of the day will not be a problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*ykG_Vft8h6TC76-_FEzkdg.jpeg" /></figure><p>Then we fed these models with estimations from the first phase. The results weren’t as high as the before. As it’s seen from the plot above, the best accuracy gets close to the worst case of the first phase. The source of the mispredictions here is the error in the input data. Since the input of this part is the output of the first phase, the error in the first phase directly misleads the estimations.</p><p>In order to train the model for this kind of errors, we used a train set consists of the estimated peak values instead of a train set consists of true peak values. The progress made in SVM model with this idea is shown in the table below. The Polynomial model didn’t make progress with help of this idea.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*8KJpePRsEyxhH-mEWIy9TQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f588e7c479b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f17/week-6-make-world-green-again-5f588e7c479b">Week 6 — MAKE WORLD GREEN AGAIN!</a> was originally published in <a href="https://medium.com/bbm406f17">bbm406f17</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 1 — Landmark Identifier]]></title>
            <link>https://medium.com/bbm406f17/week-1-landmark-identifier-308f64c7470?source=rss----98e37200303a---4</link>
            <guid isPermaLink="false">https://medium.com/p/308f64c7470</guid>
            <dc:creator><![CDATA[Serhat Sağlık]]></dc:creator>
            <pubDate>Mon, 01 Jan 2018 17:20:07 GMT</pubDate>
            <atom:updated>2018-01-01T17:20:06.607Z</atom:updated>
            <content:encoded><![CDATA[<p>Team Members: Serhat Sağlık, Ege Uçak</p><p>We’ve decided to change our project and come up with a new one.</p><p>In our project we will design a program that can identify landmarks in Izmir, Istanbul and Ankara from photographs.</p><p>We will use a web crawler to download our training data from sites like Flickr and Google Maps.</p><p>If we get extremely high accuracy we are planning to add historical neighbourhoods from the same cities and will consider adding more cities.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=308f64c7470" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f17/week-1-landmark-identifier-308f64c7470">Week 1 — Landmark Identifier</a> was originally published in <a href="https://medium.com/bbm406f17">bbm406f17</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>