<?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 Felix Waweru on Medium]]></title>
        <description><![CDATA[Stories by Felix Waweru on Medium]]></description>
        <link>https://medium.com/@whyweru?source=rss-3d569b6b9865------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4KGncSUWEwXWs_xI4t2Lug.png</url>
            <title>Stories by Felix Waweru on Medium</title>
            <link>https://medium.com/@whyweru?source=rss-3d569b6b9865------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 20:27:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@whyweru/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[Growth Of AI]]></title>
            <link>https://whyweru.medium.com/growth-of-ai-d92476f708b8?source=rss-3d569b6b9865------2</link>
            <guid isPermaLink="false">https://medium.com/p/d92476f708b8</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[developer-tools]]></category>
            <dc:creator><![CDATA[Felix Waweru]]></dc:creator>
            <pubDate>Mon, 11 Dec 2023 16:07:41 GMT</pubDate>
            <atom:updated>2023-12-11T16:07:41.000Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Growth of AI.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x585A9DStbDBLImvSnCjHQ.jpeg" /></figure><p>Something very exciting has been happening on Earth this past year. If you’ve been on the grapevine, there’s no doubt that you have heard the word Artificial Intelligence pop up somewhere. From news stations and boardrooms, to memes and conversations, AI has been a hot topic lately after the emergence of ChatGPT and its meteoric rise to become the fastest growing app of all time.</p><p>This has all been due to the recent breakthroughs in Machine Learning and Generative AI, however, if we want to fully understand this shift, we need to go back a few decades to see how we got to where we are today.</p><blockquote>“I believe that at the end of the century the use of words and general educated opinion will have altered so much that one will be able to speak of machines thinking without expecting to be contradicted.”</blockquote><blockquote>– Alan Turing</blockquote><h3>The Evolution</h3><p>The journey of AI began with humble roots, as most great things do, when researchers decided to explore the concept of machines simulating human intelligence. Early AI systems were very limited in functionality, but as computing power increased and algorithms became more sophisticated, the field experienced a gradual shift. Similar to Moore’s law, the growth started out slow but eventually, the curve of development began to take an exponential path.</p><p>Breakthroughs in machine learning, a subset of AI, enabled systems to learn from data and improve their performance over time, marking a significant milestone in the evolution of AI. This was the rise of deep learning, with its multi-layered neural networks which helped propel AI to new heights, enabling it to excel in tasks such as image recognition and natural language processing.</p><p>Eventually, AI even began to excel in playing complex games like chess and I have admittedly lost a couple of games to an AI before. To be fair though, so has Kasparov.</p><h3>AI in Everyday Life</h3><p>Over the years, AI has integrated into our daily lives, and what was once a novelty is now a daily requirement. Virtual assistants like Siri and Alexa use natural language processing to understand and respond to our commands.</p><p>Recommendation algorithms on social media sites, streaming platforms and e-commerce websites now leverage AI to suggest content and products tailored to the preferences of millions of unique users simultaneously.</p><p>The business landscape has also been significantly influenced by AI, with organizations using it to boost efficiency and decision-making to levels that were impossible just a few years ago. AI-driven automation in sectors like Software Development has helped streamline processes and reduced costs significantly for businesses.</p><h3>Challenges and Ethical Considerations</h3><p>While the growth of AI presents numerous opportunities, we also have to stay vigilant of the challenges and ethical considerations that come with this technology. Concerns about job losses, biased algorithms and the potential misuse of AI have sparked important conversations about responsible AI development and deployment. This is a huge undertaking and it is up to us collectively as a species to ensure that this technology is built responsibly with the benefit of humanity as a priority.</p><h3>Looking Ahead</h3><p>Right now as we embrace the growth of AI, we stand at the cusp of a new era; a moment that is experienced once every few generations. Continued advancements in AI research, coupled with increasing collaboration between interested parties and policymakers will help shape the future of AI.</p><p>The growth of artificial intelligence has been a remarkable journey, transforming the way we live and work. As we navigate the future, it is important to approach AI development responsibly, addressing every challenge and ethical concern so that we can harness its full potential for the betterment of humanity.</p><p>This is only the beginning and the next chapter in the AI story promises to be even more exciting as we charter new frontiers and unlock technologies that were science fiction not even a century ago.</p><ul><li><a href="https://www.codefundi.app/">Code Fundi: An AI assistant that helps you write better code faster</a></li><li><a href="https://blog.samaltman.com/dall-star-e-2">DALL*E 2</a></li><li><a href="https://www.linkedin.com/pulse/founders-take-growth-ai-code-fundi-awdyf">FOUNDER&#39;S TAKE ON THE GROWTH OF AI</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d92476f708b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Celebrating Black History Month With a Swahili Programming Language]]></title>
            <link>https://whyweru.medium.com/celebrating-black-history-month-with-a-swahili-programming-language-6e30d9fbebda?source=rss-3d569b6b9865------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e30d9fbebda</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[black-history-month]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[swahili]]></category>
            <dc:creator><![CDATA[Felix Waweru]]></dc:creator>
            <pubDate>Thu, 11 Feb 2021 13:32:18 GMT</pubDate>
            <atom:updated>2021-02-11T13:32:18.087Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hOde6ANUKs3_oLGp2p9K3g.jpeg" /></figure><h3>The Origin</h3><p>Have you ever wanted to become a software developer but were limited by your fluency in English? Well, if you’re a native Swahili speaker I have some good news for you and it is called <a href="https://www.npmjs.com/package/swahili-lang"><strong>Swahili-lang</strong></a>.</p><p>However, before we delve deeper into that, let us talk a bit more about the <strong>Swahili </strong>language; also known as <strong>Kiswahili</strong>.</p><p>Swahili is a Bantu language spoken by over 50 million people primarily in Kenya, Uganda and Tanzania (East Africa). Similar to many other languages, it has multiple sayings and proverbs that act as a form of oral history about the culture and its people, otherwise known as <strong>“Methali”</strong>.</p><p>Thanks to multiple films such as the 1994 smash hit film, The Lion King, Swahili has become an internationally recognized language. Among many other Swahili words, the phrase <strong>“Hakuna Matata”</strong> is a catch phrase that is still used to this day by friendly tourists and local vendors hoping to attract friendly tourists.</p><p>Swahili-lang is a programming language created by a small team of Kenyan developers. Built on Node JS, Swahili-lang makes use of the Swahili language within a JavaScript syntax and it offers a platform that allows native speakers of the language to easily read and write code. One example of this is the renaming of the <strong>if, else </strong>function<strong> </strong>as <strong>kama, au; </strong>a literal translation of the if, else statements.</p><p>In celebration of this year’s Black History Month, I wanted to undertake a project that would allow me to share part of my African culture with more people online. Black History Month being an annual celebration remembering African-American history and the African diaspora, I decided to create a Twitter bot that shares Swahili proverbs and their translations<strong> </strong>as tweets.</p><p>In the spirit of staying authentic to my roots, I chose to create the bot using Swahili-lang<strong> </strong>and a little bit of JavaScript to help with the tweet posting.</p><h3>Getting The Data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*NOnEp4pIulSpQmsESsG3lQ.png" /></figure><p>In order for our bot to be able to consistently tweet sayings, we would need a source to borrow from. For this project, I sourced most of the sayings from <a href="http://kiswahiliswahili.blogspot.com/2011/08/methali-za-kiswahili.html">a Swahili blog</a><strong> </strong>that had a large collection of sayings and their translations.</p><p>I supplemented the sayings that we already had by borrowing more from the book “<strong>More Swahili Proverbs from East Africa</strong>” by Leonidas Kalugila. It contained multiple Swahili sayings and included their English translations as well; perfect for our needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*6GrgOhKizx7VFRTdGzDFyg.png" /><figcaption>The sayings as seen in the book.</figcaption></figure><p>After digitizing the book’s contents and cleaning up the collected data, I had to reformat the information into an easily readable list for my code. For the purposes of this project, I decided to structure the sayings into a list. Each list element would contain the saying in Swahili, and the English translation of the saying.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/67bb73b63be3f355b2f7c29d6b9c6d3d/href">https://medium.com/media/67bb73b63be3f355b2f7c29d6b9c6d3d/href</a></iframe><h3>Developing The Bot</h3><p>This project makes use of two npm packages. <a href="https://www.npmjs.com/package/swahili-lang"><strong>S<em>wahili-lang</em></strong></a> will be used to write a swahili script that will be used to generate the sayings and <a href="https://www.npmjs.com/package/twitter"><strong>T<em>witter</em></strong></a> will be used to communicate with the Twitter API and will allow for our sayings to be posted as tweets.</p><p>To install the Swahili-lang package in Node, you can use the command:</p><blockquote>npm install swahili-lang</blockquote><p>As for the Twitter package, you can use the command:</p><blockquote>npm install twitter</blockquote><h4>The Swahili-lang Saying Generator</h4><p>The first file is the <strong><em>mhenga.swh</em></strong> file that will be used to return a randomized Swahili saying along with its English translation. In Swahili, Mhenga means ‘an elder who is trusted to give sound advice’ and thus, it makes the perfect name for our saying generator.</p><p>The Swahili-lang file consists of two main functions. The <strong>PataMethali</strong> function and the <strong>NambariYoyote</strong> function.</p><p><strong>PataMethali</strong>; the function below, gets a saying from the list of sayings we have stored within the <strong>mamethali</strong> list and formats it into the tweet that will be posted. The <strong>NambariYoyote</strong> function is a random number generator that is assigned to the variable <strong>nambari.</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4021adc890395fc6a9cda00b41d57f60/href">https://medium.com/media/4021adc890395fc6a9cda00b41d57f60/href</a></iframe><p><strong>NambariYoyote, </strong>as shown below is the second function in the <em>mhenga.swh</em> file. Since Swahili-lang does not have a random number generator yet, I first had to come up with a way of generating random numbers that would be fed into the <strong>PataMethali</strong> function.</p><p>For this project, I chose to implement the <a href="https://en.wikipedia.org/wiki/Linear_congruential_generator">Linear Congruential Generator</a> as our random number generator. It is a simple implementation that takes in a seed value and passes it through the formula <strong><em>(a*seed+c)%m</em></strong>. This then returns a pseudo-randomized number that we can use in this project.</p><p>The values of <strong>a</strong>, <strong>c</strong> and <strong>m</strong> can be any number but I decided to go with the <a href="https://en.wikipedia.org/wiki/Numerical_Recipes"><em>Numerical Recipes</em></a><em> </em>recommended values of which I sourced from the Wikipedia page. In order to create a seed value, I implemented the system time in a simple formula that will give us a semi-randomly generated seed value.</p><p>Finally, to further randomize the number generation, I passed the formula above through a loop that iteratively updates the seed value in the formula as shown below. Once the value is converted from a decimal into a whole number, it is passed to the <strong>PataMethali </strong>function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/aceb2182b27ac73f33d7fcc27ef72e78/href">https://medium.com/media/aceb2182b27ac73f33d7fcc27ef72e78/href</a></iframe><h4>The Node JS Tweet Poster</h4><p>The second file in this project is the <strong><em>app.js</em></strong> file that will take the Swahili sayings from the <em>mhenga.swh</em> file and post it on Twitter using a Node <a href="https://www.npmjs.com/package/twitter">Twitter</a> package. First we import the Twitter package and the file containing my Twitter API keys.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/15b6e4c95dfaa819cafc903909b743da/href">https://medium.com/media/15b6e4c95dfaa819cafc903909b743da/href</a></iframe><p>The <em>app.js</em> file consists of two main functions. The <strong>tweeter </strong>function and the <strong>Mhenga</strong> function.</p><p>The <strong>Mhenga</strong> function is used to run the <em>mhenga.swh</em> file and then saves the returned saying as a variable that is then passed to <strong>tweeter</strong>. Once the<strong> tweeter </strong>function gets the saying from the <strong>Mhenga </strong>function,<strong> </strong>it posts it as a tweet.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/06b879410da61575607a9541c0277e93/href">https://medium.com/media/06b879410da61575607a9541c0277e93/href</a></iframe><p>At the end of the script we have a try catch function that we use to run the functions above and to resolve any errors that might arise as the app runs. Once all the code is in place our app is ready to go.</p><h3>The Result</h3><p>With this code you should be able to create a Twitter app of your own using Swahili-lang<strong> </strong>and a little bit of JavaScript. After running <strong>app.js </strong>in Node, the app will randomly select a saying and post it on Twitter along with its English translation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*VDuA2TdMyROW8sUEIzySZA.png" /><figcaption>The tweets as seen on my Twitter page.</figcaption></figure><p>If you’re interested in polishing up your Swahili or if you would want to learn some new Swahili words, I will be running the app on my Twitter page <a href="https://twitter.com/whyweru"><strong>@whyweru</strong></a><strong> </strong>continuously posted for the entire month of February in celebration of Black History Month. So feel free to drop a like if you’re interested in this project or if you happen to come across a saying that speaks to your soul.</p><p>In conclusion, despite being relatively new and simple, Swahili-lang is a highly capable programming language that showcases the African continent’s potential and the contributions that are still being made towards Black history. Hopefully this project is the seed that inspires a new generation of African developers to learn and create without the boundaries of language.</p><ul><li><a href="https://github.com/malcolmkiano/swahili">malcolmkiano/swahili</a></li><li><a href="https://github.com/FelixWaweru/MHENGA">FelixWaweru/MHENGA</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e30d9fbebda" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automating dating with Artificial Intelligence.]]></title>
            <link>https://medium.datadriveninvestor.com/automating-dating-with-artificial-intelligence-989402bb5f63?source=rss-3d569b6b9865------2</link>
            <guid isPermaLink="false">https://medium.com/p/989402bb5f63</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[online-dating]]></category>
            <category><![CDATA[tinder]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Felix Waweru]]></dc:creator>
            <pubDate>Mon, 24 Feb 2020 08:54:55 GMT</pubDate>
            <atom:updated>2020-02-24T16:29:00.015Z</atom:updated>
            <content:encoded><![CDATA[<h3>Automating online dating with Artificial Intelligence.</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl0ExvuzJGJNZJZ47S%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl0ExvuzJGJNZJZ47S%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Fl0ExvuzJGJNZJZ47S%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="271" frameborder="0" scrolling="no"><a href="https://medium.com/media/2571fcda1f37103683bee96ebd90d96e/href">https://medium.com/media/2571fcda1f37103683bee96ebd90d96e/href</a></iframe><h3><strong>The Origin</strong></h3><p>My first encounter with online dating came across during my end of semester break in the middle of my fourth year in university.</p><p>I had been single for about two years (insert long story) when I decided to install Tinder, an online dating application, out of boredom and maybe a little curiosity about what lay in wait for me within the world of online dating.</p><p>What followed was a two year cycle of swiping, matching, chatting and loss of interest in online dating after getting preoccupied with other things in my life.</p><blockquote>“This would be so much easier if I had an AI wing man getting dates on my behalf.”</blockquote><p>That was my catchphrase every time I started the cycle again but little did I know that soon, to Elon Musk’s disapproval, my dreams of having an Artificial Intelligence controlling my love life would come true. Sort of.</p><p>Earlier last year, I started an online course on Udemy centered around <a href="https://www.udemy.com/share/101WmQBEATc1hQTXQ=/">Artificial Neural Networks</a> and as soon as I had completed the first chapter on creating Artificial Neural Networks(ANNs), I took everything I had learnt so far and decided to apply it to Tinder. The main aim was to make online dating as easy as possible for myself and also to identify any hidden patterns that lay within my online dating data. As the wise ancestors of computing used to say, you truly aren’t a programmer until you’ve tried automating every aspect of your life.</p><p>The first step of the project entailed collecting all of my Tinder data by downloading it directly from the source. I navigated to<a href="https://account.gotinder.com/data"> https://account.gotinder.com/data</a> and once I logged into my account I received all my data via email within a day or so.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*IU28Tm1BbLGUBxbAeKib4g.png" /></figure><p>Now for the juicy bits.</p><h3><strong>Getting the data</strong></h3><p>The data came in a zip folder containing a JSON and a html file that allowed me to view my data in a nicely categorized view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bbvnB0fuTtECs4YAhJv4Dw.png" /></figure><p>It contained my swiping history, user profile information, messaging history and even information regarding linked Spotify and Instagram profiles. Unfortunately, the data did not contain any information regarding the profiles I had interacted with.</p><p>This was a problem.</p><p>In order to properly train my ANN model I would require the profile information of the people I had interacted with and this meant I had to roll up my sleeves and look for a way to get it myself. I decided to do so by accessing Tinder, collecting the data of the user profiles I interacted with and saving it in an Excel spreadsheet that I would later use to train my model.</p><p>Tinder doesn’t have an open source API and thus I had to collect the data I would need by interacting with Tinder’s endpoints. An endpoint is basically a designated URL that is used by web applications such as Tinder to send and receive data using requests.</p><p>Lucky for me, the rest of the internet had already taken notice of this API vacuum and with some quick Google searches, I was able to find a list of several endpoints that would allow me to get the information of users near me and even like or dislike their profiles.</p><p>First things first, I needed to get access to my Tinder account. More specifically, I needed to get a unique authorization token that would identify my requests as coming from Felix’s profile and allow me send and receive those requests. Think of it as Tinder being a wedding and the authorization token as being my invite. As long as I had the invite I could freely go in and out of the wedding reception for some cake.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0zdYkMHkyz15kWXwhpl-zg.jpeg" /></figure><p>I was able to quickly find it in the Networks tab of my Google Chrome Page Inspector, within the header of a HTTP request sent by the browser. After importing the authorization token into my Python file, I created four primary functions that I would use to get my data and interact with other profiles.</p><p>The first function, ‘<em>get_info</em>’ is used to get a person’s details from their Tinder profile and sets them as plain text or boolean (True or False) values.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f807d67e316b42ccb0b0610bf743f01e/href">https://medium.com/media/f807d67e316b42ccb0b0610bf743f01e/href</a></iframe><p>The second function is the ‘<em>like</em>’ function that is used to swipe right on the user profile i.e like the user and the third function is the ‘<em>dislike</em>’ function that is used to swipe left on the user profile i.e dislike the user.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/703368ff10fe87a372a44484d65d2df5/href">https://medium.com/media/703368ff10fe87a372a44484d65d2df5/href</a></iframe><p>Last is the ‘startSwiping’ function that would allow me to interact with the user profiles. The <a href="https://pillow.readthedocs.io/en/stable/">Pillow</a> library allowed me see their profile pictures in a popup window and I was able to view their names, ages, bios and other details within the terminal. The function also received keyboard inputs in the terminal giving me the ability to ‘swipe left’ and ‘swipe right’ i.e like and dislike a user.</p><p>I assigned the keyboard character “E” to activate the ‘swipe right’ or ‘like’ function and “Q” to activate the ‘swipe left’ or ‘dislike’ function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c0fc27be56b2cf40c70a06936545cdb/href">https://medium.com/media/3c0fc27be56b2cf40c70a06936545cdb/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6usteMOBHPcdjoRhg0ddCA.png" /><figcaption>The popup window that allowed me to see a user’s profile pictures.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*PY0ehrHfM701KWFgjnHLlg.png" /><figcaption>The terminal through which I can see the user’s information and interact with the code.</figcaption></figure><h3>Making the Artificial Neural Network</h3><p>After hours of “swiping”, I was finally able to collect a sizable dataset with roughly 200 rows of which would be sufficient enough to train my model. For this section of the project, I would be making use of the <a href="https://numpy.org/">Numpy</a>, <a href="https://pandas.pydata.org/">Pandas</a> and <a href="https://scikit-learn.org/">Sklearn</a> libraries so as to create and train my data models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*3-YcET9sBMVmYan1RnT52Q.png" /><figcaption>The format of the data I had collected.</figcaption></figure><p>From my data, I would only use the age, number of photos, bio length, distance, job and school information to train my model since those are the data values most likely to affect the swipe value.</p><p>The idea was to create an Artificial Neural Network that would predict how likely I am to like or dislike a user once presented with that user’s profile data. It would then like or dislike their profile on my behalf.</p><p>After importing the Excel spreadsheet with our data into the Python file, we needed to replace every unique text value in our model with numbers by using a label encoder. Changing these text values into numbers allows for the Artificial Intelligence to process them faster and more easily. In our case, only the school, job and swipe columns contained text values and so we encoded them using Sklearn.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b901640f0f0121f09849b8731dfe5050/href">https://medium.com/media/b901640f0f0121f09849b8731dfe5050/href</a></iframe><p>Next, we split the dataset into two sections; a test set and a training set. The training set is used to create the model that will be used by our AI and the test set is used to check how accurate the predictions made by the models are. For this project, we split the dataset into a standard 20% test data and 80% training data.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7df1c0ab62a6801516c84dce9d4a4b13/href">https://medium.com/media/7df1c0ab62a6801516c84dce9d4a4b13/href</a></iframe><p>At this point, our model was ready to be created. Our Artificial Neural Network would have two hidden layers. These hidden layers take in the raw data in our dataset, pass it through an activator function and then returns an output. For the first hidden layer, we would use a Rectifier function since it is the most commonly used and returns the most accurate data for this kind of model. We would then pass the output from the first hidden layer through another hidden layer that would use a Sigmoid function. The Sigmoid function returns an output that reflects a probability since the output ranges between 0 and 1.</p><p>After passing our dataset through these layers, we can now compile the results, compare our Artificial Neural Network’s predictions to the results in the test set and then see how accurately it predicts whether I would have liked or disliked a profile. We’ll run through 1000 epochs because our dataset isn’t very big and this also allows the model become as accurate as possible.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f237f28af272548cf9ed36ea4f48614e/href">https://medium.com/media/f237f28af272548cf9ed36ea4f48614e/href</a></iframe><p>Finally, function that would be imported into the ‘<em>data_getter’ P</em>ython file was created. It would primarily receive data related to a user and then would return a swipe value i.e like or dislike. This would be the function that would reference the model we trained and decided to either like or dislike a user.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6e549e2179ed5ae62ac7f32417e43e09/href">https://medium.com/media/6e549e2179ed5ae62ac7f32417e43e09/href</a></iframe><p>Within the ‘<em>data_getter’ P</em>ython file, a new function that would pass data values into the ‘<em>TinderAI</em>’ function was created. Based on the swipe value it received from the Artificial Neural Network, it would send a response back to Tinder.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c264bb608b281581fcaf11d36fd84496/href">https://medium.com/media/c264bb608b281581fcaf11d36fd84496/href</a></iframe><p>Now it was time to let the AI have full reign over my Tinder account. Feeling like a father teaching their child how to drive in the family’s only car, I anxiously ran the code and sat back in the passenger seat watching. I had set a delay of two seconds per swipe so as to prevent the code from sending too many requests to Tinder and thus causing the connection to get terminated.</p><p>Every minute, the AI received data and liked or disliked thirty profiles. Thirty potential wives or life long partners in the hands of the model I had trained and it was honestly an exhilarating experience. As I sat there, I wondered if Charles Babbage, the father of computing, would have ever imagined that his invention would one day lead to a 24 year old guy in Kenya creating an Artificial Intelligence for his online dating profile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*KxIjIm2TK_yJH8Rx9Wu7Xg.gif" /><figcaption>The Artificial Neural Network in action.</figcaption></figure><h3>Conclusion</h3><p>I let the Artificial Neural Network run for a while so as to collect a sizable dataset. I then used this data to compare how my ANN performed in relation to me by graphing the data points and seeing how they differed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*N9gUlq47jZA3-y7ONTUSRQ.png" /><figcaption>A plot showing my swipe activity in relation to user age.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*eK3YfnvBkAkZY0ZoSgq4mg.png" /><figcaption>The same plot showing how the Artificial Neural Network swiped.</figcaption></figure><p>In the end, I was able to collect very interesting data in relation to how I swipe and the interactions I generate with users on online dating applications. I guess it takes an algorithm centered around your personal data to truly know yourself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*_B8SoAT_RJtbz_qFw2mhUQ.png" /><figcaption>The dataset generated by the AI. Kind of picky isn’t it?</figcaption></figure><p>Right now, we are a few years or decades away from creating Artificial Intelligence with the capacity to understand and help decide upon complex human matters such as love and dating. However, as long as a young student of science like myself is able to learn and implement the fundamentals of AI by themselves, we will surely meet that goal soon enough.</p><h4>Links</h4><ul><li><a href="https://felixwaweru.github.io/who-am-i/">Felix Waweru</a></li><li><a href="https://github.com/FelixWaweru/TinderAI">FelixWaweru/TinderAI</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=989402bb5f63" width="1" height="1" alt=""><hr><p><a href="https://medium.datadriveninvestor.com/automating-dating-with-artificial-intelligence-989402bb5f63">Automating dating with Artificial Intelligence.</a> was originally published in <a href="https://medium.datadriveninvestor.com/">DataDrivenInvestor</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>