<?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 Ayowole-Obi Ayodotun on Medium]]></title>
        <description><![CDATA[Stories by Ayowole-Obi Ayodotun on Medium]]></description>
        <link>https://medium.com/@ayowole93?source=rss-76df224c5e34------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Ayowole-Obi Ayodotun on Medium</title>
            <link>https://medium.com/@ayowole93?source=rss-76df224c5e34------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 15:55:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ayowole93/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[Well, let’s see if I still got in me]]></title>
            <link>https://medium.com/@ayowole93/well-lets-see-if-i-still-got-in-me-568704bc2fe5?source=rss-76df224c5e34------2</link>
            <guid isPermaLink="false">https://medium.com/p/568704bc2fe5</guid>
            <dc:creator><![CDATA[Ayowole-Obi Ayodotun]]></dc:creator>
            <pubDate>Sun, 02 Nov 2025 12:38:57 GMT</pubDate>
            <atom:updated>2025-11-02T12:38:57.393Z</atom:updated>
            <content:encoded><![CDATA[<p>The past 24 hours has my social media feeds (WhatsApp &amp; X fka Twitter) filled with several takes and opinions on the designation of +234 as a CPC by the Trump-led US Government. Accompanied with this designation is a statement by the POTUS himself shared on Truth Social; <em>‘…[USA] may very well go into that now disgraced country, “guns-a-blazing” to completely wipe out the Islamic Terrorists who are committing these horrible atrocities’.</em> That statement signifies a plan to <strong>“invade”</strong> +234 in a bid to stop the <em>Islamic terrorists</em> (officially known as bandits, Fulani herders, insurgents, etc) under the pretext of stopping the genocidal deaths of the Nigerian Christians in the North.</p><p>Let’s lay it bare, Nigeria is an ethno-religious country where every actions and inactions have either religion and/or ethnicity undertones to them. It is not surprising to see people arguing for or against the actions and words of the POTUS. Some believe it is high time an external force came in to solve the insecurity challenges that has plagued +234 for over a decade now, some believe it infringes upon the sovereignty of the country to be invaded by another country as a show of force/might. Well, there are no rights or wrongs; just perspectives that differ on a shared problem we need to solve in time before it consumes us all.</p><p>Here’s my own perspective (plus observations):</p><p>One of the primary duty of the government to the citizens is <strong><em>“protection of human lives and property”. </em></strong>Are our lives being protected by our government? A clue to the answer lies below</p><ul><li>Mar 1–3, 2025; Benue (at least 38 killed, more displaced)</li><li>Mar 26, 2025, Borno (4 soldiers killed in attack on millitray base)</li><li>Jun 13–14, 2025; Yelawata village (est. 100–200 deaths, ~3000 displaced)</li></ul><p>Common factors of these attacks are they are perpetrated by groups flying the flag of Islam, and the government refused to give the events the needed attention it needed. Yet, in the past 24 hours, I have seen official statement from the State House, and posts from appointed government officials on the words of the POTUS. <em>“Where were you all when your people were being killed?”</em></p><p>As often said on the streets of Twitter, two truths can co-exist without one demeaning the other.</p><ul><li>Are there insecurity challenges in Nigeria? <strong>YES</strong></li><li>Are Christians targeted/victims than the Muslims faithful? <strong>YES</strong></li><li>Do they represent Islam and the teachings of the religion? Na una go answer that one ooo, lol 😂</li><li>Do we need to solve this problem right now, before it consumes us further? <strong>YES</strong></li><li>Do we need to ask for external help to solve this? <strong>YES</strong></li><li>Do we need to be invaded/threatened to be invaded before we realize we are in a burning house? <strong>NO</strong></li><li>Does the statement of the POTUS infer a threat to our sovereignty and may be an attempt of occupation just as the US has done to several countries in the past? <strong>YES</strong></li></ul><p>I believe this is enough for us all to come together as one and ensurethat +234 is a safe place where every human live is protected.</p><p>Yours,</p><p>OG_Waheedi.</p><p>P.S: Just me being in my thoughts, don’t take my words for it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=568704bc2fe5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analyzing Customer’s Preferences & Prediciting Ratings]]></title>
            <link>https://medium.com/@ayowole93/analyzing-customers-preferences-prediciting-ratings-e01e785c04f4?source=rss-76df224c5e34------2</link>
            <guid isPermaLink="false">https://medium.com/p/e01e785c04f4</guid>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-modelling]]></category>
            <category><![CDATA[regression]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Ayowole-Obi Ayodotun]]></dc:creator>
            <pubDate>Sun, 30 Mar 2025 02:18:10 GMT</pubDate>
            <atom:updated>2025-03-30T02:18:10.470Z</atom:updated>
            <content:encoded><![CDATA[<p>As an avid internet user that rely on ratings as an indicator of performance myself, I know how ratings affect the perception that customers &amp; prospective customers have towards a restaurant.</p><p>This project is focused on studying data collected from several restaurants across the world including information such as the name &amp; locations of the restaurants, the type of cuisines they serve, the pricing options for the restaurants, the service-offering options (online delivery, table bookings/reservations), aggregate ratings they got from their customers, the number of votes they got and many other. At the end of the study, the following are the expected deliverables: <em>1. Exploring &amp; analyzing the data (EDA). 2. Visualizing the data to serve as a means of comparison. 3. Analyze the customer preferences via highest rated cuisines, comparing the ratings across several price points and several other options that informs the customers’ choices. 4. Build a predictive model that is able to estimate (to an extent, accurately) aggregate ratings for these restaurants based on several features fed to the model.</em></p><p><strong>Libraries Used</strong></p><pre>import pandas as pd<br>import numpy as np<br>import seaborn as sns<br>import matplotlib.pyplot as plt<br>import folium<br>from folium.plugins import MarkerCluster<br>from sklearn.compose import ColumnTransformer<br>from sklearn.pipeline import Pipeline<br>from sklearn.preprocessing import OneHotEncoder, StandardScaler<br>from sklearn.model_selection import train_test_split<br>from sklearn.linear_model import LinearRegression<br>from sklearn.ensemble import RandomForestRegressor<br>from sklearn.metrics import mean_squared_error, mean_absolute_error, r2_score, root_mean_squared_error<br>from imblearn.pipeline import Pipeline as ImbPipeline</pre><h4><strong>Objective 1: Exploratory Data Analysis (EDA)</strong></h4><p>The data is gotten from a GitHub <a href="https://raw.githubusercontent.com/Oyeniran20/axia_class_cohort_7/refs/heads/main/Dataset%20.csv">link</a> — see attached link. The data dimension is 9551 by 21 (i.e. 9,551 rows and 21 columns). The headers in the data are shown in Image2 below. The data was checked for missing values, this check came up with 9 rows of missing values under the Column <em>“Cuisines”, </em>the data types are valid (there was no need for conversion from one data type to the other e.g. <em>float </em>to <em>object</em>, and vice-versa).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*-YrbCqZpgJ8giGvutqfepw.png" /><figcaption><strong><em>Image 1: Data Dimension</em></strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*f6PeQ_rz-pXsxLV7tgk6RA.png" /><figcaption><strong>Image 2: Data Headers</strong></figcaption></figure><p>Analyzing the data further shows that the Column <strong><em>“Aggregate ratings”</em></strong><em> </em>has a <strong>bimodal distribution</strong> and it also has outlier values (<em>“0”</em>) in it. Ratings are always offered on a scale of <em>“1 to 5”</em> where 1 is poor, and 5 is excellent. To address this, the data under this column was transformed by logarithmic and square-root transformations. Only the logarithmic transformation had effect on the distribution of the data (see images 3,4,5 below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*Jv3Fe-iWxIg02taiGkqD4Q.png" /><figcaption><strong>Image 3: Distribution of Aggregate ratings (raw)</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*VqpEiofjNUY4tCo5ubkUUA.png" /><figcaption><strong>Image 4: Distribution of Aggregate ratings (square root transformation)</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*xxQknH1DTq03sN1rwtsn-A.png" /><figcaption><strong>Image 5: Distribution of Aggregate ratings (logarithmic transformation)</strong></figcaption></figure><p>Moving further, descriptive analysis was done via statistics for numerical columns, and exploring the categorical columns (numerical — numbers, categorical — texts). The statistics for the numerical columns are shown in image 6 below. Exploring the categorical columns reveals: Using the frequency; the top 10 restuarants (Image 7), the top 5 cuisines (Image 8), the top 5 cities (Image 9).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*eHM6_CvHl_YCaKXyAEYCLQ.png" /><figcaption><strong>Image 7: Top 10 restaurants</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*R9RutcccYaPf4wXcYOl2dg.png" /><figcaption><strong>Image 8: Top 5 Cuisines</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*C4I0GVZbznPNkW2cwEOzZw.png" /><figcaption>Image 9: Top 5 Cities</figcaption></figure><p>The above images (7,8,9) shows that the bulk of the data came from India (particularly, New Delhi). Also <em>“Fast Food”</em> is well represented as a <em>“top 10 cuisine by frequency”</em> considering that several restaurants in the <em>“top 10 restaurants by frequency”</em> are notable fast food establishments.</p><h4><strong>Objective 2: Data Visualization</strong></h4><p>The data was visualized by using bar plot to compare average ratings for cities and cuisines. The bar plots for the average ratings by cities and the average ratings for cuisines are shown in images 10 and 11 respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kOH-pcopmLfeMapMu2upkA.png" /><figcaption><strong>Image 10: Average rating for Cities</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KR_4A8e6f_L279zBBlnAKA.png" /><figcaption><strong>Image 11: Average ratings for Cuisines</strong></figcaption></figure><p>The location data was utilized to plot a geographical map of the locations of the restaurants; this aids in visualizing the locations. Below is a cut-out of the map focusing on India.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vw59egFhwNdzznlyo3k29g.png" /><figcaption><strong>Image 12: Cut-Out of the geographical map showing the locations of the restaurants</strong></figcaption></figure><p>Furthermore, the relationship between the votes received and the ratings given was visualized using a scatter plot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*JJHcJEy0N67v6mT3Lg5VuA.png" /><figcaption><strong>Image 13: Scatter plot of Votes vs Aggregate ratings</strong></figcaption></figure><p>The data was also screened for more outliers (remember the 0 ratings from earlier? That’s an example of the outliers in this data). The other outliers observed are values of <em>“0”</em> for <em>“average cost for two”</em> which is realistically impossible (Image 14). The row(s) where the value for <em>“average cost for two”</em> = <em>“0”</em> is dropped. This is done to ensure that the data is cleaner than it is currently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*TYA4BqgTTDzd4RkEZwDv7A.png" /><figcaption><strong>Image 14: The values for the average cost for two people</strong></figcaption></figure><h4><strong>Objective 3: Customer Preferences</strong></h4><p>In identifying the customers’ preferences; some service-offering options need to be looked at (e.g. pricing, cuisines, table-booking availability, online-delivery).</p><p>These preferences were looked at and compared using several bar plots (Images 17 to 21).</p><p><strong>Cuisines: </strong>The top rated cuisines are : <em>Sunda, Scottish, Cajun, Taiwanese, Filipino, Ramen, Persian, Argentine, and World Cuisine</em> (with each of these cuisines having a rating of ≥ 4.5.). The cuisines that received a vote of ≥ 5,000 are termed as <em>“popular cuisines”</em> and are shown in Image 16 below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*fyLhm9lZB7gYzlJErF_j4Q.png" /><figcaption><strong>Image 15: A list of the top rated cuisines and the aggregate rating values</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aM_Yk0aHuNwphCpD9D9pUQ.png" /><figcaption><strong>Image 16: Popular cuisines with votes ≥ 5,000 votes</strong></figcaption></figure><p><strong>Pricing: </strong>There are different pricing options — 1 to 4 (where <em>1 = “Low Cost”,</em> and <em>4 = “Luxury”</em>). The higher pricing options receive higher ratings, possibly due to the quality of service that is expected to come with such price.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*PPLghle2n6TCezU4KHe5Ww.png" /><figcaption><strong>Image 17: A bar plot of the average ratings across the different price points</strong></figcaption></figure><p><strong>Table Booking : </strong>The customers rate restaurants with table bookings higher than the ones that don’t have the option. This is likely due to the convenience that comes with having a table booked ahead of dining time. Table booking is also at a pricing range of 3 and above (for pricing range values of 1 to 4; where <em>1 = “Low Cost”,</em> and <em>4 = “Luxury”</em>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*Q8Wo82vJrYMJLoECiXEf6Q.png" /><figcaption><strong>Image 18: A bar plot of the Average Pricing of Table Booking Options</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*dE9sOZ2izYIZA1H3JgE_mQ.png" /><figcaption><strong>Image 19: A bar plot of the Average Rating of Table Booking Options</strong></figcaption></figure><p><strong>Online Delivery:</strong> In reality, online delivery is a lifesaver as it affords several opportunities to the consumer (time for other tasks, convenience, less distance covered) albeit at a relatively higher cost / same cost if the consumer has to go do a physical pickup. The same applies here as the customers give a higher rating for restaurants that offer online delivery options. The data reveals that a tiny percentage of the restaurants that are prices “4” i.e. Luxury offers the online delivery option (9%).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*P27LlRI53ade4-5vPjfcvA.png" /><figcaption><strong>Image 20: A bar plot of the Percentage of Restaurant offering Online Delivery versus the Price Range</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*bcNiBTs27GIPsq7XVlVd6A.png" /><figcaption><strong>Image 21: A bar plot of the Average Ratings of Restaurants offering Online Delivery</strong></figcaption></figure><p><strong>City: </strong>The data was further explored to reveal the top 10 rated cities and bottom 10 rated cities. The top 10 rated cities are: <em>Inner City, Quezon City, Makati City, Pasig City, Mandaluyong City, Beechworth, London, Taguig City , Secunderabad, and Lincoln. </em>The bottom 10 rated cities are: <em>Faridabad, Noida, Mc Millan, Montville, New Delhi, Paynesville, Gurgaon, Ghaziabad, Mayfield, Consort.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*2JmwnqT_E2RqPPB6FiXGtg.png" /><figcaption><strong>Image 22: A list of the top 10 rated cities</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*wp4LVjx_5AwvXEpe1MF9kg.png" /><figcaption><strong>Image 23: A list of the bottom 10 rated cities</strong></figcaption></figure><h4><strong>Objective 4: Data Modelling</strong></h4><p>Data modelling uses features of the data to build a model that can predict to an accurate extent more data when these same features are fed into the model, this happens by using a part of the data (usually 80%) to train the model and using the rest to test the model. New features can be created from the existing ones in the data and existing ones can also be deleted.</p><p>A new feature was created for this data namely <em>“Pricing” </em>which has values of <em>“Low Cost”, “Medium”, “High Cost”, “Luxury”</em> since this was not in the original data. Also some features were dropped off from the data since they have little to no influence on the model; these features are <em>“Restaurant ID”, “Longitude”, “Latitude”, “Address”, “Locality”, “Locality Verbose”, “Currency”, “Switch to order menu”, “Rating color”. </em>To visualize the correlation of the features, a correlation matrix is created (this works only on numerical features).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*yuZHSEY7QNp7W5Hx_cOCLQ.png" /><figcaption><strong>Image 24: Correlation Matrix of the Numerical Features</strong></figcaption></figure><p>The data is split into <em>“X”</em> and <em>“Y”</em> where <em>“X”</em> represents all the features that the model uses to predict the target variable <em>“Y”. </em>The data under “X” and “Y” are further split into test and train sets that the model uses to train and test its accuracy.</p><pre>x = df.drop(&#39;Aggregate rating&#39;, axis=1)<br>y = df[&#39;Aggregate rating&#39;]<br><br>x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2, random_state=42)</pre><p>A pipeline was used to preprocess the data. The numerical data was scaled (to ensure that each numerical feature has equal contribution to the model training) while the categorical columns are encoded such that it can be represented numerically. A Column Transformer was used to combine the numerical columns and the categorical columns together.</p><pre>num_transformer = Pipeline(steps=[<br>    (&#39;scaler&#39;, StandardScaler())<br>])<br><br>cat_transformer = Pipeline(steps=[<br>    (&#39;onehot&#39;, OneHotEncoder(drop=&#39;first&#39;, sparse_output=False, handle_unknown=&#39;ignore&#39;))<br>])<br><br>num_cols = x_train.select_dtypes(include=np.number).columns<br>cat_cols = x_train.select_dtypes(exclude=np.number).columns<br><br>preprocessor = ColumnTransformer(transformers=[<br>    (&#39;num&#39;, num_transformer, num_cols),<br>    (&#39;cat&#39;, cat_transformer, cat_cols)<br>])<br></pre><p>Two models were selected to train and test the data — <strong>Linear Regressor</strong> and <strong>Random Forest Regressor. </strong>This is to ensure that the best possible model is selected.</p><p>Model Metrics: There are several metrics to measure the accuracy of a data model such as <em>root mean squared error (rmse), mean absolute error (mae), r-squared score (r2), mean squared error (mse), e.t.c. </em>For this project; rmse, mae and r2 scores are used to evaluate the models.</p><p>Linear Regressor Model: rmse = 0.9747314998691269, mae = 0.20102972509842235, r2 = 0.7047229926848637</p><pre>model = LinearRegression()<br>pipeline = ImbPipeline(steps=[(&#39;preprocessor&#39;, preprocessor), (&#39;classifier&#39;, model)])<br>pipeline.fit(x_train, y_train)<br>y_pred = pipeline.predict(x_test)<br>rmse_lr = root_mean_squared_error(y_pred, y_test,)<br>mae_lr = mean_absolute_error(y_pred, y_test,)<br>r2_lr = r2_score(y_pred, y_test,)</pre><p>Random Forest Regressor Model: rmse = 0.17892049669739993, mae = 0.11433447148089992, r2 = 0.9857864122273579.</p><pre>models = RandomForestRegressor()<br>pipeline = ImbPipeline(steps=[(&#39;preprocessor&#39;, preprocessor), (&#39;classifier&#39;, models)])<br>pipeline.fit(x_train, y_train)<br>y_preds = pipeline.predict(x_test)<br>rmse_rfr = root_mean_squared_error(y_preds, y_test,)<br>mae_rfr = mean_absolute_error(y_preds, y_test,)<br>r2_rfr= r2_score(y_preds, y_test,)</pre><p>The <em>rmse </em>values being higher than the <em>mae</em> values for both models suggests the presence of outliers in the data. The r2 score (typically ranges from 0 — poor coefficient of determination to 1 — perfect coefficient of determination) of the Random Forest Regressor is higher; hence the Random Forest Regressor model is the better fit for predicting the aggregate ratings of the restaurants.</p><h4><strong>Conclusion</strong></h4><p>As seen from the data, several factors determine the ratings that restaurants receive. These factors include <em>the type of cuisines served, the number of votes they receive, pricing, table booking,</em> and <em>availability of online delivery. </em>This data serves as a point of insight that striking a balance between tasty meals, pricing, and convenience of customers is necessary for restaurants that are looking to optimize their ratings.</p><p>The data model can be improved upon by utilizing a recent and cleaner data with little to zero outlier values; hence helping restaurant owners in their decision making process.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e01e785c04f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>