<?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 Deniz Can Oğuz on Medium]]></title>
        <description><![CDATA[Stories by Deniz Can Oğuz on Medium]]></description>
        <link>https://medium.com/@denizcan.oguz?source=rss-9512b8c2c9b9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lnzJ163_MA-eyHHN7uMEbQ.jpeg</url>
            <title>Stories by Deniz Can Oğuz on Medium</title>
            <link>https://medium.com/@denizcan.oguz?source=rss-9512b8c2c9b9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 02:40:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@denizcan.oguz/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[Potential Customer Revenue Calculation with Rule Based Classification]]></title>
            <link>https://medium.com/@denizcan.oguz/potential-customer-revenue-calculation-with-rule-based-classification-daaa6ecad574?source=rss-9512b8c2c9b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/daaa6ecad574</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[potential-customerrevenue]]></category>
            <category><![CDATA[rule-based-classification]]></category>
            <dc:creator><![CDATA[Deniz Can Oğuz]]></dc:creator>
            <pubDate>Tue, 14 Dec 2021 23:41:03 GMT</pubDate>
            <atom:updated>2021-12-14T23:41:03.338Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DOA_q4mEp7b6ydMrF63QuA.png" /></figure><p>Hello there,</p><p>Our topic today is <strong>Potential Customer Revenue Calculation with Rule Based Classification</strong>.</p><h4>So what does rule-based classification mean?</h4><p>Rule-based classification is the processes we do to have a pattern and proceed programmatically to achieve the desired output according to our problem.</p><p>Okay we have a business problem.</p><p>Let’s take a look!</p><h4>Business Problem:</h4><p>A game company using some features of its customers new level-based customer definitions (persona) and these new customer definitions create segments according to these segments and create new How much is the average number of customers coming to the company? he wants to guess what he can gain.</p><p><strong>For example</strong>, A 25-year-old male from Turkey who is an IOS user how much the user can earn on average is to be determined.</p><h4>Our Dataset Story</h4><p>The dataset contains the prices of the products sold by an international game company and some demographic information of the users who bought these products.</p><p>The data set consists of records created in each sales transaction. This means that the table is not deduplicated. In other words, a user with certain demographic characteristics may have shopped.</p><h4>Our variables and the name of our dataset</h4><ul><li>persona.csv : dataset name</li><li>PRICE : Customer spend amount</li><li>SOURCE : The type of device the customer is connecting to</li><li>SEX : Customer’s gender</li><li>COUNTRY : Customer’s country</li><li>AGE : Customer’s age</li></ul><h4>Let’s see the steps to take</h4><ul><li>First appearance of our dataset</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*-aRU0j622LT-EPWuiS5ggw.png" /></figure><ul><li>We can see that it consists of 5000 observations and 5 different variables</li><li>Target view of our dataset</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*Nu_gocYHMuU9rguhbqtOFg.png" /></figure><ul><li>We can see that the number of observations and variables are reduced as we intended</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*yjnj4Gxsrwceg20_v1xU9w.png" /></figure><h4># We import our dataset and pandas library</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b6362186fcc489e237e8d7a3eb9b0eba/href">https://medium.com/media/b6362186fcc489e237e8d7a3eb9b0eba/href</a></iframe><h4># Let’s get to know our data set closely and view descriptive statistics with the help of a function</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c7315279847ab4af8962e0ae4cdedc09/href">https://medium.com/media/c7315279847ab4af8962e0ae4cdedc09/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*rjymj7AjBHBGDCQwR9toVA.png" /><figcaption>step2 output</figcaption></figure><h4># In COUNTRY, SOURCE, SEX, AGE breakdown<br>What are average earnings?</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/99f16599ff11aea2acc1d936f9020d9f/href">https://medium.com/media/99f16599ff11aea2acc1d936f9020d9f/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*ItMZPBfl4iXUb45GySZwRg.png" /><figcaption>step3 output</figcaption></figure><h4># In order to see the output better, let’s sort it in descending order with the sort_value method and define it into a new variable.</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8eeca1a2b4b361b9b9fbd58bd50301a6/href">https://medium.com/media/8eeca1a2b4b361b9b9fbd58bd50301a6/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*t5NF8BlMOHuGgzPK0bSncQ.png" /><figcaption>step4 output</figcaption></figure><h4># Let’s reset Country Source Sex Age, which should actually be variable in the previous output but is in index form.</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6953b20ea56942849478a5529812db5c/href">https://medium.com/media/6953b20ea56942849478a5529812db5c/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*FWaC3e_Lnn_UwefTjc_BGg.png" /><figcaption>step5 output</figcaption></figure><h4># Let’s turn the age variable to a categorical variable and add it to our dataset as age_cat.</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3548d183149e2ddee73ba2427ef1e050/href">https://medium.com/media/3548d183149e2ddee73ba2427ef1e050/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*qEJj_rsAxJBQRHfCYxhs6Q.png" /><figcaption>step6 output</figcaption></figure><h4># Let’s collect the Country, Source, Sex, Age_Cat variables from the previous output into a variable. Let’s set our variable to be named customers_leved_based.</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/03ac3e5e458ea296716d2582e4548157/href">https://medium.com/media/03ac3e5e458ea296716d2582e4548157/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*_eDj9oHlnpF4pXBRMszcIA.png" /><figcaption>step7 output</figcaption></figure><h4># Now let’s segment our dataset by price</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6c7d7b569e2b11b59c1a95b9b73935de/href">https://medium.com/media/6c7d7b569e2b11b59c1a95b9b73935de/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*Nu_gocYHMuU9rguhbqtOFg.png" /><figcaption>step8 output</figcaption></figure><ul><li>As we saw above, we reached our goal.</li></ul><h4># Now is the time to estimate potential customer revenue</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/217ceba0f2b80af6d096f8caafccaedc/href">https://medium.com/media/217ceba0f2b80af6d096f8caafccaedc/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*jzJ224ghuOX34hU_yMWC3A.png" /><figcaption>predict</figcaption></figure><p><strong># Above, Turkish android female 31–40 years old individual is expected to bring 41.83 units of income. This person is in segment A.</strong></p><p>Thank you if you’ve read this far. I hope it was useful.</p><p>Resources and Thanks</p><ul><li><a href="https://www.veribilimiokulu.com/">VBO — Veri Bilimi Okulu</a></li><li><a href="https://www.linkedin.com/in/vahitkeskin/">Vahit Keskin</a></li><li><a href="https://www.linkedin.com/in/oguzerdo/">Oğuz Erdoğan</a></li></ul><p># Follow the <a href="https://github.com/denizcanoguz/Rule-Based-Classification-Project">link</a> for GitHub Repository doc.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=daaa6ecad574" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[C:\DataSciencePath\.. First Topic: Virtual Environments]]></title>
            <link>https://medium.com/@denizcan.oguz/c-datasciencepath-first-topic-virtual-environment-1e01d413c370?source=rss-9512b8c2c9b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e01d413c370</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[virtual-environment]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[conda-environment]]></category>
            <dc:creator><![CDATA[Deniz Can Oğuz]]></dc:creator>
            <pubDate>Sat, 04 Dec 2021 22:02:39 GMT</pubDate>
            <atom:updated>2021-12-04T22:07:20.568Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi there, today’ s topic <strong>Virtual Environments</strong>.</p><p><strong>Why do we need to create a virtual environment?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*vM4mKxpQoK6Pd3b6K0x5KA.png" /></figure><p>Simply put, we are going to create a project and there are packages we will need. But there are packages that we don’t need.</p><p>Maybe i want to use <strong>version 1</strong> in one project or i want to use <strong>version 1.2</strong> in other project.</p><p>In such cases, we create <strong>virtual environments</strong> for ourselves.</p><h3><strong>So what are the adventages of creating a Virtual Environment?</strong></h3><ul><li>We can work in isolation</li><li>Provides project specific <strong>package management</strong></li></ul><h4>Virtual Environment Tools</h4><p>There are four pieces our tools</p><ul><li>venv</li><li>virtualenv</li><li>pipenv</li><li>conda</li></ul><h3>So what is package management?</h3><p>It is the installation, removal and updating of the necessary package using some tools.</p><h4>Package Management Tools (file extensions)</h4><ul><li>pip (requement.txt)</li><li>pipenv (Pipfile)</li><li>conda (environment.yaml)</li></ul><h3>Relationship Between Virtual Environment and Package Management</h3><ul><li>venv</li><li>virtualenv</li></ul><p>The above virtual environment tools use <strong>pip tool </strong>for package management.</p><ul><li>pipenv</li><li>conda</li></ul><p>The above virtual environment tools can do both <strong>package management</strong> and <strong>virtual environment management</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*yjnj4Gxsrwceg20_v1xU9w.png" /></figure><p>Footnote! (To do this we need a development environment or installation of the <a href="https://www.anaconda.com/products/individual">conda platform</a>. My choice is <strong>conda</strong>.)</p><p>We need some code so that we can experiment. These:<a href="https://docs.conda.io/projects/conda/en/4.6.0/_downloads/52a95608c49671267e40c689e0bc00ca/conda-cheatsheet.pdf">https://docs.conda.io/projects/conda/en/4.6.0/_downloads/52a95608c49671267e40c689e0bc00ca/conda-cheatsheet.pdf</a></p><p>Yes, after installing conda, we can start doing our operations from anaconda promt or terminal.</p><h4>Let’s first see what we have</h4><p>&gt;conda env list</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*2AumNzZD7CfWffHExClYuA.png" /></figure><h4>I am creating a virtual environment in my own name. And i install python v3.(you can use different)</h4><p>&gt;conda create -n deniz python=3</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*Y5EJIPNHb50zdMTP9YFb8Q.png" /></figure><p>It asks if there are necessary installations within the scope of the package plan, we say yes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*6rii0d0RnP1gf4YCTKIlmQ.png" /></figure><p>Process completed.</p><h4>We activate the environment we created</h4><p>&gt;conda activate deniz</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*ho7iuXHRdObI4vY18WNPVw.png" /></figure><p>We activated</p><h4>Let’s list our installed packages</h4><p>&gt;conda list</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*eCyqgsBFLzXWX9PCzW1DuA.png" /></figure><h4>Let’s download the current version of Numpy and version 1.2.1 of Pandas into the Environment at the same time.</h4><p>&gt;conda install pandas=1.2.1 numpy</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*s71_QTZWo8uvp5mfq0VcUw.png" /></figure><p>Here we see the packages to be installed, updated and downgraded. We say yes to the incoming question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*YObkfjjwfhBcv-Ci5T08KA.png" /></figure><p>Process completed.</p><h4>Let’s take a look at the packages</h4><p>&gt;conda list</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*cCDUVzUstCgHC5NJIAuyYw.png" /></figure><p>Right next to the package names we can see the versions</p><h4>Let’s upgrade Pandas and see its new version</h4><p>&gt;conda upgrade pandas</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*-sD4unwdgmTYl42S6lwuJA.png" /></figure><p>We say yes to the incoming question</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*lyoK0zcsYrJtqGJxiWkGuQ.png" /></figure><p>We see that Pandas has been updated from 1.2.1v to 1.3.4v</p><h4>Let’s delete numpy from environment</h4><p>&gt;conda remove numpy</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*L5Cn_HbmG7C75-UYFGA7vw.png" /></figure><p>We say yes to the incoming question</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*lw4YUFpExAdQNoRxjs6bVw.png" /></figure><p>Process completed. You can see it was deleted by typing <strong>conda list</strong></p><h4>Let’s download the seaborn library and the matplotlib library with their current versions at the same time</h4><p>&gt;conda install seaborn matplotlib</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*MuvTuAqKsCrJr_5Iq-e_Nw.png" /></figure><p>Here we see the libraries to download and the packages to be installed with them. We say yes to the incoming question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*CC_AJ3p5DIjYOmeONoJm7w.png" /></figure><p>Process completed.</p><h4>Let’s export the libraries in the virtual environment with their version information and examine the yaml file.</h4><p>&gt;conda env export &gt; environment.yaml</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*ni-bPrrj-5xJnA64gkt5rA.png" /></figure><p>Process completed.</p><p>To read the exported file, if we are in the right directory, you can read it by typing <strong>environment.yaml.</strong></p><h4>Let’s delete the environment you created</h4><p>Note: First we have to deactivate environment</p><p>&gt;conda deactivate</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*O2-Lf8BS9X4iVbFP_-DiTw.png" /></figure><p>Process completed.</p><p><strong>Let’s delete</strong></p><p>&gt;conda env remove -n deniz</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*EsiN03MflM-ko82c9csMDw.png" /></figure><p>Deletion is complete. then we list and see.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>Thank you if you’ve read this far. That’s all for now.</strong></p><p>Resources</p><ul><li><a href="https://www.veribilimiokulu.com/">M. Vahit Keskin — Veri Bilimi Okulu</a></li><li><a href="https://blog.debugeverything.com/virtual-environments-with-python-virtualenv/">debugeverything.com</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e01d413c370" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>