<?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[Stories by Uftade Bengi Erolcay on Medium]]></title>
        <description><![CDATA[Stories by Uftade Bengi Erolcay on Medium]]></description>
        <link>https://medium.com/@uftadeerolcay?source=rss-d7fcf58c67ac------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kkXP7I7fOB9sBnik3N3Cyw.jpeg</url>
            <title>Stories by Uftade Bengi Erolcay on Medium</title>
            <link>https://medium.com/@uftadeerolcay?source=rss-d7fcf58c67ac------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 18:27:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@uftadeerolcay/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Crime Heatmap for Safer Preschools]]></title>
            <link>https://medium.com/@uftadeerolcay/crime-heatmap-for-safer-preschools-0793b1958ddf?source=rss-d7fcf58c67ac------2</link>
            <guid isPermaLink="false">https://medium.com/p/0793b1958ddf</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[gis]]></category>
            <category><![CDATA[maps]]></category>
            <dc:creator><![CDATA[Uftade Bengi Erolcay]]></dc:creator>
            <pubDate>Wed, 03 Jan 2024 06:07:13 GMT</pubDate>
            <atom:updated>2024-01-03T06:07:13.953Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sq3fS84QXok8t1qAwv69uw.png" /><figcaption>Crime Heatmap and Clustered Preschool Locations</figcaption></figure><p>Have you ever wondered if there is a better way to display data than plain boring tables? Interactive maps here to help you visualize the data easily. You can present the data effectively on map, by using Python and its libraries. Interactive maps are also useful if you want to share your work with stakeholders without mentioning too much confusing technical detail.</p><p>For this particular study, Seaborn, Folium… libraries are used to help people find safer preschools in New York city. Complaints are downloaded from <em>“nypd-complaint-data”</em> and pre-school locations are downloaded from <em>“universal-pre-k-school-locations” </em>dataset; both of these are published as open source on the New York City open data web page (opendata.cityofnewyork.us). Both complaint and preschool dataset have location information which makes possible to map.</p><p><em>Kaggle link with Python code and interactive maps related to this study can be found at the end of the page.</em></p><p>Let’s dive into the project and see some Python codes for this analysis.</p><p>First of all, necessary libraries are imported such as Pandas, Folium, Seaborn… After that, ‘Preschool’ and ‘Crime’ data are read and examined to get information about the data.</p><pre>#Import necessary libraries<br>import pandas as pd<br>import geopandas as gpd<br>import folium<br>import math<br>import matplotlib.pyplot as plt<br>import seaborn as sns<br>from folium import Choropleth, Circle, Marker<br>from folium.plugins import HeatMap, MarkerCluster<br>from datetime import datetime</pre><pre># functions used to explore the data<br>.info()<br>.head()<br>.describe()<br>.isna()</pre><p>The first three functions give detailed information about data and show some statistical values.</p><p>.isna() returns a bool value indicating whether an element has an NaN (None/Null) value or not, for each element in the DataFrame. Since, coordinate and time values are crucial for mapping, these elements can not be null. In both dataset, there are only a few NaN values which can be deleted and would be no or minimum effect on the result.</p><p>So that,</p><pre>.dropna()</pre><p>function is used to drop NaN values on subset. Also, the columns which are known not be needed are dropped from Crime dataset.</p><p>Retrieving unique values for the ‘crime description’ (“OFNS_DESC”) column revealed many values that could fall into the same category in the next step. Therefore, the values were regrouped. This process helped analyze crimes easier.</p><pre># Count number of crimes for each unique offense description<br>crime_plt = crime[&quot;OFNS_DESC&quot;].value_counts()<br>crime_plt.head(11)<br>---------------------------------------<br>OFNS_DESC<br>OTHER                            158035<br>ASSAULT &amp; RELATED OFFENSES        41833<br>HARRASSMENT                       41580<br>TRAFFIC RELATED                   14248<br>DRUGS                              6494<br>SEX CRIMES                         5403<br>WEAPONS                            4001<br>OFFENSES RELATED TO CHILDREN         86<br>UNCLASSIFIED                         18<br>WEAPONS ON SCHOOL                     9<br>KIDNAPPING &amp; RELATED OFFENSES         5 </pre><p>The ‘OTHER’ values are dropped from the ‘OFNS_DESC’ column to focus more on the number of the known values, as shown in the below histogram. “HARASSMENT” and “ASSAULT &amp; RELATED OFFENSES” categories have the highest number of complaint by far.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xyq1wjj00eh-00MgQRLRUA.png" /><figcaption>Number of Complaints</figcaption></figure><p>For detailed analysis, after a little research on Google, it can be seen that the opening hours of preschools were generally between 6 AM to 7 PM, which means, if we take drop off and pick up times into account, hours to analyze should be between 6.30 AM to 7.30 PM.</p><p>For this case, firstly, object dtype should be converted to datetime and then, occurance time of complaint and preschool open hours should be compared to see if crimes committed are in or out of the school times.</p><pre># Change crime[&quot;CMPLNT_FR_TM&quot;] type to datetime.<br># Compare time if occurance time of complaint is in or out of the given school times<br>crime[&quot;CMPLNT_FR_TM&quot;] = pd.to_datetime(crime[&quot;CMPLNT_FR_TM&quot;], format=&#39;%H:%M:%S&#39;).dt.time<br><br>start = &quot;05:30:00&quot;<br>end = &quot;19:30:00&quot;<br>dts = datetime.strptime(start,&quot;%H:%M:%S&quot;).time()<br>dte = datetime.strptime(end,&quot;%H:%M:%S&quot;).time()<br><br>count = 0<br>for i in range(len(crime[&quot;CMPLNT_FR_TM&quot;])):<br>    if crime[&quot;CMPLNT_FR_TM&quot;].iloc[i] &gt; dts:<br>        if crime[&quot;CMPLNT_FR_TM&quot;].iloc[i] &lt; dte:<br>            count += 1<br>    else:<br>        crime[&quot;CMPLNT_FR_TM&quot;].iloc[i] = 0<br>warnings.filterwarnings(&#39;ignore&#39;) <br>print(count)<br><br>#delete rows which have value &quot;0&quot; (zero) in &quot;CMPLNT_FR_TM&quot; column<br>crime = crime[crime[&quot;CMPLNT_FR_TM&quot;] != 0]</pre><p>If the new crime numbers are graphed, it can clearly be seen that numbers are changed for each offense description after time limitation and overall number of crimes committed are decreased. Even though the number of complaints has changed, their order are still the same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ADi751NNvWFM_dplIE5o-Q.png" /><figcaption>Number of Complaints After Time Filter</figcaption></figure><p>Before the final step, number of crimes committed per borough was shown down by pie chart. Considering the rates, borough which has the highest crime rate is Brookly and the safest borough is Staten Island. Queens and Manhattan have similar crime rates around 20%, and Bronx has the second highest crime rate among these 6 categories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*-mW27OuPbYWq5nKF9wz2ew.png" /></figure><p>Finally, we have interactive maps and Python codes for this study which you can access through the Kaggle link given at the end of this page. For now, let’s examine the maps below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*JbI7R05s7pj1a2QcCLtBDA.png" /><figcaption>Preschools’ Location</figcaption></figure><p>As can be seen on the map, preschools in New York are clustered and displayed using Folium library. Each cluster has a number written on it, and the clusters turn from green to orange as the number of schools increases per cluster. The exact locations of preschools can be shown by zooming in on the map.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*vJfEiO6ILCEsscYkZzY2oQ.png" /><figcaption>Zoomed In</figcaption></figure><p>The exact location information for each school is shown with a green information symbol. To make this clustered school data more meaningful, the crime dataset has been added as a heat map.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nt2WnMSZmMQ3AO1V7QU62A.png" /><figcaption>Crime Heat Map and Clustered Preschool Locations</figcaption></figure><p>Crime data is displayed with a heat map and the locations of preschools are added above it. The heat map is red in areas where number of crime committed is high.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*3ZEAUjqFPJpidzUoyVuAvw.png" /></figure><p>Areas with the lowest crime rates are shown in blue. As the crime rate increases, the color changes from cold tones to warm tones.</p><p>To conclude, just by looking at the intersection of crime heat map and preschool locations on final map, people can choose the safest school by location. If the school is located in red or orange zones, the school may be less safe because recidivism is more likely in those areas. However, no color means no crime. Therefore, choosing schools in those regions or blue-green areas will be a safer option.</p><p>Of course, by adding more parameters and dataset or maybe a different pov, this study can be improved.</p><p>Thank you to those who have read this far. I’d love to hear your opinions and feedback. Feel free to connect with me!</p><p><a href="https://www.kaggle.com/code/uftadeerolcay/mapping-crimes-for-safer-preschools">Mapping Crimes for Safer Preschools</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0793b1958ddf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Veri Bilimine Giriş]]></title>
            <link>https://medium.com/@uftadeerolcay/veri-bilimine-giri%C5%9F-f390f8992ce7?source=rss-d7fcf58c67ac------2</link>
            <guid isPermaLink="false">https://medium.com/p/f390f8992ce7</guid>
            <category><![CDATA[introduction]]></category>
            <category><![CDATA[veri-bilimi]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Uftade Bengi Erolcay]]></dc:creator>
            <pubDate>Sat, 21 May 2022 15:37:31 GMT</pubDate>
            <atom:updated>2022-05-21T15:37:31.227Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*SNO6vl3QBvtOB-B7vxG8Yg.png" /></figure><p>Yapay zekanın alt kümesi olarak kabul edilen makine öğrenmesi, bilgisayara doğrudan yönergeler olmadan, matematiksel modelleri ve algoritmaları kullanarak bilgisayarın öğrenmesidir. Makine öğrenmesi (ML), aynı zamanda bir insanın yeni bir bilgi öğrenmesi gibi de düşünülebilir. Veri ve bilgi miktarı artıkça, alınan sonuçların doğruluğu da artar. Makine öğrenmesinde denetimli (supervised), denetimsiz (unsupervised) ve pekiştirmeye dayalı öğrenme (reinforcement) olmak üzere üç teknik uygulanır. Makine öğrenmesi adımları 4 ana başlıkta toplanabilir; veri toplama ve ayıklama, model seçme ve eğitme, modeli doğrulama, sonuçları yorumlama ve tahmin. Makine öğrenmesinden finans, bankacılık, tarım, ulaşım, sağlık, siber güvenlik gibi birçok farklı alan faydalanmaktadır.</p><h3>Denetimli ve Denetimsiz Öğrenme (Supervised vs. Unsupervised Learning)</h3><h4>Denetimli Öğrenme</h4><p>Makine öğrenmesinde, eğitim(train) için kullanılan veri setinde gerekli olan girdiler(input) ve çıktılar(output) vardır. Bu girdi ve çıktıların eğitimden önce etiketlenmesi gerekir. Etiketleme işlemi genellikle veri bilimciler tarafından yapılır. En az bir aşamada insan gözetimi gerektiren bu uygulamaya denetimli öğrenme denir. Makineye örnek etiketli verileri sağladıktan sonra, kullanılan algoritma yeni veri setinde, denetimli olarak etiketlenen veriyi analiz ederek doğru çıktılar verir. Denetimsiz öğrenmeye göre daha doğru sonuçlar verir.</p><p><strong><em>Denetimli öğrenme şekilleri:</em></strong></p><ul><li><em>Classification</em></li><li><em>Regression</em></li><li><em>KNN</em></li><li><em>Desicion Trees</em></li><li><em>Naive Bayes</em></li></ul><h4>Denetimsiz Öğrenme</h4><p>Denetimsiz öğrenme, makinenin, sınıflandırılmamış ve etiketlendirilmemiş eğitim verilerini kullanarak, insan gücüne ve yönlendirmesine ihtiyaç olmadan algoritmaların bu veriler üzerinde uygulandığı öğrenme biçimidir. İstenilen doğru sonuçları elde edebilmek için denetimli öğrenmeye göre daha büyük veri setlerine ihtiyaç duyar.</p><p><strong><em>Denetimsiz Öğrenme yaklaşımları:</em></strong></p><ul><li>Clustering</li><li>Principal Component Analysis</li></ul><h3>Regresyon ve Sınıflandırma (Regression vs. Classification)</h3><p>Regresyon algoritması, sürekli (continuous) veya sıralı değerleri tahmin ederken, sınıflandırmada sıralı olmayan/kategorik değişkenler vardır. Bir kişinin boyundan, kilosundan, yağmurun yağma olasılığından, maaştan veya fiyatlardan bahsederken sürekli değişkenleri kullanırız ve bu değişkenlerin olduğu yerde regresyon modelleri ele alınmalıdır. Sebze çeşitleri, renkler, cinsiyet veya evet/hayır cevaplı sürekli olmayan değişkenler ise sınıflandırma modeline aittir.</p><h3>Veri Tipleri (Data Types)</h3><p>Makine öğrenmesinde veriler numerik, kategorik, zaman serileri, metin olmak üzere 4 basit şekilde gruplandırılabilir.</p><p>Numerik verileri “continuous &amp; discrete” ve “interval &amp; ratio” olmak üzere iki ayrı gruba ayırabiliriz. İlk grupta sürekli (continuous) veriler ve kesikli (discrete) veriler bulunmaktadır. Continuous veriler yukarıda da belirtildiği üzere boy, fiyat gibi küsüratlı olabilen sürekli verilerken; discrete veriler 3 insan gibi küsüratlı/devamlı olmayan verilerdir. Interval verilerde gerçek sıfır kavramı yoktur. Bu tarz verilerde sıfır rakamı bir şeyin olmadığını göstermez, sadece sayısal değerdir. Havanın sıfır santigrat derece olması buna örnek verilebilir. Hava sıfır santigrat dereceyken, havanın sıcaklığı yok diyemeyiz. Bu mantıkla, 10 santigrat derece 5 santigrat derecenin iki katıdır gibi söylemlerde de bulunamayız çünkü sıfır derece bizim referansımız değildir. Ratio ise mutlak sıfır bulundurduğu için, “yarısı” veya “katı” gibi ifadeler söylenebilir. Sıcaklığın sıfır Kelvin derece olması durumunda maddedeki moleküllerin teorik olarak hareketsiz olma durumundan bahsedildiği için sıfır Kelvin derecesi bu örnekte mutlak sıfırdır. Yani, “10 Kelvin, 20 Kelvin’in yarısıdır.” diyebiliriz.</p><p>Kategorik veriler ise “binary &amp; multiclass” ve “nominal &amp; ordinal &amp; kardinal” olmak üzere iki grupta incelenebilir. Kategorik veri tipi özellik/kategori belirtir ancak yine kategorik olarak sayılarla da ifade edilebilir (1 sayısı arabaları ifade ederken 2&#39;nin bisikleti, 3&#39;ün otobüsü ifade etmesi gibi). Kategorileşmiş bu sayısal veriler, matematiksel sayısal veriler olmadığı için üzerinde matematiksel işlemler yapılamaz.</p><p>Binary veriler iki kategoriden oluşur. Bunlar bir şeyin “var” veya “yok” olduğunu gösterebileceği gibi, “kırmızı” veya “mavi” olması gibi farklı iki seçeneği de ifade edebilir. Multiclass, ikiden fazla kategori varsa kullanılır. Kedi, Köpek, İnek, Kuş vb. grupları oluşturduğumuzda multiclass oluşturmuş oluruz. Kategorik veriler; ordinal, kardinal veya nominal olarak da sınıflandırılabilir. Ordinal veriler sıralama varsa kullanılır. Örnek olarak, koşu yarışmasında sıralama yaptığımızda birinci, ikinci ve üçüncü gelenleri ifade ettiğimizde, ilk gelene “birinci” dersek sıralama yapmış oluruz. Kardinal veriler ise sadece sayı belirtir. Yarışmaya katılan “10 kişi var” demek buna örnektir. Nominal ise, bir şeyin özelliğini belirtir (identification). Yarışmadaki bir kişinin kullandığı forma numarası 39 ise, “39” ona ait bir numaradır ve o kişiyi diğerlerinden ayırmamızı sağlar.</p><h3>Yapay Zekada Yanlılık (Bias)</h3><p>Modelin, karar verirken belirli bir grubu avantajlı görüp diğer gruba tam tersi davranması ve adaletsizlik oluşturmasına taraflılık/yanlılık diyebiliriz. Modelimizde yanlılığın olması durumunda, işe alım sürecinde erkeklere öncelik verilmesi, kadın çalışan maaşlarının düşük olması, belirli bir etnik kökene sahip insanların dışlanması gibi bir grup insana zarar veren sonuçlar doğurabilir. Bu taraflılık, modeli oluşturan insanlardan, sistemden veya hesaplamalardan kaynaklanabilir. Verilerin toplanmasından, analizin yapılacağı aşamaya kadar geçen süreçte birçok yanlılık oluşmuş olabilir. Veri toplarken hangi grubun seçildiği, bilinmeyen değerlerin nasıl doldurulduğu, modeli oluşturan kişinin farkında olmadan kendini modele tanıtması gibi durumlar yanlılığın artmasına ve eşitsizliğe sebep olacaktır. Eğitim veri setimizin cinsiyet, ideolojik görüş ve ırk gibi alanlarda yapılan, farkında olduğumuz veya olmadığımız varsayımlardan arındırılması, yanlılığı azaltacak; daha eşit ve tarafsız sonuç almamızı sağlayacaktır.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f390f8992ce7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>