<?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 Samir Madhavan on Medium]]></title>
        <description><![CDATA[Stories by Samir Madhavan on Medium]]></description>
        <link>https://medium.com/@samirmadhavan?source=rss-32927a075381------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*kE5iBwf-rAT9ptSF3uE_rw.jpeg</url>
            <title>Stories by Samir Madhavan on Medium</title>
            <link>https://medium.com/@samirmadhavan?source=rss-32927a075381------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 00:35:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@samirmadhavan/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[Answering Monty Hall puzzle with Monte Carlo]]></title>
            <link>https://medium.com/data-science/answering-monty-hall-problem-with-monte-carlo-6c6069e39bfe?source=rss-32927a075381------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c6069e39bfe</guid>
            <category><![CDATA[simulation]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[probability]]></category>
            <dc:creator><![CDATA[Samir Madhavan]]></dc:creator>
            <pubDate>Wed, 21 Aug 2019 10:49:34 GMT</pubDate>
            <atom:updated>2021-09-07T14:38:03.094Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mQYZDsIGuU7ALGgh" /><figcaption>Photo by <a href="https://unsplash.com/@adamrhodes?utm_source=medium&amp;utm_medium=referral">Adam Rhodes</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a>. <a href="https://adamrhodesphotography.co.uk/">Adams’s Website</a></figcaption></figure><h4>Monte Carlo is a conceptually simple but powerful technique that is widely used. It makes use of randomness to answer questions.</h4><p>In this post, I’ll explain how to solve the <a href="https://en.wikipedia.org/wiki/Monty_Hall_problem">Monty Hall problem</a> using the <a href="https://en.wikipedia.org/wiki/Monte_Carlo_method">Monte Carlo method</a>. The implementation is in python, a programming language whose name is in itself a tribute to the British Comedy Group — <a href="https://en.wikipedia.org/wiki/Monty_Python">Monty Python.</a></p><h3>Monty Hall Problem</h3><p>The first time I was introduced to the Monty Hall problem was in the movie — 21. This clip showcases the problem.</p><p>There are explanations for the same by <a href="https://www.youtube.com/watch?v=TVq2ivVpZgQ">Michael David Stevens of Vsauce</a> and <a href="https://www.youtube.com/watch?v=ggDQXlinbME">Vox</a>.</p><p>Let’s jump into the problem — <em>Imagine, you have three doors in front of you.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*cevAgoOmwS8MQXCNPietUg.jpeg" /></figure><p><em>The game show host asks you to choose one of the doors. If you choose the correct door then you win a car otherwise you get a goat.</em></p><p><em>Let’s say you chose Door №1</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*yOI_wpqRqkX443gZMC2ilA.jpeg" /></figure><p><em>The game show host who knows what is behind each door — opens Door no. 3 and reveals a goat.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*hffOlG1UfQCaemcbgMVXKg.jpeg" /></figure><p><em>The game show host then gives you two options</em></p><ol><li><em>Stick with Door no. 1</em></li><li><em>Switch to Door no. 2</em></li></ol><p><em>Which one would you choose?</em></p><h3>Monte Carlo Experiments</h3><p>The definition of Monte Carlo Experiments according to <a href="https://en.wikipedia.org/wiki/Monte_Carlo_method">wikipWikipedia</a><strong><em>te Carlo methods</em></strong><em>, or </em><strong><em>Monte Carlo experiments</em></strong><em>, are a broad class of </em><a href="https://en.wikipedia.org/wiki/Computation"><em>computational</em></a><em> </em><a href="https://en.wikipedia.org/wiki/Algorithm"><em>algorithms</em></a><em> that rely on repeated </em><a href="https://en.wikipedia.org/wiki/Random_sampling"><em>random sampling</em></a><em> to obtain numerical results. The underlying concept is to use </em><a href="https://en.wikipedia.org/wiki/Randomness"><em>randomness</em></a><em> to solve problems that might be </em><a href="https://en.wikipedia.org/wiki/Deterministic_system"><em>deterministic</em></a><em> in principle.”</em></p><p>It means that you can simulate an experiment, any number of times based on some condition or conditions, and then analyse the results of the simulation to arrive at a solution.</p><p>In the movie Avengers: Infinity War, Doctor Strange performs nearly 14 million simulations of the future to determine how many of the future outcomes, do the avengers win? Essentially, he is applying the principles of Monte Carlo experiments.</p><h3>Simulating Monty Hall with Monte Carlo</h3><p>Imagine the game described previously is stuck in a loop like Bill Murray in the movie — <a href="https://en.wikipedia.org/wiki/Groundhog_Day_(film)">Groundhog Day</a>.</p><p>Each time the game occurs, we record the success and failure on sticking with the first selected door and also switching to the new door.</p><p>Let’s say that the game has been conducted 100 times. We’ll check in how many of those 100 games, the car was won by not switching the door and switching the door.</p><p>By looking at these ratios, we’ll know which option increases the chance of success.</p><h3>Codifying Monty Hall and Monte Carlo</h3><p>Let’s define a function that simulates the Monty Hall Problem</p><pre>def monty_hall():<br>    ...</pre><p>Within the function, create the three doors with the car randomly allocated to one of the doors. The value “1” in the list represents the car</p><pre>doors = [0, 1, 0]<br>shuffle(doors)</pre><p>The player chooses a door to open. The value 0,1 and 2 represent the indexes of the list variable “doors”</p><pre>door_selected = choice([0, 1, 2])</pre><p>The game show host now opens a door that does not have the car behind it</p><pre>non_car_doors = list()<br>for i,d in enumerate(doors):<br> if d == 0 and i != door_selected: non_car_doors.append(i)</pre><pre>door_opened = choice(non_car_doors)</pre><p>Now, evaluate the following two choices</p><ol><li>Wins a car by sticking onto the initial selection</li></ol><pre>non_switch_success =  True if doors[door_selected] == 1 else False</pre><p>2. Wins a car by switching to the remaining door</p><pre>remaining_door = set([0,1,2]).difference([door_selected, door_opened])<br>remaining_door = remaining_door.pop()<br>switch_success =  True if doors[remaining_door] == 1 else False</pre><p>Finally, return the success for each of the choices</p><pre>return non_switch_success, switch_success</pre><p>Define the Monte Carlo function that takes a single argument “n” that represents the number of simulations to run. Run the Monte Hall simulation for the “n” number of times and return the success distribution for each of the choices.</p><pre>def monte_carlo(n):<br>    non_switch_success_count = 0<br>    switch_success_count = 0</pre><pre>for i in range(n):<br>        ns, ss = monty_hall()<br>        non_switch_success_count += ns<br>        switch_success_count += ss</pre><pre>print(f&quot;Number of plays: {n}&quot;)<br>    print(f&quot;Number of success on switch: {switch_success_count}     <br>     {(switch_success_count/n)*100}%&quot;)<br>    print(f&quot;Number of success on non-switch:                       {non_switch_success_count}  <br>     {(non_switch_success_count/n)*100}%&quot;)</pre><p>The full code can be found below and how to run it in the header comments.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/54cb7c7197d2c7f81caebed83aa8a89e/href">https://medium.com/media/54cb7c7197d2c7f81caebed83aa8a89e/href</a></iframe><h3>Running the simulation</h3><p>Let’s simulate 100 games</p><pre>╰─$ ./main.py 100<br>Number of plays: 100<br>Number of success on switch: 71  71.0%<br>Number of success on non-switch: 29  28.999999999999996%</pre><p>We can see that there is a higher success in switching.</p><p>Let’s run it again</p><pre>╰─$ ./main.py 100<br>Number of plays: 100<br>Number of success on switch: 62  62.0%<br>Number of success on non-switch: 38  38.0%</pre><p>We can still see that there is a higher success with switching but the success percentages vary a lot.</p><p>Let’s run the same simulation for 1 million games and let’s do it 3 times to see if the success percentages vary a lot.</p><pre>╰─$ ./main.py 1000000<br>Number of plays: 1000000<br>Number of success on switch: 666566  66.6566%<br>Number of success on non-switch: 333434  33.3434%</pre><pre>╰─$ ./main.py 1000000<br>Number of plays: 1000000<br>Number of success on switch: 666588  66.6588%<br>Number of success on non-switch: 333412  33.3412%</pre><pre>╰─$ ./main.py 1000000<br>Number of plays: 1000000<br>Number of success on switch: 666628  66.6628%<br>Number of success on non-switch: 333372  33.3372%</pre><p>We can see that the success percentages don’t vary much and it tells us that if we make the switch then the chances of winning are 2 out of 3 times.</p><p>Make the switch!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*DlOkvUgEynonk2LTG-x0bA.jpeg" /></figure><h3>Conclusion</h3><p>The motivation of this post was to introduce the Monte Carlo method and applying it to a problem that is easy to understand and interesting for someone new to this. The Monte Carlo method might look simple conceptually but it is a powerful method that is heavily used in the Financial Industry, Reinforcement Learning, Physical Sciences, Computational Biology etc to name a few.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c6069e39bfe" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/answering-monty-hall-problem-with-monte-carlo-6c6069e39bfe">Answering Monty Hall puzzle with Monte Carlo</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Zen of Stochastic Gradient Descent Principle]]></title>
            <link>https://medium.com/@samirmadhavan/zen-of-stochastic-gradient-descent-principle-9b412d4ae962?source=rss-32927a075381------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b412d4ae962</guid>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[zen]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[philosophy]]></category>
            <dc:creator><![CDATA[Samir Madhavan]]></dc:creator>
            <pubDate>Sun, 11 Aug 2019 13:27:07 GMT</pubDate>
            <atom:updated>2019-08-11T13:56:30.741Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p_d5eAdQXmmrsRY38cJ9lg.jpeg" /></figure><h3>A world of Information</h3><p>We are living in an age where almost any information is just a swipe away. There are innumerable blogs, videos, articles, papers and even podcasts on any topic that you want to consume information on. If you are looking at living healthy then</p><ul><li>What is the best diet? — Keto vs Vegan</li><li>Which strength training to opt for? — Cross-fit vs Gym</li><li>Which type of meditation should I do?</li></ul><p>What about Eastern philosophy vs Western philosophy? There are so many school thoughts in each and a lot of information on each in the internet. Living healthy is just an example that I took, the same can be applied to another area, say for instance — Tech</p><ul><li>Django vs Rails</li><li>Github vs Gitlab</li><li>React vs Angular vs Vue</li><li>Postgres vs MySQL vs Mongo</li></ul><p>You are kinda getting the gist of where I am getting at. There is just so much information out there that it causes analysis paralysis and we become just consumers of information with nothing to act on.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3ornkbprB7XGGWAUN2%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3ornkbprB7XGGWAUN2%2Fsource.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F3ornkbprB7XGGWAUN2%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/1919d548a23bd0159afccd1e167fa7ec/href">https://medium.com/media/1919d548a23bd0159afccd1e167fa7ec/href</a></iframe><h3>A brief introduction to SGD</h3><p>The definition of Stochastic Gradient Descent according to <a href="https://en.wikipedia.org/wiki/Stochastic_gradient_descent">wikipedia</a></p><p><strong><em>“Stochastic gradient descent</em></strong><em> (often abbreviated </em><strong><em>SGD</em></strong><em>) is an </em><a href="https://en.wikipedia.org/wiki/Iterative_method"><em>iterative method</em></a><em> for </em><a href="https://en.wikipedia.org/wiki/Mathematical_optimization"><em>optimizing</em></a><em> an </em><a href="https://en.wikipedia.org/wiki/Objective_function"><em>objective function</em></a><em> with suitable smoothness properties (e.g. </em><a href="https://en.wikipedia.org/wiki/Differentiable_function"><em>differentiable</em></a><em> or </em><a href="https://en.wikipedia.org/wiki/Subgradient_method"><em>subdifferentiable</em></a><em>). It is called </em><strong><em>stochastic</em></strong><em> because the method uses randomly selected (or shuffled) samples to evaluate the gradients”</em></p><p>I know that is quite a mouthful if you aren’t from mathematics or machine learning related background which is okay. I’ll try my best to explain the concept at a high level and also add a <a href="https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw/featured">3Blue1Brown</a> video that explains it in detail for the people who want to deep dive into it.</p><p>There is a cost function <strong>C</strong> (also called objective function). The role of gradient descent is to minimise <strong>C</strong> by changing a variable <strong>w </strong>that <strong>C </strong>depends on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*GlkwnXbH3vO3bXczwBGftA.jpeg" /></figure><p>The red ball above is the value of <strong>C</strong> for a particular value of <strong>w</strong>. The Gradient Descent helps us to roll the ball to the bottom by changing the value of <strong>w</strong> which will minimise <strong>C.</strong></p><p>If there are million data points then the gradient descent has to go through million data points to take a single small step towards the lowest point direction. And if there is more than one variable to change then its a “million multiplied by the number of variables” computations to take just a single step. Basically, it will take forever to minimise <strong>C</strong> because of this information overload.</p><p>This is where the Stochastic approach excels, instead of taking all the million data points, you just take a limited number say 30 randomly selected data points in order to the take that step towards the bottom direction. You keep repeating this for every 30 new randomly selected data points till you reach the lowest <strong>C</strong> value. It might not be perfect but it will be close enough.</p><blockquote>“Perfection Is Overrated”</blockquote><p>The basic concept of SGD is that you don’t need to analyse the whole data at once to move forward. You just require a subset of data to move forward and then keep repeating the same process till you reach the intended destination or at least close to it.</p><p>If you want to deep dive on how SGD works in detail then this 3Blue1brown video explains it really well.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FIHZwWFHWa-w%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DIHZwWFHWa-w&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FIHZwWFHWa-w%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0e4504a324ee456a5b967f062f35203a/href">https://medium.com/media/0e4504a324ee456a5b967f062f35203a/href</a></iframe><h3>Zen of SGD Principle</h3><p>To act, limit the information in order to gain enough insight to take the first step.</p><p>Let’s say you want to lose weight. The cost function you would like to minimise is the difference between your actual weight and the expected weight. There might be other hidden variables in your cost function like your emotional level and will power used. You really don’t want your emotion to go haywire and willpower is generally limited until and unless you are someone like <a href="https://en.wikipedia.org/wiki/David_Goggins">David Goggins</a>. As a whole, you need to minimise this cost function.</p><p>Next is to consume enough information in order to take the first step. This could be which diet to start off with. After doing some basic research, let’s say you arrive at X diet then you try it out. After trying it out for a week, you can determine if it’s working based on the cost function that you have defined for yourself. If it’s working then you stick to it otherwise move onto the next diet that makes sense. The next step could be which exercise to start off — running, cycling, strength training etc. Do the basic research, choose one and start. The next step could be to club another form of exercise or to optimise the existing exercise, do the basic research, choose one and start.</p><h3>Conclusion</h3><p>I find this is a good approach to avoid analysis paralysis. You just have to define your cost function -&gt; Analyse -&gt; Choose direction -&gt; Iterate. There is a lot of information available and its easy to get overwhelmed. The key is to do something actionable and it might not be perfect but it will be close enough eventually.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b412d4ae962" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scaling unfollow people on Linkedin]]></title>
            <link>https://medium.com/@samirmadhavan/scaling-unfollow-people-on-linkedin-15fd487b5015?source=rss-32927a075381------2</link>
            <guid isPermaLink="false">https://medium.com/p/15fd487b5015</guid>
            <category><![CDATA[linkedin]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[minimalism]]></category>
            <dc:creator><![CDATA[Samir Madhavan]]></dc:creator>
            <pubDate>Fri, 01 Feb 2019 05:42:11 GMT</pubDate>
            <atom:updated>2019-02-01T05:52:05.906Z</atom:updated>
            <content:encoded><![CDATA[<p>I have been a user of Linkedin for many years now and unlike Facebook, I still find it useful. The only qualm I’ve with Linkedin is the feed where over the years, its increasingly getting filled with inspirational quotes, images, and videos along with other content that contributes to the noise. The likes of every connection also fill the feed, adding to the clutter.</p><p>To manage your feed, you have to either click on each post and click on the appropriate action, or go to the feed setting and click on each person/company/tag to unfollow.</p><p>Here is one approach which scales and executed with one’s own risk of unfollowing people that you want to follow.</p><ol><li>Go to your feed setting page — <a href="https://www.linkedin.com/feed/following/">https://www.linkedin.com/feed/following/</a></li><li>Choose a filter on your following like hashtag/out-of-network/companies/hashtag</li><li>Keep scrolling the page to the bottom till all the following are loaded</li><li>Open the developer tool in Chrome</li><li>Paste the following code in the console</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/03f19fd0e0e7826aca8363857a45fd23/href">https://medium.com/media/03f19fd0e0e7826aca8363857a45fd23/href</a></iframe><p>Once you have unfollowed the category or everyone, you can refollow the key people/organization of your choice.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15fd487b5015" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How an Artificial Intelligence project is helping to make Brazilian politicians more accountable?]]></title>
            <link>https://medium.com/hackernoon/how-an-artificial-intelligence-project-is-helping-to-make-brazilian-politicians-more-accountable-d0178895988c?source=rss-32927a075381------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0178895988c</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[brazil]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[politics]]></category>
            <dc:creator><![CDATA[Samir Madhavan]]></dc:creator>
            <pubDate>Mon, 02 Apr 2018 06:57:56 GMT</pubDate>
            <atom:updated>2019-05-14T06:29:44.337Z</atom:updated>
            <content:encoded><![CDATA[<p>Chamber of Deputies is the lower house of National Congress of <a href="https://hackernoon.com/tagged/brazil">Brazil</a>. It has 513 congress people, 219 of them max out their monthly spending that can be reimbursed. One congressperson gets 30 gas tanks filled every month. Two congress people have claimed 13 meals paid on the same day. These were identified by an Artificial Intelligence project — <strong>Operation Serenata de Amor. </strong>The platform has analysed more than 3 million notes and raised about 8000 cases in irregular public spending.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*QzBProqCWfPY9t6X0n966w.jpeg" /></figure><p>The project was conceived in March 2016 by data scientist <a href="https://twitter.com/irio?lang=en">Irio Musskopf</a>, sociologist <a href="https://twitter.com/cuducos/">Eduardo Cuducos</a> and entrepreneur <a href="https://twitter.com/felipebcabral?lang=en">Felipe Cabral</a>. The project is named after Serenata De Amor which is a Brazilian Toffee, the project name is inspired from <a href="https://en.wikipedia.org/wiki/Mona_Sahlin">“Toblerone Affair”</a> where a Swedish politician used her official credit card to buy groceries and <a href="https://hackernoon.com/tagged/toblerone">Toblerone</a> happened to be one of the items purchased.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*nxVlfDbfnsQO1DBB411_EQ.jpeg" /></figure><p>The initial funding was raised through <a href="https://www.catarse.me/serenata?ref=ctrse_explore_pgsearch&amp;project_id=40271&amp;project_user_id=56666">Catarse</a> which is an open source crowd funding platform and they reached 131% of their goal amount. They have a recurring financing campaign on <a href="https://apoia.se/serenata">Apoia</a> which helps them and their team members to sustain the project.</p><p>The Chamber of Deputies has 4 administrators who take care of reimbursements. They get an average of 1500 reimbursement requests daily and it’s a manual effort to go through them. Rosie was the first module that was created to analyse the spending. Rosie is named after the robot from Jetsons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*3-56_pkLdVdMnuLcDwXHjA.png" /></figure><p>According to the <a href="https://serenata.ai/en/">website</a></p><h3>“Rosie: an artificial intelligence who analyzes Brazilian congresspeople expenses while they are in office. Rosie can find suspicious spendings and engage citizens in the discussion about these findings.”</h3><p>Rosie uses data from CEAP (Quota for Exercise of Parliamentary Activity) along with external data sources to identify reimbursement that seems irregular with reasons as to why so.</p><p>Initially, these irregular spending was reported to the Chamber of Deputies which was then forwarded to the concerned politicians but according to law, the politicians don’t have to respond to such queries thus no one responded. This led to the creation of whistleblower which is a twitter bot that tweets these irregular spending. You can follow it under <a href="https://twitter.com/RosieDaSerenata">@<strong>RosieDaSerenata</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*jVeUD0072eWpxDvh75fgzQ.jpeg" /></figure><p>The bot tweets with “Can you help me?”. This helps in indirectly saying that there can be False Positives and ultimately human judgement is required on it.</p><p>They also created <a href="https://jarbas.serenata.ai/dashboard/chamber_of_deputies/reimbursement/">Jarbas</a> which is described as</p><h3>“To allow people to visualize and make sense of data Rosie generates, we have created <a href="https://jarbas.serenata.ai/">Jarbas</a>. In this website users can browse congresspeople expenses and get details about each one of the suspicions. It is the starting point to validate a suspicion.”</h3><p><strong>Operation</strong> <strong>Serenata de Amor </strong>is constantly evolving and they are working on expanding their analysis to other forms of public spending. They are also evolving their platform so as to present the information in an easier consumable fashion and make it more interactive.</p><p>The complete code is open source and is available on <a href="https://github.com/okfn-brasil/serenata-de-amor">Github</a>. You can contribute or use it as a framework to analyze the open data available in your country. There is also an open <a href="https://telegram.me/joinchat/AKDWc0BDOqriD1n-mntRBg">telegram group</a> where the developers hang out. You can find discussions on twitter under the hashtag <a href="https://twitter.com/hashtag/SerenataDeAmor?src=hash">#SerenateDeAmor</a>. For more information:</p><p><a href="https://serenata.ai/">Website</a></p><p><a href="https://en.wikipedia.org/wiki/Operation_Serenata_de_Amor%20https://changelog.com/podcast/268">Wikipedia</a></p><p><a href="https://changelog.com/podcast/268">Podcast</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fdde502%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fhackernoon%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href">https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0178895988c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/how-an-artificial-intelligence-project-is-helping-to-make-brazilian-politicians-more-accountable-d0178895988c">How an Artificial Intelligence project is helping to make Brazilian politicians more accountable?</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making a product on standup comedy in 3 weeks!]]></title>
            <link>https://medium.com/@samirmadhavan/introduction-e9ebb785dc17?source=rss-32927a075381------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9ebb785dc17</guid>
            <category><![CDATA[makers]]></category>
            <category><![CDATA[stand-up-comedy]]></category>
            <category><![CDATA[product-design]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[bootstrap]]></category>
            <dc:creator><![CDATA[Samir Madhavan]]></dc:creator>
            <pubDate>Mon, 23 Oct 2017 02:17:45 GMT</pubDate>
            <atom:updated>2017-10-23T02:21:59.702Z</atom:updated>
            <content:encoded><![CDATA[<p>Stand-up comedy is a popular comic style, where a comedian entertains a live audience with his jokes, quips, and observations. My interest in stand-up comedy was piqued during my school days — starting with Russel Peters. Today, thanks to YouTube, there are a lot of Indian stand-up comics whose work I like to follow. Most of the content that I watch is discovered through YouTube recommendations or through someone’s post on Facebook.</p><p>When I tried to find new content, I wasn’t able to find a place that curated or recommended similar content. I figured this was a need gap that had the potential for popularity and I wanted to see if I could build a platform around it to validate my hypothesis.</p><p>To build the <a href="http://www.komedy.tv/">Komedy.tv</a>, I gave myself 3 weeks. Keeping a time constraint was strategic, as I wanted to focus on the core features and not create a bloated product without any validation.</p><h3>Design</h3><p>The initial design was conceptualized with a rough wireframe as seen below</p><p><strong>Home Page</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NhIs_y8k65AyFltA.jpg" /></figure><p><strong>Comedians List Page</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*debvRMJ5aGiAKNuF.jpg" /></figure><p>After making the wireframe, I used Sketch to create the mockups and then created HTML mocks of the same.</p><p><strong>Home Page</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*9IQ6buJOc0aFZ_uD.png" /></figure><p><strong>Comedians List Page</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*17hBifMfnhoebsYX.png" /></figure><p><strong>Comedians Profile Page</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QmoYwj7rCw3tzOdI.png" /></figure><p>Some parts of the design changed as the product was getting built. The most noticeable was the background as seen in the final version below.</p><p><strong>Home Page</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-v3_m2jvJ8foThiU.png" /></figure><p><strong>Comedians List Page</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*06oonJ-4MmjD-EBF.png" /></figure><p><strong>Comedians Profile Page</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*G_19x-seOl2XjFTt.png" /></figure><h3>Tech</h3><p>The front end is primarily a combination of HTML, jQuery and Bootstrap. I believe in the use of the least number of components, hence no front-end framework like Angular/ React was used. If there are a lot component that need to be managed then these frameworks are useful.</p><p>The backend uses Django as the web framework and Postgres as the database.</p><p>The code is hosted on a Linode machine and nginx is the web server.</p><h3>What now?</h3><p>I’m in the process of getting feedback about the platform from users as well as the comedians. Also, when I started the project, I didn’t think much about monetization.</p><p>There is an excellent post by <a href="https://www.indiehackers.com/user/Hercule">Jérémy Mouzin</a> in <a href="https://www.indiehackers.com/">Indiehackers</a> about <a href="https://www.indiehackers.com/@Hercule/bootstrapping-in-a-nutshell-ep-0-how-to-select-your-next-business-idea-bd6f7c7a9c">bootstrapping</a>. He describes the list of businesses in <a href="https://www.indiehackers.com/">Indiehackers</a> that interest him and following are the common points among them:</p><p><strong>“It’s a one-man business, it’s highly automated, there is very little customer support to do and it generates a lot of revenue each month”</strong></p><p>This pretty much describes how I would like to evaluate my project as I prefer a business with this model.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9ebb785dc17" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Patterns in the date of birth of movie personalities]]></title>
            <link>https://medium.com/@samirmadhavan/patterns-in-the-date-of-birth-of-movie-personalities-7a0c55c49fb6?source=rss-32927a075381------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a0c55c49fb6</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[insights]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[movies]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Samir Madhavan]]></dc:creator>
            <pubDate>Fri, 09 Jun 2017 10:29:52 GMT</pubDate>
            <atom:updated>2017-06-09T10:29:52.800Z</atom:updated>
            <content:encoded><![CDATA[<p>During a random talk with a friend of mine, I was told an observation that most of the well-known Hollywood personalities are born between the month of April and July. This made me curious and did a random search for few actors, and it seemed like most of them were born between those months but couldn’t say it for sure so went ahead and wrote a script to fetch the date of birth data for the top 5,000 ranked male and female movie personalities in IMDB which is a total of 10,000 movie personalities.</p><p>There are few things to note about this data</p><ol><li>It includes directors and writers apart from actors</li><li>Few movie personalities are no longer alive</li><li>Ranks do vary over time specifically more for the higher ranked actors</li></ol><p>After getting the data, plotted a simple bar plot to see how many of them are born in each month.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*E2Dr_JbxPuosZY_7.png" /></figure><p>Okay, so the observation doesn’t hold good as it is pretty much evenly distributed.</p><p>Let’s see the same for Top 500 ranked actors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mYx2BPltA6wBz_RY.png" /></figure><p>The month of April has more highly ranked actors than other months. This distribution here is a Poisson distribution so we can check what is the probability that a month has the number of movie personalities 120 or higher.</p><p>The mean here is 79.58 and the confidence interval of the mean is between 74.54 and 84.58. Let’s assume that the mean would be at 85 then what would be the probability of having 120 or higher.</p><p>The probability turns out to be 0.000199 which is very low. This means that the month of April does stand out compared to other months.</p><p>Let’s see how the age of these top 500 ranked actors is distributed. We’ll plot a histogram of the age distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KIlmUrDoBLQvPS6Q.png" /></figure><p>There is nothing that stands out in this graph.</p><p>Moving on, Let’s see if there are any patterns on the date that a person is born on. For this, the year of birth for all movie personalities is set to a particular year. The day of the person born on 21st May 1974 would be different from the day of the person born on 21st May 1975 which means ignore the days in the graph below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iziNKlV0FPL2giMR.png" /></figure><p>In the graph, the intensity of the color red represents the number of people born on that date. Looking at the graph, there are 7 dates that stand out compared to other dates: 29th April to 5th May. These 7 days lie around Labour day which is May 1st and it is May 1st that has the maximum number of births.</p><p>It would be interesting to deep-dive further into these patterns and understand what is causing it. This would require other data which I’ll be scouting for.</p><p><a href="http://www.samirmadhavan.com/">Samir Madhavan - Beyond Data</a></p><p>Before ending this post, here are some interesting information about the actors.</p><p>Who are the highest ranked actors between the age 60 and 70?</p><p>Michael Rooker</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/0*PSOkanONQjX9m9PO.jpg" /></figure><p>Kurt Russell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/214/0*W3QFVTcP41BwHfMh.jpg" /></figure><p>Ian McShane</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*YbmarjvmK0nNUwP7.jpg" /></figure><p>Goldie Hawn</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*YsfdGhq8C5phV1UB.jpg" /></figure><p>Tom Hanks</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/214/0*GqxZec_L4jUtQdH0.jpg" /></figure><p>Do note that the order of ranking of the actors depends on the recency of their movies/series that have released</p><p>Who are the highest ranked actors older than 80?</p><p>Clint Eastwood</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/214/0*bilPsD3x3CzTXaQk.jpg" /></figure><p>Morgan Freeman</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/214/0*RwfVZzcbgVGDlJ0L.jpg" /></figure><p>Jack Nicholson</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/253/0*X1NPDun1fYxHpbyj.jpg" /></figure><p>Sean Connery</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/0*-5y0wwjOBk0I-3YZ.jpg" /></figure><p>Cloris Leachman</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/214/1*r155CfmfGUOPp_6_i8JpGA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a0c55c49fb6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>