<?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 Fiona on Medium]]></title>
        <description><![CDATA[Stories by Fiona on Medium]]></description>
        <link>https://medium.com/@fionarasanga?source=rss-aa069817890------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*fesUAi4ikh0OvEKf1KuuAw.jpeg</url>
            <title>Stories by Fiona on Medium</title>
            <link>https://medium.com/@fionarasanga?source=rss-aa069817890------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 10:08:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fionarasanga/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[Who are our customers?]]></title>
            <link>https://medium.com/swlh/who-are-our-customers-43999857a9dd?source=rss-aa069817890------2</link>
            <guid isPermaLink="false">https://medium.com/p/43999857a9dd</guid>
            <dc:creator><![CDATA[Fiona]]></dc:creator>
            <pubDate>Fri, 12 Jun 2020 16:40:07 GMT</pubDate>
            <atom:updated>2020-06-19T12:50:46.470Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*qInWiCGqxhG0JUEC_BgBjg.jpeg" /><figcaption>Customer segmentation is important for targeted marketing activites</figcaption></figure><p>In this project, we analyzed demographics data for customers of a mail-order sales company in Germany and then compared the results of the analysis against demographics information for the general population so as to a get a sense of the characteristics of the mail order company’s customers.</p><p>In the first part of the analysis, we identified parts of the population that describe the core customer base of the company. Thereafter, we used a dataset with demographics information of targets of a marketing campaign for the company to build a predictive model which determines which individuals are most likely to become actual customers for the company.</p><h3>a) Customer Segmentation — Analysis</h3><p>The datasets used for the customer segmentation analysis are the following:</p><ul><li><strong>Udacity_AZDIAS_052018.csv:</strong> Demographics data for the general population of Germany; 891 211 persons (rows) x 366 features (columns).</li><li><strong>Udacity_CUSTOMERS_052018.csv:</strong> Demographics data for customers of a mail-order company; 191 652 persons (rows) x 369 features (columns).</li><li><strong>DIAS Attributes — Values 2017.xlsx:</strong> a data dictionary of the columns including description, possible values, and meanings of those values.</li><li><strong>DIAS Information Levels — Attributes 2017.xlsx:</strong> indicates the information level for each column (Person, Household, Building, etc.)</li></ul><h3>a) Features</h3><p>The demographics dataset has 366 column features while the customers dataset has 369 features. The three additional features in the customers dataset are: customer_group, product_group, online_purchase.</p><p>Since these features are not part of the demographics data, they are dropped from the dataset.</p><p>In addition, there 93 were features that were in both the demographics and customer dataset, but were not described in the data dictionary dataset. These features are dropped from the dataset as there is little information on what they mean.</p><p>Both the customer and demographics dataset have 273 columns after ensuring all the columns are present.</p><h3>b) Missing Values</h3><p>The demographics dataset is analyzed for missing values. For some features, missing values are annotated with values such as 1,0, 9, or X. The first step is to convert these values to NaN’s using the data dictionary dataset so that they can be imputed at later stages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*JNlb_W5Noy6qb9cDepIZLQ.png" /></figure><p>The distribution of missing values shows that a majority of columns have less than 20% missing values. 7 columns have more than 25% missing values and these are dropped from the dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*uoZxPKB7IxNfOavzEgPyHw.png" /></figure><p>Further analysis, into the missing values shows that a number of rows have many missing values across the dataset.</p><p>Based on the analysis, we drop rows that have more than 20 missing values. Missing values are imputed using the mean of the features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*r61xxLKGLyPZHxRF-bN5YA.png" /></figure><h3>c) Principal Component Analysis (PCA)</h3><p>PCA is one of the most common dimensionality reduction methods and its used because the dataset has a lot of features with many of them providing the same information.</p><p>The number of selected principal components is determined by looking at the cumulative variance explained graph and determining at how many principal components is the most variance captured. Selecting the correct number ensures that we do not loose information from unexplained variance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e83gjnoilksubNIldQMtfw.png" /></figure><p>From the graph, it was determined that at 92% the gain in explained variance levels off. This occurs at 150 principal components.</p><h4>PCA Interpretation</h4><p>The first three principal components account for 18% of the variance explained.</p><p>1. <strong>First Principal Component:</strong> This component is an indicator of the relative family sizes and the household wealth.</p><p>The highest weighted features for the include:</p><ul><li><strong>KBA0R_ANTG1 </strong>— number of 1–2 family houses in the cell</li><li><strong>PLZ8_ANTG1 </strong>— number of 1–2 family sizes in PLZ8</li><li><strong>MOBI_REGIO </strong>— moving patterns</li></ul><p>The lowest weighed features include:</p><ul><li><strong>HH_EINKOMMEN_SCORE </strong>— estimated household net income</li><li><strong>PLZ8_ANTG3 </strong>— number of 6–10 family houses in the PLZ8</li><li><strong>PLZ8_ANTG4 </strong>— number of &gt;10 family houses in the PLZ8</li></ul><p>2. <strong>Second Principal Component:</strong> This component is an indicator of car ownership</p><p>The highest weighted features include:</p><ul><li><strong>KBA13_SITZE_5 </strong>— number of cars with 5 seats in the PLZ8</li><li><strong>KBA13_KMH_140_210 </strong>— share of cars with max speed between 140 and 210 km/h within the PLZ8</li><li><strong>KBA13_ALTERHALTER_60 </strong>— share of car owners between 46 and 60 within the PLZ8</li></ul><p>The lowest weighted features include:</p><ul><li><strong>KBA13_SEG_OBEREMITTELKLASSE </strong>— share of upper middle class cars and upper class</li><li><strong>KBA13_HERST_BMW_BENZ </strong>— share of BMW &amp; Mercedes Benz within the PLZ8</li></ul><p>3. <strong>Third Principal Component:</strong> This component is an indicator of transaction activity.</p><p>The highest weighted features include:</p><ul><li><strong>D19_GESAMT_ANZ_24 </strong>— transaction activity TOTAL POOL in the last 12 months</li><li><strong>D19_GESAMT_ANZ_12</strong>– transaction activity TOTAL POOL in the last 24 months</li><li><strong>D19_GESAMT_DATUM </strong>— actuality of the last transaction with the complete file TOTAL</li></ul><p>The lowest weighted features include:</p><ul><li><strong>D19_GESAMT_ONLINE_DATUM </strong>— actuality of the last transaction with the complete file ONLINE</li><li><strong>D19_VERSAND_ONLINE_DATUM </strong>— actuality of the last transaction for the segment mail-order ONLINE</li><li><strong>ONLINE_AFFINITAET </strong>— online affinity</li></ul><p>4. <strong>Fourth Principal Component:</strong> This component is an indicator of transaction activity and customer age. It also indicates a persons religious stance, relationship wiht money and mindset.</p><p>The highest weighted features include:</p><ul><li><strong>D19_GESAMT_ANZ_24 </strong>— transaction activity TOTAL POOL in the last 12 months</li><li><strong>D19_GESAMT_ANZ_12</strong>– transaction activity TOTAL POOL in the last 24 months</li><li><strong>ALTERSKATEGORIE_GROB</strong>— age classification through prename analysis</li></ul><p>The lowest weighted features include:</p><ul><li><strong>SEMIO_REL</strong>— affinity indicating in what way the person is religious</li><li><strong>FINANZ_SPARER</strong>— financial typology: money saver</li><li><strong>SEMIO_PFLICHT</strong>— affinity indicating in what way the person is dutyfull traditional minded</li></ul><h3>d) Clustering</h3><p>K- Means Clustering is used to create different customer segments based on the reduced dataset. Elbow plot is use to determine the optimal number of clusters. The elbow curve plots the Average of sum of squared errors (SSE) within-cluster distances was plotted against number of clusters from 1 to 30.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*JDQrF3ElEs36qjCxjZlpFA.png" /></figure><p>Based on the plot, the score rapidly decreased for the first 10 clusters and then increased for 11 clusters and then continued to decrease for higher number of clusters. Therefore, 10 clusters were selected as optimal number for k-means clustering.</p><p>A pipeline with the all the pre-processing steps including: transformation, pca analysis and clustering is applied to both the demographics dataset and customers dataset.</p><h3>e) Cluster Comparison</h3><p>The results of clustering the demographics dataset and the customers dataset are compared using the proportion of people in each group.</p><p>Clusters with the highest positive difference in proportion between customers and general population is overrepresented in the customers data (Cluster 4) while clusters with the highest negative difference in proportion between customers and the general population are under represented in the customers data (Cluster 3).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*5fKGd8PZJnQJHV1UBWQUog.png" /></figure><h4>Overrepresentation — Cluster 4</h4><p>Values for the 4components earlier analyzed are as follows for cluster 4.</p><p><strong>PC1</strong>: 3.338422, <strong>PC2</strong>:-3.277851, <strong>PC3</strong>: -3.002060 ,<strong>PC4</strong>: 0.797305</p><p>The high value for component indicates that customers are mostly smaller families with high movement pattern meaning that they are possibly not home owners. In addition, the high value for component 4, indicates that customers are older and have high affinity to religion and saving money.The low value for component 3 indicates that customers have low online affinity and have little transaction activity.</p><h4>Underrepresentation — Cluster 3</h4><p>Values for the 3 components earlier analyzed are as follows for cluster 2.</p><p><strong>PC1</strong>: 5.240771, <strong>PC2</strong>: -2.179108, <strong>PC3</strong>: 2.404124,<strong>PC4</strong>:1.023602</p><p>For cluster 3, the most underrepresented cluster in the customer data. Customers in this cluster are unlikely to be customers of the mail order company. The high values relating to components 3 indicate that these individauls are likey to be younger and have low affinity to religion and saving money.</p><h3>2. Supervised Learning</h3><p>In the second part of the project, the focus is on applying a supervised machine learning model to predict whether a person became a customer of the company. We use the following datasets:</p><pre>·        <strong>MAILOUT_TRAIN - </strong>(42962 rows, 367 columns) – Used to train the machine learning model</pre><pre>·        <strong>MAILOUT_TEST -</strong> (42833 rows, 366 columns) – Tests the model built.</pre><p>Predictions for the mailout test dataset are submitted to Kaggle for evaluation.</p><p>Quick investigation of the train dataset <strong>RESPONSE</strong> variable which is the target variable shows that there are only 532 customers (out of 42962) who responded to the marketing campaign indicating that the dataset is highly imbalanced.</p><p>The data is passed through the pre-processing pipeline earlier used for the demographic dataset. Dimensionality reduction is omitted as using it can cause the model to perform poorly.</p><p>Gradient Boosting Classifier is used in to build the model and achieves a score of 76.3% on the training set. On Kaggle, the test dataset achieves a score of 79.7%.</p><h3>3. Conclusion</h3><p>In the first part of this project, we were able to analyze the demographics dataset which contains information about the population of Germany. Through this analysis, we identified the variables that were in the dataset but were missing in the other datasets that were provided. We identified features that had a large proportion of their data missing and removed these features from our analysis. We also identified rows that were sparse and dropped them from the analysis. From this we were able to create a data transformation function that could be used in both the unsupervised learning section and the supervised learning section.</p><p>In the second part of the project, which was the unsupervised learning part, we were able to reduce the dimensionality of the dataset by using 136 principal components from the original dataset that had 273 features. From this, we were also able to come up with 12 clusters that could best describe the dataset. From this analysis we identified the potential target customers for the mail order company.</p><p>In the third and final part of the project which was the supervised learning part, we used Gradient Boosting Classifier to build the supervised model and make predictions on the test dataset. This yielded a score of 79.4%</p><p>The project still has some improvements especially on the unsupervised learning part, we could potentially use different clustering methods to test whether the cluster definitions improve. Improvements can also be done on the pre-processing phase which regards to imputing missing values, additional feature engineering and determining which columns to drop.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43999857a9dd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/who-are-our-customers-43999857a9dd">Who are our customers?</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How is the airbnb landscape in Boston?]]></title>
            <link>https://medium.com/@fionarasanga/how-is-the-airbnb-landscape-in-boston-65b3f08ee304?source=rss-aa069817890------2</link>
            <guid isPermaLink="false">https://medium.com/p/65b3f08ee304</guid>
            <dc:creator><![CDATA[Fiona]]></dc:creator>
            <pubDate>Mon, 17 Feb 2020 18:33:00 GMT</pubDate>
            <atom:updated>2020-02-17T19:29:16.784Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*Gb6xWRBqyg8lSWDyum0j0g.jpeg" /></figure><p>Choosing a place to stay while travelling has never been easier or cheaper thanks to Airbnb. Majority of travellers now prefer airbnbs as opposed to traditional hotels due to its flexibility, variety and price.</p><p>Home owners are also using it as an avenue to make extra cash by leasing out extra rooms in their homes. Some people have even turned this venture into their primary source of income by making available multiple spaces for rent to maximize their income.</p><p>In this exercise we are going to explore airbnb dataset from Boston to answer the following key questions:</p><ol><li>Which hosts are using airbnb as a commercial venture?</li><li>What is the vibe of each Boston Neighbourhood?</li><li>What time of the year is best to optimise for visitors?</li></ol><p>A quick glance at the dataset reveals that as of 2017 Boston had 3585 listings with prices ranging from $10 to $4000.</p><p>We get three main datasets:</p><ol><li>Calendar — This dataset captures the calendar bookings for each listing for a period of 1 year between 2016 September to 2017 September</li><li>Reviews — This dataset captures feedback from the travellers</li><li>Listings — This dataset captures details on the listings in Boston such as the host details, property details and review details</li></ol><p><strong>Question 1: Which hosts are using airbnb as a commercial venture</strong></p><p>With the rise of airbnb, many people saw it as an opportunity to generate more income. Some people took advantage of this opportunity to rent out multiple spaces. To determine the hosts who made the most during the period under review, we use the listings dataset together with the calendar dataset.</p><p>To determine how much each of the hosts earn we first look at the occupations for the period under review. Occupancy is derived from the calendar dataset by using the available feature in the dataset which is marked as true or false. In case a listing’s availability is marked as true, then it means that the listing went unoccupied for the period in question, otherwise it was occupied.</p><p>The host with the highest highest number of listings has 749 listings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/0*UH3rLgo37Nz1e8TS" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/0*I2lSr7SfVErGg_0L" /></figure><p>It seems Kara is heavily invested in the airbnb business. With the highest number of listings, she equally earns the most, making about $6 Million Dollars. In earnings, she is followed by Mike who earns slightly above $5 Million Dollars although he is the fourth in the number of listings.</p><p>Apart from Kara, Mike and Flatbook who feature in both in top listings and top earners, Mike and Stay Alfred are not among the top earners.</p><p>So why do they not make as much money given that they have hundreds of listings?</p><p><strong>2. What is the vibe of the Boston Neighbourhoods with the most listings?</strong></p><p>The dataset provides us important information about the the description of the listing which includes its descriptions surroundings, of the rooms and the services available for that listing which travellers can use to gauge the vibe of the listing.</p><p>We use a word cloud to determine the most used words in the descriptions for each neighbourhood so as to gauge the vibe for that particular neighbourhood. In total, the listing dataset has only 25 listed neighbourhoods. The neighbourhood with the largest number of listings has 343 listings. For this exercise, we pick the top 8 listed neighbourhoods to gauge their vibes.</p><p>For the word cloud, we excluded some words that are not useful in describing the neighbourhood such as mentions of the city (Boston), the neighbourhood, the rooms, the property type etc.</p><p><strong>Jamaica Plain</strong></p><p>With 343 listings, Jamaica Plain is the most populous airbnb location.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/0*zU2Dkyml2w1EPruD" /></figure><p>Listings in this location are near the Orange Line which is one of the subway stations in Boston. The area generally has listings that have a lot of space as described by the words <em>spacious, space </em>and<em> large. </em>In addition, there seems to be a park nearby this neighbourhood with a pond.</p><p><strong>South End</strong></p><p>South End is Boston’s second most airbnb attractive location with 326 listings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/0*fPer9V5uMWemhDdE" /></figure><p>Listings in this location are located near Back Bay. As with Jamaica Plain, the listings in this location also seem to have large space based on words used such as large and space. It also seems that the listings are walking distance from some location.</p><p><strong>Back Bay</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/0*JwQWpdUvztQw42o_" /></figure><p>The Back Bay neighbourhood is located near the South End neighbourhood. It seems that this neighbourhood is located near several landmarks such as Newbury Street, Green Line Train Station, Charles River, Prudential Centre, Copley Square and a public garden. We can conclude that this neighbourhood is located near central Boston</p><p><strong>Fenway</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/0*lwaHXPI73sxG_t7a" /></figure><p>Fenway is located near the Back Bay . This neighbourhood is also located near a medical centre as well as a Park. In addition, there is a fitness centre and its close to the Green line train station.</p><p><strong>Dorchester</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/0*dElHhx9cXnQ8wBhb" /></figure><p>Dorchester seems to be located near the Red Line. The listings in this location seem to be spacious as well. There is a beach nearby the area as well as restaurants.</p><p><strong>Allston</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/0*fwPA9-PCYGMEcvtj" /></figure><p><strong>Beacon Hill</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/0*IoeNTSvfsh3f3TJI" /></figure><p><strong>Brighton</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/0*hYG57B_G_fXdxDVi" /></figure><p>Based on the generated word cloud, we can see that Kara mostly gets positive reviews on her listings. Her listings are described as clean, nice and a great location. It seems like her visitors’ expectations are met based on the word cloud. She definitely deserves all the money.</p><p><strong>Which months are the most popular for visiting Boston and what is the effect on price?</strong></p><p>In this section, I analyse the demand for airbnb rentals for each month of the year and the subsequent effect on price.</p><p>We use the calendar data for both data sets to map when a listing has a booking based on whether the listing is marked as being available for that date or not. In case the listing is marked as available, we use mark its occupancy as 0 for that day, otherwise we mark it as 1. To get the total occupations for that listing we just sum all the dates with 1’s.</p><p>Looking at the data, there is a clear difference in demand for rentals between the two cities. Seattle experiences its high season in January while Boston rentals experience their high season in September. We can also see that Boston overally receives more visitors than Seattle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/0*0-rbpc6KUND1flQ4" /></figure><p>Looking at the effect of the demand on price, we see that in Boston, the increase in demand in September leads to equally higher prices. However, in Seattle, the effect of demand on price is the same for January when the demand is highest. Instead, the price is highest in July which also has high demand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/0*pvNXrDkpWaI3T95i" /></figure><p>In conclusion, Boston seems to have a very vibrant airbnb market. Despite the lower numbers in available listings, they seem to have many visitors. In addition, Airbnb business seems to make a lucrative venture for individuals who have multiple properties with the top most earners getting over $5 million in the course of one year. Visitors also have very high praise for these listings with most common words having positive connotations such as great, nice and clean.</p><p>Anyone who would like to get into the airbnb renting space in Boston has an opportunity to make very good money since the occupancy rate is high throughout the year.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65b3f08ee304" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>