<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Mirantha Jayathilaka]]></title><description><![CDATA[My Personal Substack]]></description><link>https://www.mirantha.com</link><image><url>https://substackcdn.com/image/fetch/$s_!x2Xo!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa740bf18-ca2f-480f-a730-d1b6025df07a_500x500.png</url><title>Mirantha Jayathilaka</title><link>https://www.mirantha.com</link></image><generator>Substack</generator><lastBuildDate>Tue, 19 May 2026 04:50:43 GMT</lastBuildDate><atom:link href="https://www.mirantha.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Mirantha]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[mirantha@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[mirantha@substack.com]]></itunes:email><itunes:name><![CDATA[Mirantha Jayathilaka, PhD]]></itunes:name></itunes:owner><itunes:author><![CDATA[Mirantha Jayathilaka, PhD]]></itunes:author><googleplay:owner><![CDATA[mirantha@substack.com]]></googleplay:owner><googleplay:email><![CDATA[mirantha@substack.com]]></googleplay:email><googleplay:author><![CDATA[Mirantha Jayathilaka, PhD]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Grandparents die in your 30's]]></title><description><![CDATA[My last living grandparent (my mother&#8217;s mother) was 98 years old when we once visited her in Negombo.]]></description><link>https://www.mirantha.com/p/grandparents-die-in-your-30s</link><guid isPermaLink="false">https://www.mirantha.com/p/grandparents-die-in-your-30s</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Tue, 31 Dec 2024 13:40:28 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Cvgx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F650a9051-99e6-4915-83d7-ec95711fe218_1024x608.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Cvgx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F650a9051-99e6-4915-83d7-ec95711fe218_1024x608.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Cvgx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F650a9051-99e6-4915-83d7-ec95711fe218_1024x608.png 424w, https://substackcdn.com/image/fetch/$s_!Cvgx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F650a9051-99e6-4915-83d7-ec95711fe218_1024x608.png 848w, https://substackcdn.com/image/fetch/$s_!Cvgx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F650a9051-99e6-4915-83d7-ec95711fe218_1024x608.png 1272w, https://substackcdn.com/image/fetch/$s_!Cvgx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F650a9051-99e6-4915-83d7-ec95711fe218_1024x608.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Cvgx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F650a9051-99e6-4915-83d7-ec95711fe218_1024x608.png" width="1024" height="608" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/650a9051-99e6-4915-83d7-ec95711fe218_1024x608.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:608,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Cvgx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F650a9051-99e6-4915-83d7-ec95711fe218_1024x608.png 424w, https://substackcdn.com/image/fetch/$s_!Cvgx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F650a9051-99e6-4915-83d7-ec95711fe218_1024x608.png 848w, https://substackcdn.com/image/fetch/$s_!Cvgx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F650a9051-99e6-4915-83d7-ec95711fe218_1024x608.png 1272w, https://substackcdn.com/image/fetch/$s_!Cvgx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F650a9051-99e6-4915-83d7-ec95711fe218_1024x608.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">AI-generated with the prompt - &#8220;Pearly Gates&#8221;</figcaption></figure></div><p></p><p>My last living grandparent (my mother&#8217;s mother) was 98 years old when we once visited her in Negombo. We exchanged cheerful chats over tea, walked, and talked about the kids. For my sons, she was their great-grandmother! </p><p>After merely 3 months, we saw her again. But this time, she was stuck to a bed, visibly just the bones and skin remaining in her body, barely being able to move a hand.  </p><p></p><p>For the majority of us (based on un-statistical evidence backed by non-scientific observations), we will see our grandparents die in our 30&#8217;s. </p><p>We will see their last days, the struggle at the mouth of death, knowing that there&#8217;s not much time left in this world.</p><p>We will see the way they fall to disease and the way they yearn to unite their families. To see their kids and grandkids one more time. </p><p>The helpless days, the final days. </p><p></p><p>I witnessed both my grandmothers (mother&#8217;s mother and father&#8217;s mother) passing away around the time Sahaswara (my second son) was born. And I remember noticing the resemblance between a newborn baby and a grandmother in her late nineties fighting death. </p><p>Seeing that really puts the Shakespearian writing on the &#8216;second childhood&#8217; into perspective (from The Seven Ages of Man). </p><p>The helplessness in the eyes, fully dependent on the ones that surround you. Trusting they would look after you and keep you safe and fed.</p><p>I would sometimes just close my eyes and imagine myself in that state, it&#8217;s good to be familiar with it, I thought. </p><p>Life (survival) is a miracle&#8230;</p><p></p><p>The thing you also realize is - the stories you had heard as a child and thought &#8216;that could never happen..&#8217;, start happening mostly in your 30&#8217;s.</p><p>These are stories of despair, from death to divorce and losing health or wealth. </p><p>But these could be the same stories that motivate you and remind you to fill your life with un-regrettable experiences now that you are still in your 30&#8217;s. </p><p>The reminder that you shouldn't or (actually) cannot wait around..</p><p>As another famous saying goes - &#8220;Every day I look in the mirror and ask, 'If today were the last day of my life, would I want to do what I am about to do today? ' And whenever the answer has been 'No' for too many days in a row, I know I need to change something.&#8221;</p><p>I&#8217;ll leave you with that thought&#8230;</p><p></p>]]></content:encoded></item><item><title><![CDATA[Oh shit, Wow!]]></title><description><![CDATA[Business is unlocked in "oh shit, wow" - moments.]]></description><link>https://www.mirantha.com/p/oh-shit-wow</link><guid isPermaLink="false">https://www.mirantha.com/p/oh-shit-wow</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Tue, 31 Dec 2024 13:31:30 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!EixN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a7dd7be-d1fd-4c30-8531-ad57404f2e49_1172x362.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EixN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a7dd7be-d1fd-4c30-8531-ad57404f2e49_1172x362.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EixN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a7dd7be-d1fd-4c30-8531-ad57404f2e49_1172x362.png 424w, https://substackcdn.com/image/fetch/$s_!EixN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a7dd7be-d1fd-4c30-8531-ad57404f2e49_1172x362.png 848w, https://substackcdn.com/image/fetch/$s_!EixN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a7dd7be-d1fd-4c30-8531-ad57404f2e49_1172x362.png 1272w, https://substackcdn.com/image/fetch/$s_!EixN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a7dd7be-d1fd-4c30-8531-ad57404f2e49_1172x362.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EixN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a7dd7be-d1fd-4c30-8531-ad57404f2e49_1172x362.png" width="611" height="188.72184300341297" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0a7dd7be-d1fd-4c30-8531-ad57404f2e49_1172x362.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:362,&quot;width&quot;:1172,&quot;resizeWidth&quot;:611,&quot;bytes&quot;:101902,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!EixN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a7dd7be-d1fd-4c30-8531-ad57404f2e49_1172x362.png 424w, https://substackcdn.com/image/fetch/$s_!EixN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a7dd7be-d1fd-4c30-8531-ad57404f2e49_1172x362.png 848w, https://substackcdn.com/image/fetch/$s_!EixN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a7dd7be-d1fd-4c30-8531-ad57404f2e49_1172x362.png 1272w, https://substackcdn.com/image/fetch/$s_!EixN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a7dd7be-d1fd-4c30-8531-ad57404f2e49_1172x362.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Comment from <a href="https://karpathy.ai/">Andrej Karpathy</a> on X</figcaption></figure></div><p>I am noting this down in October 2024 just after checking out the new AI podcast generation feature of Google&#8217;s revamped NotebookLM product.</p><p>And I just had an &#8220;Oh Shit, Wow!&#8221; - moment.</p><p>A quick rush of endorphins or whatever that makes you smile unnoticeably and think, I should share this everywhere, write a LinkedIn post about it, post a tweet, share a clip of me using it on Instagram stories!, because this is just brilliant!</p><p>A follow-up thought rushes in&#8202;&#8212;&#8202;&#8220;I want others to know that I have unraveled this new magical experience and I discovered it before them (in a way). Maybe it&#8217;ll elevate my persona as a well-informed person, up-to-date in cool tech!&#8221; haha.</p><p>In the world of software and AI that I am in, if you want a killer business, this is the emotion you are looking to erupt in users. Well, it is safe to say that this might be common to many other forms of business as well.</p><p>Remember ChatGPT? How we found out about it instantly wanted to show off that we are using it to the rest of the world? Ah yes, showing off.. Great products or experiences make you wanna show them off to others.</p><p></p><p>Anyway, I can further argue that this phenomenon contributes to social content going viral as well. Whenever you are sharing a reel or a tiktok with someone else, the indirect thought can be - &#8220;Hey look&#8202;&#8212;&#8202;I found this very funny thing&#8230; yes, I am cool like that.&#8221; Just notice, we are sort of trying to project ourselves through that content as well.</p><p>What about music? Us sharing songs we like, making covers of them? We sort of do the same thing, while relating those to ourselves in a way that says - &#8220;hey look, I listened to cool songs like this because I&#8217;m cool.&#8221; </p><p>But is this a framework? something we could reverse engineer from when coming up with a product idea? I&#8217;ll leave that for further thought&#8230;</p><div><hr></div><p>[Present day]</p><p>It&#8217;s been a few months, and I just came back to this post in my drafts..</p><p>Honestly, I didn&#8217;t post this because it sort of felt like a stupid point of view after writing it on a whim. But hey, thought of just letting it go. </p><p></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[The Birth of my Son]]></title><description><![CDATA[[This post was originally published on Jun 12, 2022]]]></description><link>https://www.mirantha.com/p/the-birth-of-my-son</link><guid isPermaLink="false">https://www.mirantha.com/p/the-birth-of-my-son</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Sat, 28 Dec 2024 17:52:36 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Tq-K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c4dbf32-01b5-4532-a3f6-49f029d21c5b_1394x1045.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Tq-K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c4dbf32-01b5-4532-a3f6-49f029d21c5b_1394x1045.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Tq-K!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c4dbf32-01b5-4532-a3f6-49f029d21c5b_1394x1045.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Tq-K!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c4dbf32-01b5-4532-a3f6-49f029d21c5b_1394x1045.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Tq-K!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c4dbf32-01b5-4532-a3f6-49f029d21c5b_1394x1045.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Tq-K!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c4dbf32-01b5-4532-a3f6-49f029d21c5b_1394x1045.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Tq-K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c4dbf32-01b5-4532-a3f6-49f029d21c5b_1394x1045.jpeg" width="1394" height="1045" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5c4dbf32-01b5-4532-a3f6-49f029d21c5b_1394x1045.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1045,&quot;width&quot;:1394,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Tq-K!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c4dbf32-01b5-4532-a3f6-49f029d21c5b_1394x1045.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Tq-K!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c4dbf32-01b5-4532-a3f6-49f029d21c5b_1394x1045.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Tq-K!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c4dbf32-01b5-4532-a3f6-49f029d21c5b_1394x1045.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Tq-K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c4dbf32-01b5-4532-a3f6-49f029d21c5b_1394x1045.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>&#8220;Let&#8217;s take him out this Saturday.&#8221; The doctor&#8217;s words came out suddenly looking at the oral glucose tolerance test results. Although we were expecting the arrival in a couple of weeks, this unanticipated reduction of two weeks from the plan came out with a shock. I believe that in life there are two kinds of shocks according to the very next emotion that follows them, the extremely happy ones or otherwise. This time it was somewhat in the middle, hence I found it hard to explain. One thought said that I&#8217;m going to see my son in a few days&#8217; time. The next thought quickly followed reminding me of the change. A life-long change.</p><p>We got in the car to go back home. I could see the same expression of excitement mixed with a hint of fear in Tharani&#8217;s eyes. But she chose to talk about the plans rather than the emotions. She wished for a normal delivery until the last moment. Although a procedure of induction could grant her that wish even now, we decided that the cesarean surgery was the safer and the less worrying option. This was our first child. The decision had given us just two days until the trip to the hospital. The following day we decided to spend shopping for more things that we thought we should have at the baby&#8217;s arrival. As with all significant events in life, we made sure that we spent more money than what&#8217;s needed for this one. But for a change, this time I didn&#8217;t complain.</p><p>Appropriately, along with the macintosh sheets, swaddling blankets and feeding pillows, the shopping list also contained a Christmas tree. This was the epilogue of November 2021, hence Tharani insisted that we should have all the Christmas decorations done when he arrives home. So we spent that evening setting up a Christmas tree while the cot was still in a box. The next morning we woke up for a call from Tharani&#8217;s father who reminded us that we were late for the <em>daane </em>(offerings) they had organised for the nearby temple. It was a monthly practice for them, but this time they were dedicating it to the birth of their first grandchild. That felt special.</p><p>The temple rush followed by some more last-minute shopping led us to the realisation of the uniqueness of that evening.</p><p>The other day my academic supervisor, Uli, was telling me about a casual tradition that Germans tend to follow, where the night before a child&#8217;s planned birth, the mother and the father to be would go to an Italian restaurant for dinner which incorporates a glass of red wine. Although we had no wine, we decided to make some Italian at home that evening.</p><p>A baked pasta carbonara with bacon wrapped in every cheese that the local Cargills food city offered, cheddar, mozzarella and parmesan. A fresh salad chaser incorporating cucumber, lettuce and red apples. Tharani made this Italian recipe-with-a-twist more often than one would guess. I loved it. Also on the side, I grilled some chicken breasts seasoned with almost every spice on our rack, just to make sure we have more food than we could finish that night.</p><p>We forgot the candles because we were too hungry by the time we finished serving all the food. So we sat down, ate and reflected on life. These nights would never be the same again. And we were looking forward to the change. The IG story said &#8220;homemade dinner just for two today&#8221;.</p><p>The anticipated day arrived. The usual morning coffee tasted the same. The utterance of good morning sounded the same. But I guess there was a slight hush of nervousness in my breath. After all, it was going to be a major surgery.</p><p>But Tharani didn&#8217;t show any nerves at all, although she is usually the one with most of the complaints. She told me that all she was worried about was the spinal anaesthesia injection before the procedure.</p><p>She had assisted many cesarean surgeries before and remembered how painful it was usually for the patient. Being a medic herself, she knew every detail about what they were going to do on her that day. In situations like these, knowledge can sometimes be the bearer of fear.</p><p>But she looked calmly at her tummy sitting down on the sofa and told that she might miss the baby bump after today.</p><p>The rest of the day went pretty fast, at least for me, with everything from loading the suitcase into the car and unpacking it in the hospital room. Nurses in and out of the room until one came in suddenly and asked Tharani to get into the surgery gown. It was around 7 o&#8217;clock in the evening. The events that soon followed would be, by far, the most emotionally striking in my entire life. And I didn&#8217;t have a single idea about them while accompanying the rolling bed carrying Tharani into the lift, down to the second floor and through a two-part door that was named &#8220;operation theatre&#8221;. &#8220;Please wait here.&#8221; The person taking Tharani through the doors told me. &#8220;We&#8217;ll call you in.&#8221; I stopped and turned to see some others standing outside that door as well. Anxious. Pacing.</p><p>The area right outside the theatre door didn&#8217;t have any sitting arrangements. It&#8217;s as if they knew that none of the people waiting there would be sitting down. Nevertheless, I joined with the others, waiting.</p><p>I wanted to be with Tharani when they were giving that spinal anaesthesia injection. This was the thought that revolved in my head at that time. But it seemed like I would miss it. I realised. In a few minutes, a person rushed out of the door and uttered &#8220;Mirantha&#8221;. As I went in he showed me a changing room with piles of theatre scrubs and face shields. I changed quickly to go out and notice several other guys waiting in the same attire. Sitting. Anxious. With just phones in their hands ready to capture the first moments of their babies coming out to this world. And there I was, also fitting in.</p><p>It was surreal to think how everyone sitting there next to me was going through one of the most special moments in each of their individual lives. The many theatre rooms behind us delivering those emotions in bulk, in a queue.</p><p>The breathing under the face mask had formed a slight mist on the face shield making my view a bit blurry. I noticed that the guy seated next to me was also trying to wipe his shield. So similar I thought, yet two entirely different stories.</p><p>A few moments later, time started to move a bit faster, I felt. A person came and escorted me along a corridor to a room on the right. As I reached the door, I saw Tharani lying on the theatre bed under waves of green colour sheets. A tidal wave of blue colour cloths was flowing above her. I figured that was the gynaecologists, anesthesiologists and nurses wearing blue theatre scrubs. They were already on it. I had missed the spinal injection.</p><p>I was directed up to the top of the bed where a chair was placed to sit down. &#8220;Hey..&#8221; I said. Tharani took a second to recognise that it was me near her. It was all happening so quickly. Her hands were tied to either side of the bed, on one, a big cannula had been pierced in. I held her other hand and leaned in behind the screen that a green colour cloth had formed in front of us.</p><p>While I stayed looking at her face, she told me that the anesthesiologist was a lecturer she knew from her medical school and that the spinal injection didn&#8217;t hurt as much as she thought it would. The excitement in her voice overshadowed the fear in her eyes. It did that for me too. Soon after, she told me that she had some difficulty in breathing. I quickly called a person in blue nearby who removed her face mask and administered some nasal drops. &#8220;It&#8217;s just the coldness in the room.&#8221; The person smiled and uttered.</p><p>Honestly, writing this I figured that I cannot exactly recall what Tharani and I mumbled in the next few minutes. I think I kept asking her about the breathing while still trying to keep calm.</p><p>Suddenly the doc peeped from above the screen and said that they were going to apply some pressure. The bed wobbled along with my thoughts, while I kept telling myself, it was okay. It was normal. A few moments later, we heard. We heard the cry. The long-awaited cry. Just twice, not much&#8230; The next moment we saw, we saw him above our heads. The doc held the child and brought him to our side of the screen.</p><p>He didn&#8217;t cry. I guessed he was cold. But he didn&#8217;t complain.</p><p>An attendant had already taken my phone to take the photos. He came from the other side and asked us to smile for a group picture. And there it was. Our first picture with all our hopes bundled in a life form.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XhTz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f92957a-6404-4830-bc34-5acb99987526_1400x1050.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XhTz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f92957a-6404-4830-bc34-5acb99987526_1400x1050.jpeg 424w, https://substackcdn.com/image/fetch/$s_!XhTz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f92957a-6404-4830-bc34-5acb99987526_1400x1050.jpeg 848w, https://substackcdn.com/image/fetch/$s_!XhTz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f92957a-6404-4830-bc34-5acb99987526_1400x1050.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!XhTz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f92957a-6404-4830-bc34-5acb99987526_1400x1050.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XhTz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f92957a-6404-4830-bc34-5acb99987526_1400x1050.jpeg" width="1400" height="1050" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0f92957a-6404-4830-bc34-5acb99987526_1400x1050.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1050,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!XhTz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f92957a-6404-4830-bc34-5acb99987526_1400x1050.jpeg 424w, https://substackcdn.com/image/fetch/$s_!XhTz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f92957a-6404-4830-bc34-5acb99987526_1400x1050.jpeg 848w, https://substackcdn.com/image/fetch/$s_!XhTz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f92957a-6404-4830-bc34-5acb99987526_1400x1050.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!XhTz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f92957a-6404-4830-bc34-5acb99987526_1400x1050.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>That done, they took the baby away for further checks. I saw the needle and the thread from above the screen. I wished to stay with Tharani until the rest of the surgery was completed, but a person called me and pointed at the door. I objected for a moment to stay a little longer. &#8220;I&#8217;ll meet you outside,&#8221; I remember telling her before letting go of her hand, which I was continuously holding.</p><p>Back through the corridor to the changing room, I was out of the theatre area. I called my mother immediately to share the news. &#8220;How&#8217;s Tharani?&#8221;, she asked. &#8220;OK, I&#8217;m waiting till she comes out.&#8221; I hung up.</p><p>Back to waiting near the same two-part door from before, I didn&#8217;t expect the next one and a half hours to be the hardest part of the evening. Harder than the time inside the theatre.</p><p>To the left of the theatre door, was the elevator that routinely brought more pregnant mothers rolling in beds to go in. Same drill. It was like a flashback scene from a movie. Mother taken in, the partner asked to wait near the door for ten thoughtful minutes until called in. And towards the end of the scene, the partner comes out of the door and waits till the mother returns with the baby. Same drill. I looked around and realised that some of them who were waiting there when I was going in were still there. The anxiety slowly started creeping in, I was pacing. I knew everything was ok, but what happened after I came out?</p><p>The next moment, the two-part door slightly opened and there was a bed on the other side. A small iron cot with wheels was taken in. It was for the baby to come rolling alongside the mother. Everyone waiting on this side peeped in with the hope of seeing their partner with their baby. Two minutes passed and the doors fully opened. One guy next to me walked up to the bed and helped roll the baby&#8217;s cot into the elevator to go start their new life. Back to waiting for others. The caution-biased mind kicks in at times like these and that moment was no exception. I kept on thinking how Tharani was finding it hard to breathe during the surgery. &#8220;Was the baby fine? Did the other babies cry more? I hoped they didn&#8217;t mix up the babies. Well, no. I have the pictures.&#8221; The thoughts kept cycling and cycling and cycling.</p><p>The doors opened again. This time the father looked worried. Mother rolled out with the iron cot, it was empty. Maybe their baby needed some special care after birth. Just taking a bit more time.</p><p>None of the people standing there talked with each other. They were engulfed in their own worlds, their own thinking. Some of them were constantly on their phones, providing updates to the families, &#8220;No. didn&#8217;t come out yet. It&#8217;s been more than an hour.&#8221; My legs were starting to hurt. I kept pacing until I saw another bed waiting against the door. A slight opening showed the hands of the mother. I knew it was Tharani.</p><p>As I sighed with relief they came out. Mother and son, both triumphant and rising from the depths of the operation theatre. I smiled.</p><p>I held Tharani&#8217;s hand as the elevator doors opened. &#8220;Ting&#8221;.</p><p>I didn&#8217;t sleep that night. As I waited near his small wooden cot in our smaller than average deluxe hospital room, I had my eyes locked on him. Just two expressions or three. Sleeping peacefully till he takes on the challenges of surviving in this new world.</p><p>All the slightest moves, the slightest noises from his mouth, I heard. I listened. He reminded me of how simple life can be. A matter of just being until the next feeding session. That night I wrote &#8212;</p><p><strong>I want him to start life with the lessons I&#8217;ve learned so far in my life.</strong></p><p><strong>I want him to know that he should look openly at life and that the world rewards authenticity, not fitting into norms.</strong></p><p><strong>I want him to know that he doesn&#8217;t have to impress his parents but impress only himself with the way he has lived.</strong></p><p><strong>I want him to know that even though he&#8217;s the most special person in our lives, it is not like that out there. He&#8217;s just one in 7.5 billion, and he should face the world with that attitude. Be kind, everyone is equal and just trying to survive.</strong></p><p><strong>I want him to know that it is not his duty but his choice to look after his parents when he&#8217;s older. It was our duty to bring out the best in him. And then it is his right to spend his life according to what he wants.</strong></p><p>So here we go&#8230;</p>]]></content:encoded></item><item><title><![CDATA[How Artists Become Legends]]></title><description><![CDATA[A Theory Behind Legendary Artists.]]></description><link>https://www.mirantha.com/p/how-artists-become-legends</link><guid isPermaLink="false">https://www.mirantha.com/p/how-artists-become-legends</guid><pubDate>Sat, 28 Dec 2024 17:49:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!kJmF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b49266e-cae7-4d19-be25-9a51e0a85d6e_600x600.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>[This post was originally published on Sep 15, 2021]</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kJmF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b49266e-cae7-4d19-be25-9a51e0a85d6e_600x600.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kJmF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b49266e-cae7-4d19-be25-9a51e0a85d6e_600x600.jpeg 424w, https://substackcdn.com/image/fetch/$s_!kJmF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b49266e-cae7-4d19-be25-9a51e0a85d6e_600x600.jpeg 848w, https://substackcdn.com/image/fetch/$s_!kJmF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b49266e-cae7-4d19-be25-9a51e0a85d6e_600x600.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!kJmF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b49266e-cae7-4d19-be25-9a51e0a85d6e_600x600.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kJmF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b49266e-cae7-4d19-be25-9a51e0a85d6e_600x600.jpeg" width="600" height="600" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0b49266e-cae7-4d19-be25-9a51e0a85d6e_600x600.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:600,&quot;width&quot;:600,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!kJmF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b49266e-cae7-4d19-be25-9a51e0a85d6e_600x600.jpeg 424w, https://substackcdn.com/image/fetch/$s_!kJmF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b49266e-cae7-4d19-be25-9a51e0a85d6e_600x600.jpeg 848w, https://substackcdn.com/image/fetch/$s_!kJmF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b49266e-cae7-4d19-be25-9a51e0a85d6e_600x600.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!kJmF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b49266e-cae7-4d19-be25-9a51e0a85d6e_600x600.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I felt extremely sad when I heard about the passing of musician Sunil Perera last week. The amount of sadness was somewhat surprising because I did not know him personally, nor have I spoken with him ever.</p><p>It made me wonder what makes us so emotionally attached to personalities like musicians or, on a wider scale, artists (actors/writers/creators) that we adore. I'm trying to gather some of my thoughts here.</p><h2><strong>1/ Art relates to our identity</strong></h2><p>The memories went back to my childhood when my father bought me the &#8216;Signore&#8217; cassette tape by the Gypsies in 2005. We listened to it on Sundays, laughed, and sang along.</p><p>Growing up, being the &#8216;guitarist&#8217; among my friends, I was a guy who knew these songs and sang them at parties. Experiences with art become parts of our identities. We talk about them all the time.</p><h2><strong>2/ Artist&#8217;s success is his followers&#8217; success</strong></h2><p>Whenever I saw the Gypsies perform, I saw the audience having a cracking time. It made me proud to be a fan of them and tell others around me how good they were.</p><p>Artist&#8217;s success somehow translates to their follower&#8217;s success. I know it&#8217;s a bit weird when you put it like that, but think about the last time talked highly and recommended someone a good song or a movie&#8230;.</p><h2><strong>3/ We know all about our favourite artists</strong></h2><p>The good and the bad. Fame makes artists vulnerable. The ones who turn this vulnerability into impact effortlessly communicate their authentic self to their followers. We love authenticity. This makes us stronger with 1/ and 2/ above.</p><h2><strong>4/ We cry for the emotions they created in our lives.</strong></h2><p>In hindsight, I figured I wasn&#8217;t sad about the passing of the &#8216;person&#8217; Sunil Perera. He probably lived a happy life with what he did and his loved ones. But I was sad about the passing of the feelings that the &#8216;artist&#8217; Sunil Perera had created in my life.</p><p>I felt proud when I knew all the words of his songs while singing them with my friends. I felt overjoyed when we laughed at the meaning of those songs and enjoyed the tunes. We simply had so much fun for ourselves with that art.</p><p>So ultimately, maybe it&#8217;s not what the artist accomplished, but what we accomplished with the art. It&#8217;s not what he felt, but what we felt with him. The stronger we felt, the stronger we thought we were connected to him.</p><p>At this point, you might wonder whether this is a conclusion about selfishness. But I would argue otherwise. These are natural traits of being human. The point is &#8212; it&#8217;s only art and artists who can trigger these feelings in us at scale.</p><p>RIP Sunil Perera. You have inspired generations&#8230;</p>]]></content:encoded></item><item><title><![CDATA[Harness the Power of ChatGPT to Uncover Insights from Your Own Data]]></title><description><![CDATA[Written with GPT-4]]></description><link>https://www.mirantha.com/p/harness-the-power-of-chatgpt-to-uncover-insights-from-your-own-data-7b225e72d102</link><guid isPermaLink="false">https://www.mirantha.com/p/harness-the-power-of-chatgpt-to-uncover-insights-from-your-own-data-7b225e72d102</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Sun, 16 Apr 2023 13:15:48 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/af893814-9483-4d5f-a252-9eb4fe7263c4_800x450.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h4>Written with&nbsp;GPT-4</h4><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qIyC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F891f70df-82e4-4426-b4d7-a70bc44d8b2c_800x450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qIyC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F891f70df-82e4-4426-b4d7-a70bc44d8b2c_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!qIyC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F891f70df-82e4-4426-b4d7-a70bc44d8b2c_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!qIyC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F891f70df-82e4-4426-b4d7-a70bc44d8b2c_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!qIyC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F891f70df-82e4-4426-b4d7-a70bc44d8b2c_800x450.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qIyC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F891f70df-82e4-4426-b4d7-a70bc44d8b2c_800x450.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/891f70df-82e4-4426-b4d7-a70bc44d8b2c_800x450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qIyC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F891f70df-82e4-4426-b4d7-a70bc44d8b2c_800x450.png 424w, https://substackcdn.com/image/fetch/$s_!qIyC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F891f70df-82e4-4426-b4d7-a70bc44d8b2c_800x450.png 848w, https://substackcdn.com/image/fetch/$s_!qIyC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F891f70df-82e4-4426-b4d7-a70bc44d8b2c_800x450.png 1272w, https://substackcdn.com/image/fetch/$s_!qIyC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F891f70df-82e4-4426-b4d7-a70bc44d8b2c_800x450.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p>You can now utilize the power of large language models (LLMs) like ChatGPT to answer questions about your data. In this blog post, I will guide you through the process of implementing a simple web application that integrates ChatGPT to answer queries about your own data.</p><p>We will be using the Langchain prompt chaining library to build an interactive chat interface that communicates with OpenAI&#8217;s GPT endpoints, and we will perform a semantic search to obtain relevant context for user queries. This approach doesn&#8217;t involve any fine-tuning of language models. Instead, we&#8217;ll leverage a vector database to power our search and provide the context to the LLM for generating accurate answers.</p><p><strong>Demo:</strong></p><p><strong>Understanding the Basics:</strong></p><p>Before diving into the implementation, it&#8217;s crucial to understand some key concepts related to large language models, semantic search, and vector databases.</p><ol><li><p>The context for Large Language Models (LLMs):</p></li></ol><p>Context is the background information or relevant details that guide an LLM like ChatGPT in generating meaningful responses. In our case, context is extracted from the user&#8217;s data to help the model understand the specific domain and provide accurate answers. By providing an appropriate context, we ensure that the model&#8217;s responses are tailored to the user&#8217;s dataset and query.</p><ol><li><p>Semantic Search:</p></li></ol><p>Semantic search is an advanced search technique that aims to understand the meaning and intent behind a query, rather than just matching keywords. It uses natural language processing (NLP) algorithms to identify relevant context and relationships between words, phrases, and concepts in a dataset. This results in more accurate and relevant search results compared to traditional keyword-based search methods.</p><ol><li><p>Vector Databases:</p></li></ol><p>A vector database is a specialized database designed to store and search high-dimensional vectors efficiently. In our implementation, we use Pinecone, a powerful and scalable vector database service. Pinecone enables us to perform fast and accurate semantic search by converting our data into numerical representations (vectors) and indexing them for efficient retrieval.</p><p><strong>Implementation Steps:</strong></p><p>You can find the full code here&#8202;&#8212;&#8202;<a href="https://github.com/miranthajayatilake/nanoQA2">https://github.com/miranthajayatilake/nanoQA2</a></p><p>Steps to quickstart locally:</p><ul><li><p>Clone the repo <code>git clone </code><a href="https://github.com/miranthajayatilake/nanoQA2.git"><code>https://github.com/miranthajayatilake/nanoQA2.git</code></a></p></li><li><p>Move into directory <code>cd nanoQA2</code></p></li><li><p>Set up your <code>python&gt;3.8</code> environment (virtual environment preferred)</p></li><li><p>Install the dependencies <code>pip install -r requirements.txt</code></p></li><li><p>Assign the environment variables by running <code>bash env-local.sh</code>. Make sure you have the following API keys and variables replaced</p></li><li><p>OpenAI API key (OPENAI_API_KEY). You can obtain this by creating an account at <a href="https://platform.openai.com/">OpenAI</a></p></li><li><p>Pinecone API key and environment name (PINECONE_API_KEY, PINECONE_ENV). Obtain these by making an account at <a href="https://www.pinecone.io/">Pinecone</a></p></li><li><p>Next, we have to create an index in the Pinecone account. You can use the <code>create_index.py</code> to do this. Make sure to provide the parameters below.</p></li><li><p><code>create_index.py --pinecone_api_key &lt;asdf&gt; --pinecone_environment &lt;asdf&gt; --index_name &lt;asdf&gt;</code></p></li><li><p>Copy the index name used above (INDEX_NAME)</p></li><li><p>Provide a namespace as well (NAMESPACE) just to organize data in the database</p></li><li><p>Provide a name that you want your chatbot to have (EGPTNAME)</p></li><li><p>Run the web app with <code>streamlit run Chat.py</code></p></li></ul><p>The repo also gives you instructions on how to deploy the app to the cloud easily.</p><p><strong>Code walkthrough:</strong></p><p>First, let&#8217;s look at the <code>Chat.py</code> script that has chat-related components.</p><p>We will import the necessary libraries and initialize Pinecone.</p><pre><code># Import necessary libraries
import os
import streamlit as st
import pinecone
from PIL import Image
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.vectorstores import Pinecone
from langchain.chat_models import ChatOpenAI
from langchain.prompts.chat import (
    ChatPromptTemplate,
    SystemMessagePromptTemplate,
    HumanMessagePromptTemplate,
)
from langchain.schema import (
    AIMessage,
    HumanMessage,
    SystemMessage
)
from langchain.chains import ChatVectorDBChain

# Initialize Pinecone
pinecone.init(api_key=os.environ["PINECONE_API_KEY"], environment=os.environ["PINECONE_ENV"])

# Load logo and display it
image = Image.open('utils/logo.jpg')
st.image(image, width=200)

# Set the title
st.title(f'{os.environ["EGPTNAME"]}')</code></pre><p>Next, we&#8217;ll initialize the embeddings and vector store using OpenAI Embeddings and Pinecone. Also, we&#8217;ll create the chat prompt templates and initialize the ChatVectorDBChain. This will allow us to use the ChatOpenAI model with a temperature parameter to control the randomness of the generated responses.</p><pre><code># Initialize embeddings and vector store
embeddings = OpenAIEmbeddings()
index = pinecone.Index(os.environ["INDEX_NAME"])
vectorstore = Pinecone(index, embeddings.embed_query, text_key='text', namespace=os.environ["NAMESPACE"])

# Define the system message template
system_template = """Use the following pieces of context to answer the users question. 
If you cannot find the answer from the pieces of context, just say that you don't know, don't try to make up an answer.
----------------
{context}"""

# Create the chat prompt templates
messages = [
    SystemMessagePromptTemplate.from_template(system_template),
    HumanMessagePromptTemplate.from_template("{question}")
]
prompt = ChatPromptTemplate.from_messages(messages)

# Initialize the ChatVectorDBChain
qa = ChatVectorDBChain.from_llm(ChatOpenAI(temperature=0), vectorstore, qa_prompt=prompt, return_source_documents=True)</code></pre><p>Next, we will initialize the chat history and define a function to execute a query. The function will display the generated response from GPT-3.5 and the sources used for the latest answer.</p><pre><code># Initialize the chat history
chat_history = []

if 'chat_history' not in st.session_state:
    st.session_state['chat_history'] = []

# Define the function to execute a query
def execute_query(query):
    with st.spinner('Thinking...'):
        for i in range(len(st.session_state['chat_history'])-1, -1, -1):
            chat_history.append(st.session_state['chat_history'][i])

        result = qa({"question": query, "chat_history": chat_history})

        st.session_state.chat_history.append((query, result["answer"]))
        chat_history.append((query, result["answer"]))

    st.info(query)
    st.success(result['answer'])

    # Display the sources for the latest answer
    with st.expander("Sources for the latest answer"):
        sources = result['source_documents']
        for idx, i in enumerate(sources):
            st.markdown(f"**Source number {idx + 1}** \n")
            st.markdown(i)
            st.write('-'*10)

    # Display the previous chat history
    if len(chat_history) &gt; 1:
        for query, answer in chat_history[:-1]:
            st.info(query)
            st.success(answer)

# Create input field and sample question buttons
query = st.text_input("Ask a question or tell what to do:", key="input")

# Execute the selected sample query
if query:
    execute_query(query)</code></pre><p>That completes the main portion of the code.</p><p>I created a separate page to handle uploading data to Pinecone. I believe the most useful features would be the ability to upload PDFs and provide URLs. Given a URL the app will automatically scrape that page and index the text into the database.</p><p>The code for this resides in the <code>pages/Contribute_data.py</code> script. I encourage you to clone the <a href="https://github.com/miranthajayatilake/nanoQA2">repo</a> and go through it. But here&#8217;s a snippet of how URLs are handled.</p><pre><code>with st.expander("URL"):
    url_input = st.text_input('URL', '')

    if st.button("Read from URL"):

        with st.spinner('Wait for it...'):
            urls = [
                url_input
            ]
            loader = UnstructuredURLLoader(urls=urls)

            documents = loader.load()

            text_splitter = CharacterTextSplitter(chunk_size=2000, chunk_overlap=0)
            documents = text_splitter.split_documents(documents)

            embeddings = OpenAIEmbeddings()

            isNotDone = True
            while(isNotDone):
                try:
                    reinitate_connetion()

                    vectorstore = Pinecone.from_documents(documents, embeddings, text_key='text', index_name=INDEX_NAME, namespace=NAMESPACE)
                    isNotDone = False
                except:
                    pass

        st.info('Done')</code></pre><p>That&#8217;s pretty much all of the main components you need. Again, the full code can be found at <a href="https://github.com/miranthajayatilake/nanoQA2">https://github.com/miranthajayatilake/nanoQA2</a></p><p>&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212;&#8202;&#8212; &#8212;</p><p>&#127775; Please feel free to fork the repository, star it, and contribute to the project. I am looking forward to hearing your thoughts, suggestions, and any success stories that result from using this code. &#128640;</p><p>I&#8217;ve enjoyed writing and sharing this. Thanks for reading!</p>]]></content:encoded></item><item><title><![CDATA[Building a Chat-AI to answer about your own data — Part I]]></title><description><![CDATA[First things first]]></description><link>https://www.mirantha.com/p/building-a-chat-ai-to-answer-about-your-own-data-part-i-f05dde32ff1b</link><guid isPermaLink="false">https://www.mirantha.com/p/building-a-chat-ai-to-answer-about-your-own-data-part-i-f05dde32ff1b</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Wed, 22 Feb 2023 17:44:41 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/070c4186-8361-4bde-9b3c-94fc419fb33e_800x533.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H-Ot!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14109109-6df5-450f-875f-e45c340a9f1f_800x533.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H-Ot!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14109109-6df5-450f-875f-e45c340a9f1f_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!H-Ot!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14109109-6df5-450f-875f-e45c340a9f1f_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!H-Ot!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14109109-6df5-450f-875f-e45c340a9f1f_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!H-Ot!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14109109-6df5-450f-875f-e45c340a9f1f_800x533.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H-Ot!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14109109-6df5-450f-875f-e45c340a9f1f_800x533.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/14109109-6df5-450f-875f-e45c340a9f1f_800x533.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!H-Ot!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14109109-6df5-450f-875f-e45c340a9f1f_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!H-Ot!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14109109-6df5-450f-875f-e45c340a9f1f_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!H-Ot!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14109109-6df5-450f-875f-e45c340a9f1f_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!H-Ot!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14109109-6df5-450f-875f-e45c340a9f1f_800x533.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><h3>First things&nbsp;first</h3><p>Addressing the elephant in the room: no, we will not build a version of ChatGPT here, nor will we follow anything related to how it was trained.</p><p>But we will use Large Language Models (LLMs), which is the family of models that ChatGPT is based on, still not in a generative way but to learn representations of text. Ultimately this guide aims to build a simple question-answering interface, that answers only using the prior information you have provided.</p><p>This can also be viewed as a basic semantic search engine with a chat interface.</p><h3>Why do this? What are the use&nbsp;cases?</h3><p>While an all-embracing, generalized, know-it-all answering machine is impressive, in reality, there is more value in an expert agent that allows more control over the generated outputs and a lesser probability to make mistakes.</p><p>Such an agent can help us retrieve meaningful information from large corpora with the ease of a natural conversation, which is otherwise quite cumbersome to handle. The use cases from the top of my head are;</p><ul><li><p>get answers from a software documentation</p></li><li><p>get answers on legal matters from a large collection of legal documents</p></li><li><p>get healthcare information but only from a collection of trusted sources</p></li><li><p>&#8230;</p></li></ul><p>You get the idea. Let&#8217;s dive in.</p><h3>Demo</h3><p>This is the goal.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gDie!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0db486a4-85af-4edd-91a2-891b518c7ed9_714x437.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gDie!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0db486a4-85af-4edd-91a2-891b518c7ed9_714x437.gif 424w, https://substackcdn.com/image/fetch/$s_!gDie!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0db486a4-85af-4edd-91a2-891b518c7ed9_714x437.gif 848w, https://substackcdn.com/image/fetch/$s_!gDie!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0db486a4-85af-4edd-91a2-891b518c7ed9_714x437.gif 1272w, https://substackcdn.com/image/fetch/$s_!gDie!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0db486a4-85af-4edd-91a2-891b518c7ed9_714x437.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gDie!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0db486a4-85af-4edd-91a2-891b518c7ed9_714x437.gif" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0db486a4-85af-4edd-91a2-891b518c7ed9_714x437.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gDie!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0db486a4-85af-4edd-91a2-891b518c7ed9_714x437.gif 424w, https://substackcdn.com/image/fetch/$s_!gDie!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0db486a4-85af-4edd-91a2-891b518c7ed9_714x437.gif 848w, https://substackcdn.com/image/fetch/$s_!gDie!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0db486a4-85af-4edd-91a2-891b518c7ed9_714x437.gif 1272w, https://substackcdn.com/image/fetch/$s_!gDie!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0db486a4-85af-4edd-91a2-891b518c7ed9_714x437.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h3>Core Concept</h3><p>The way we are utilizing LLMs in this app is to generate embeddings of text. An embedding is a numerical representation of a text segment that can be either several words, a single word, or even a single character. This is something to evaluate and decide depending on your application.</p><p>In this basic version of the demo app, we perform sentence embeddings where a sentence is a question that is asked by the user.</p><p>Also in advance, we generate embeddings for the questions that we have in our data store. So upon a user query, how an answer is chosen is by looking at the similarity between the &#8216;user question embedding&#8217; and a &#8216;stored question embedding&#8217;.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZGRm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac864960-876d-4061-b25a-fb3a8d02bf5f_688x330.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZGRm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac864960-876d-4061-b25a-fb3a8d02bf5f_688x330.png 424w, https://substackcdn.com/image/fetch/$s_!ZGRm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac864960-876d-4061-b25a-fb3a8d02bf5f_688x330.png 848w, https://substackcdn.com/image/fetch/$s_!ZGRm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac864960-876d-4061-b25a-fb3a8d02bf5f_688x330.png 1272w, https://substackcdn.com/image/fetch/$s_!ZGRm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac864960-876d-4061-b25a-fb3a8d02bf5f_688x330.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZGRm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac864960-876d-4061-b25a-fb3a8d02bf5f_688x330.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ac864960-876d-4061-b25a-fb3a8d02bf5f_688x330.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZGRm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac864960-876d-4061-b25a-fb3a8d02bf5f_688x330.png 424w, https://substackcdn.com/image/fetch/$s_!ZGRm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac864960-876d-4061-b25a-fb3a8d02bf5f_688x330.png 848w, https://substackcdn.com/image/fetch/$s_!ZGRm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac864960-876d-4061-b25a-fb3a8d02bf5f_688x330.png 1272w, https://substackcdn.com/image/fetch/$s_!ZGRm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac864960-876d-4061-b25a-fb3a8d02bf5f_688x330.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h4>A bit about this&nbsp;approach</h4><p>One of the most discussed drawbacks of ML in general is the difficulty to control the outputs from a model. But in the above approach, an LLM is only used to understand language and to select which answer is the most relevant. Since the answers are predetermined, we have more control over the ultimate output to the user in this setup.</p><p>Of course, this approach will not match all use cases. But in applications where a &#8216;generative&#8217; output is too risky, I argue that this is a good workaround.</p><h3>System Overview</h3><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2eK-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef478c4f-4b27-45f6-b558-73614d9652a1_614x428.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2eK-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef478c4f-4b27-45f6-b558-73614d9652a1_614x428.png 424w, https://substackcdn.com/image/fetch/$s_!2eK-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef478c4f-4b27-45f6-b558-73614d9652a1_614x428.png 848w, https://substackcdn.com/image/fetch/$s_!2eK-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef478c4f-4b27-45f6-b558-73614d9652a1_614x428.png 1272w, https://substackcdn.com/image/fetch/$s_!2eK-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef478c4f-4b27-45f6-b558-73614d9652a1_614x428.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2eK-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef478c4f-4b27-45f6-b558-73614d9652a1_614x428.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ef478c4f-4b27-45f6-b558-73614d9652a1_614x428.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2eK-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef478c4f-4b27-45f6-b558-73614d9652a1_614x428.png 424w, https://substackcdn.com/image/fetch/$s_!2eK-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef478c4f-4b27-45f6-b558-73614d9652a1_614x428.png 848w, https://substackcdn.com/image/fetch/$s_!2eK-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef478c4f-4b27-45f6-b558-73614d9652a1_614x428.png 1272w, https://substackcdn.com/image/fetch/$s_!2eK-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef478c4f-4b27-45f6-b558-73614d9652a1_614x428.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The main components of the system and the utilized tools are as follows;</p><ul><li><p>LLM (Retriever)&#8202;&#8212;&#8202;The LLM used in this version is a <a href="https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2">sentence-transformer from HuggingFace</a>. This is the most crucial component of this app and I use a tool called <a href="https://haystack.deepset.ai/">haystack</a> to build it.<br>Haystack makes it easier to work with transformer models and it has pre-built functionality for question-answering capabilities, so we don&#8217;t have to build everything from scratch.</p></li><li><p>Data store&#8202;&#8212;&#8202;I use <a href="https://www.elastic.co/">Elasticsearch</a><br>Elasticsearch is a database that stores documents in an unstructured manner and is optimized for search functionalities. I chose this with scaling in mind.</p></li><li><p>User interface&#8202;&#8212;&#8202;<a href="https://streamlit.io/">Streamlit</a><br>Streamlit is a python tool that lets you build quick web applications. Highly recommended.</p></li></ul><h3>The steps</h3><p>Download the <a href="https://github.com/miranthajayatilake/nanoQA">nanoQA GitHub repo</a></p><pre><code>git clone https://github.com/miranthajayatilake/nanoQA.git
cd nanoQA</code></pre><p>Next, we have to set up the python environment. The best thing is to create a new virtual environment for this project with <code>python3</code>. I personally use <a href="https://www.anaconda.com/">Anaconda</a> to manage python environments. Once you have it, install the required dependencies.</p><pre><code>pip install -r requirements.txt</code></pre><h4>The data store&nbsp;setup</h4><p>Let&#8217;s set up elasticsearch locally to be used as the data store in this project. I prefer using Docker for this because it is easy to use. Make sure you have <a href="https://www.docker.com/">Docker</a> running on your machine.</p><p>Run the bash script that will pull the elasticsearch image and run it on the relevant ports.</p><pre><code>bash datastore.sh</code></pre><h4>Sample data and&nbsp;indexing</h4><p>The next step is to obtain your data source, restructure it and store it in a meaningful way so that it fits a question-and-answer format. Let&#8217;s dive into what this means.</p><p>In the demo app, we use a sample dataset (a CSV file) that has some FAQ data on COVID-19. Since this already has a structured set of questions and answers along with some more meta-data, there is no need of restructuring it. The script <code>sample_data.py</code> takes care of downloading and indexing data. The arguments are: <code>sample_data.py path_to_save_data download_location elasticsearch_index_name</code></p><pre><code>python sample_data.py data/faq_covid https://s3.eu-central-1.amazonaws.com/deepset.ai-farm-qa/datasets/documents/small_faq_covid.csv.zip index_qa</code></pre><p>The index name can be replaced with anything you desire. Also, please go through the script to see how the question embedding is performed and stored along with the data. I hope to make this process more customizable in future releases of the repo.</p><h4>The UI</h4><p>Now that we have all the backend components set up, what&#8217;s left is to spin up the sample user interface. You can easily do this with the below command.</p><pre><code>streamlit run app.py</code></pre><p>The script responsible for the UI is<code>app.py</code>&nbsp;. The main components are all built on top of <code>haystack</code>&nbsp;. And the LLM we are using in this demo is called<code>sentence-transformers/all-MiniLM-L6-v2</code>&nbsp;. This is pulled from HuggingFace&#8202;&#8212;&#8202;<a href="https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2">model page</a>.</p><h4>More control over&nbsp;outputs</h4><p>I perform a custom filtration of the results to make it more fun. One of the outputs from the similarity calculation step is a similarity score between 0 and 1 (1 meaning identical).</p><p>I set a minimum threshold of 0.7 for an answer to be eligible. If the maximum similarity score among the outputs is less than 0.7, I overwrite the output to the user saying that nanoQA could not find an answer. This prevents the app from giving irrelevant answers.</p><pre><code>if prediction['answers'][0].score &gt;= 0.7:
   ...print answer...
else:
   st.write('nanoQA failed to find an answer with confidence...sorry!')</code></pre><h4>Providing evidence for the&nbsp;answer</h4><p>Another addition to the demo app is printing the source of the answer and the link. This is possible because, in our sample data, we had metadata on these sources and links.</p><p>I believe this is a powerful feature for an application such as this in terms of user experience.</p><p>That&#8217;s it for this one.</p><p>I hope you gained useful knowledge from this project. I plan to keep improving this application and write successive posts on more exciting features. So make sure to follow my blog and the <a href="https://github.com/miranthajayatilake/nanoQA">nanoQA GitHub repo</a> &#128293;.</p><p>I also started a <a href="https://paradigmai.substack.com/">newsletter</a> where I interview founders and AI engineers who are building impactful AI applications. Check it out &#129782;</p><p><strong><a href="https://paradigmai.substack.com/" title="https://paradigmai.substack.com/">Paradigm | Mirantha Jayathilaka, PhD | Substack</a></strong><a href="https://paradigmai.substack.com/" title="https://paradigmai.substack.com/"><br></a><em><a href="https://paradigmai.substack.com/" title="https://paradigmai.substack.com/">Stories of companies and individuals building impactful AI applications and sometimes even complete businesses with AI&#8230;</a></em><a href="https://paradigmai.substack.com/" title="https://paradigmai.substack.com/">paradigmai.substack.com</a></p><p>We also have interesting chats over at our <a href="https://discord.gg/Pu2YJDzScZ">Discord</a>. Join in &#129309;&#127997;</p><p><strong><a href="https://discord.gg/Pu2YJDzScZ" title="https://discord.gg/Pu2YJDzScZ">Join the ParadigmAI Discord Server!</a></strong><a href="https://discord.gg/Pu2YJDzScZ" title="https://discord.gg/Pu2YJDzScZ"><br></a><em><a href="https://discord.gg/Pu2YJDzScZ" title="https://discord.gg/Pu2YJDzScZ">Check out the ParadigmAI community on Discord </a></em><a href="https://discord.gg/Pu2YJDzScZ" title="https://discord.gg/Pu2YJDzScZ">discord.gg</a></p><p>Thanks for reading!</p>]]></content:encoded></item><item><title><![CDATA[25 NLP tasks at a glance.]]></title><description><![CDATA[Undoubtedly Natural Language Processing (NLP) has come a long way over the recent years with the advancements in the area of language&#8230;]]></description><link>https://www.mirantha.com/p/25-nlp-tasks-at-a-glance-52e3fdff32e2</link><guid isPermaLink="false">https://www.mirantha.com/p/25-nlp-tasks-at-a-glance-52e3fdff32e2</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Thu, 25 Jun 2020 13:46:11 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/ecfc9f84-0c26-4841-859e-34e338c3db49_800x533.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zHvg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2d5846-bfcb-4e3c-a17e-58ca1a252c7e_800x533.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zHvg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2d5846-bfcb-4e3c-a17e-58ca1a252c7e_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zHvg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2d5846-bfcb-4e3c-a17e-58ca1a252c7e_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zHvg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2d5846-bfcb-4e3c-a17e-58ca1a252c7e_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zHvg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2d5846-bfcb-4e3c-a17e-58ca1a252c7e_800x533.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zHvg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2d5846-bfcb-4e3c-a17e-58ca1a252c7e_800x533.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4a2d5846-bfcb-4e3c-a17e-58ca1a252c7e_800x533.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zHvg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2d5846-bfcb-4e3c-a17e-58ca1a252c7e_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zHvg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2d5846-bfcb-4e3c-a17e-58ca1a252c7e_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zHvg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2d5846-bfcb-4e3c-a17e-58ca1a252c7e_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zHvg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2d5846-bfcb-4e3c-a17e-58ca1a252c7e_800x533.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@ninjason?utm_source=medium&amp;utm_medium=referral">Jason Leung</a> on&nbsp;<a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>Undoubtedly <strong>Natural Language Processing (NLP)</strong> has come a long way over the recent years with the advancements in the area of language modelling and ever-increasing computational efforts put in. This has enabled many capabilities and tasks related to text processing, leading to several high-impact applications. This is a comprehensive list of different tasks and applications possible with current NLP techniques. Here we go&#8230;</p><h4>1. Information retrieval</h4><p>Finds documents of text that satisfies an information need from within large collections</p><h4>2. Named entity recognition</h4><p>Seeks to locate and classify entities into predefined categories such as person names, organizations, locations, medical codes, time expressions, quantities, monetary values, percentages, etc.</p><h4>3. Relation extraction</h4><p>Extracts semantic relationships from the text, which usually occur between two or more entities</p><h4>4. Text classification/Document Classification</h4><p>Assigns a text/document to one or more classes or categories.</p><h4>5. Document&nbsp;Ranking</h4><h4>6. Annotation</h4><h4>7. Topic modelling</h4><p>Discovers the abstract &#8220;topics&#8221; that occur in a collection of documents</p><h4>8. Keyword Extraction</h4><h4>9. Machine translation</h4><h4>10. Parts of speech&nbsp;tagging</h4><p>Process of marking up a word in a text as corresponding to a particular part of speech</p><h4>11. Semantic Role&nbsp;Labeling</h4><p>Indicates the <strong>semantic role</strong> in the sentence, such as that of an agent, goal, or result</p><h4>12. Word Sense Disambiguation</h4><p>Identifies which sense of a word is used in a sentence</p><h4>13. Grammatical Error Correction</h4><h4>14. Semantic textual similarity</h4><p>determines how similar two pieces of texts are. This can take the form of assigning a score from 1 to 5. Related tasks are paraphrase or duplicate identification.</p><h4>15. Text summarization/Meeting Summarization</h4><h4>16. Reading comprehension</h4><h4>17. Question and answering</h4><h4>18. Question Generation</h4><h4>19. Image captioning</h4><h4>20. Fake News Detection/Hate Speech Detection</h4><h4>21. Text generation</h4><h4>22. Sentiment/emotion analysis</h4><p>Interprets and classifies of emotions (positive, negative and neutral) with text data</p><h4>23. Speech-to-text</h4><p>Translation of spoken language into text</p><h4>24. Text-to-speech</h4><p>Converts text into spoken voice output</p><h4>25. Dialogue Understanding</h4><p>I hope this list is useful to whoever wanting to dive deeper into the NLP realm, either for research or industry application ideas. Good, that was a quick one.</p><p>Thanks &#128591;.</p>]]></content:encoded></item><item><title><![CDATA[Start with the problem, not with AI]]></title><description><![CDATA[Written by Mirantha Jayathilaka and Dr. Janak Gunatilleke]]></description><link>https://www.mirantha.com/p/start-with-the-problem-not-with-ai-7e6127e99356</link><guid isPermaLink="false">https://www.mirantha.com/p/start-with-the-problem-not-with-ai-7e6127e99356</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Sat, 04 Apr 2020 07:01:07 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/12d0f340-a3b1-464e-ad94-1b8e98640031_800x533.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Written by <a href="https://medium.com/u/9be8b9ff653d?source=post_page-----c206158e53fa----------------------">Mirantha Jayathilaka</a> and <a href="https://medium.com/u/e18d5e5578f3?source=post_page-----c206158e53fa----------------------">Dr. Janak Gunatilleke</a></em></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yRmA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bac8858-41d9-421d-9acb-f4724da99eaa_800x533.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yRmA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bac8858-41d9-421d-9acb-f4724da99eaa_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!yRmA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bac8858-41d9-421d-9acb-f4724da99eaa_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!yRmA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bac8858-41d9-421d-9acb-f4724da99eaa_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!yRmA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bac8858-41d9-421d-9acb-f4724da99eaa_800x533.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yRmA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bac8858-41d9-421d-9acb-f4724da99eaa_800x533.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5bac8858-41d9-421d-9acb-f4724da99eaa_800x533.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yRmA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bac8858-41d9-421d-9acb-f4724da99eaa_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!yRmA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bac8858-41d9-421d-9acb-f4724da99eaa_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!yRmA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bac8858-41d9-421d-9acb-f4724da99eaa_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!yRmA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5bac8858-41d9-421d-9acb-f4724da99eaa_800x533.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@olav_ahrens?utm_source=medium&amp;utm_medium=referral">Olav Ahrens R&#248;tne</a> on&nbsp;<a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>In this post, we consider the importance of user research in AI projects and describe our approach at <a href="https://www.mindwaveventures.com/">Mindwave</a>.</p><p><strong>AI is the new electricity</strong></p><p>This is a phrase often heard from the pioneers of the technology. It is meant to transform industries from healthcare to manufacturing, from logistics to retail. But there is a clear lesson that we can draw from our experience with electricity over the past years&#8202;&#8212;&#8202;it is an enabler. Not all products or solutions that use electricity changed the way we live today. But some of them really did.</p><p>The impact of AI is fairly evident from the success stories that have emerged so far. Take smart assistants for example, devices such as Amazon Echo and Google Home. Manually coding a software system that could interpret the many variations of human conversation effectively seemed like a far fetched goal a few years ago. But recent AI techniques in natural language processing (NLP) have enabled this capability for software and the applications have soon followed into our lives. Smart assistants today have transformed the way we search on the web, listen to music and even how we buy.</p><p>But it is important to see what drove the adoption of this new technology. Is it the intrinsic affordance of the technology alone or something else? We argue that the main reason for the huge popularity of smart assistants lies in how they changed the fundamental way we communicated with the machines. Verbal dialogue is the most natural method with which we communicate with each other, hence it becomes the best method in the case of human-machine interface as well. Thus we make a clear distinction&#8202;&#8212;&#8202;product success was due to solving a major challenge in human-machine interaction, and AI was just the enabler.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!otg_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdea955c4-aed4-4c31-8767-f630ac417123_800x362.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!otg_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdea955c4-aed4-4c31-8767-f630ac417123_800x362.jpeg 424w, https://substackcdn.com/image/fetch/$s_!otg_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdea955c4-aed4-4c31-8767-f630ac417123_800x362.jpeg 848w, https://substackcdn.com/image/fetch/$s_!otg_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdea955c4-aed4-4c31-8767-f630ac417123_800x362.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!otg_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdea955c4-aed4-4c31-8767-f630ac417123_800x362.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!otg_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdea955c4-aed4-4c31-8767-f630ac417123_800x362.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dea955c4-aed4-4c31-8767-f630ac417123_800x362.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!otg_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdea955c4-aed4-4c31-8767-f630ac417123_800x362.jpeg 424w, https://substackcdn.com/image/fetch/$s_!otg_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdea955c4-aed4-4c31-8767-f630ac417123_800x362.jpeg 848w, https://substackcdn.com/image/fetch/$s_!otg_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdea955c4-aed4-4c31-8767-f630ac417123_800x362.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!otg_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdea955c4-aed4-4c31-8767-f630ac417123_800x362.jpeg 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p><strong>Problem Identification&#8202;&#8212;&#8202;First step in AI development workflow</strong></p><p>Problem identification should become the initial step in any AI development workflow. We like to highlight two separate avenues where problems can occur with respect to a given end-product.</p><p><strong>I. Problems between user and the product</strong></p><p>Product adoption is often driven by the user experience and the many aspects that revolve around it. Hence it is an area that requires proper user research and feedback generation.</p><p>Take an example use case where the idea is to develop a virtual psychiatrist to treat patients with mental and emotional challenges. Here the objective is to provide the most suitable advice on the basis of the input from the patient regarding his/her mental and demographic status. Looking at a scenario of psychiatrist-patient interaction, the effectiveness of diagnosis and treatment depends heavily on the expressivity of the patient in describing what he/she feels. Here a challenge is identified&#8202;&#8212;&#8202;how does one facilitate this nuanced interaction via a software interface?&#8202;&#8212;&#8202;this should become an initial concern for the development workflow of this product.</p><p><strong>II. Problems with inefficiencies and improvements in an existing product</strong></p><p>Often opportunities for automation addressing inefficiencies and challenges with regard to innovation could surface in existing products.</p><p>Consider the use case of a movie recommendation system. One means of implementation is to carry out a traditional execution which produces a new set of recommendations given the user&#8217;s past choices. In this case, the instructions are hardcoded by the designers of the system. But a more advanced and effective strategy would be to understand how the users across the system have reacted to the recommendations in the past, learn from the historical data and improve the recommendations with respect to user clusters automatically. This is the challenge identification which leads us to the next point.</p><p><strong>Assess if AI is the enabler for the solution</strong></p><p>Following the identification of the problem and potential solutions, it is vital to assess the possible methods of developing a solution and work out if AI would act as the enabler or not.</p><p>Connecting with the virtual psychiatrist use case from above&#8202;&#8212;&#8202;a method of improving user expressivity in the virtual psychiatrist system might be to allow the user to input free text into the system, explaining his/her issue. Now in order to process and retrieve elements of the text which are important to the diagnosis, NLP techniques become a requirement. Here we choose AI to be the enabler.</p><p>Let us consider another use case of a virtual pre-diagnosis for a condition concerning physical health. In this instance a specific condition has to be determined by discrete inputs from the patient, such as age, symptoms, severity level etc. Here, a more traditional programming approach of producing the results would fit better. With respect to the accuracy and transparency of the process, software that is programmed explicitly to make decisions comes above the existing AI approaches in this case.</p><p><strong>Final thoughts</strong></p><p><a href="https://www.forbes.com/sites/forbestechcouncil/people/jeffcatlin/">Jeff Catlin</a> makes a firm point in his <a href="https://www.forbes.com/sites/forbestechcouncil/2018/05/21/using-ai-to-solve-a-business-problem/#30e44758597e">Forbes article</a> about identifying the need and the desired outcome before thinking of the technology aspect of an AI project. He argues that building a business case for AI isn&#8217;t so different from building one for any other business problem. Accurate study on the feasibility and return on investment will drive AI adoption and make the best use of the technology. <a href="https://www.forbes.com/sites/robertpearl/">Robert Pearl</a> goes on to mention how <a href="https://www.forbes.com/sites/robertpearl/2020/02/24/ai-hype/#1c861dba458e">AI could live up to its hype in the healthcare industry</a>, where he emphasises how tech companies often focus squarely on the technology while routinely overlooking the human fears and frustrations that AI can cause. Addressing these needs such as ethicality and security can surface new opportunities and areas of growth for AI in the <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6616181/">much-anticipated field of healthcare</a></p><p>At Mindwave, we follow the above approach towards AI developments in the field of healthcare, carefully identifying the problems through deep user research and feedback. We assess the feasibility of using AI in solving the identified problems and focus on strong evaluation strategies to measure their impact.</p><p>We argue that the use of AI for the technology&#8217;s sake, without a proper understanding of how it can solve real problems and impact our lives, can lead to failed investments of time and money. It can damage the trust towards the technology and eliminate potential long-term outcomes that can be favourable to everyone.</p><p>If you have any feedback or would like to chat about any of the above points, please drop an email to <a href="mailto:janak@mindwaveventures.com">mirantha@mindwaveventures.com</a></p>]]></content:encoded></item><item><title><![CDATA[Is Deep Learning the Future of Medical Decision Making?]]></title><description><![CDATA[Healthcare is often spoken of as a field that is on the verge of an AI revolution. Big names in AI such as Google DeepMind, publicise&#8230;]]></description><link>https://www.mirantha.com/p/is-deep-learning-the-future-of-medical-decision-making-b36ba17ddbf7</link><guid isPermaLink="false">https://www.mirantha.com/p/is-deep-learning-the-future-of-medical-decision-making-b36ba17ddbf7</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Mon, 21 Oct 2019 09:27:03 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/f71c01d1-66fc-49b7-bc41-24323fb19c92_800x530.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H-FM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F065fd0b4-9165-4b46-b32d-05dd35d55f68_800x530.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H-FM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F065fd0b4-9165-4b46-b32d-05dd35d55f68_800x530.jpeg 424w, https://substackcdn.com/image/fetch/$s_!H-FM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F065fd0b4-9165-4b46-b32d-05dd35d55f68_800x530.jpeg 848w, https://substackcdn.com/image/fetch/$s_!H-FM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F065fd0b4-9165-4b46-b32d-05dd35d55f68_800x530.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!H-FM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F065fd0b4-9165-4b46-b32d-05dd35d55f68_800x530.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H-FM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F065fd0b4-9165-4b46-b32d-05dd35d55f68_800x530.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/065fd0b4-9165-4b46-b32d-05dd35d55f68_800x530.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!H-FM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F065fd0b4-9165-4b46-b32d-05dd35d55f68_800x530.jpeg 424w, https://substackcdn.com/image/fetch/$s_!H-FM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F065fd0b4-9165-4b46-b32d-05dd35d55f68_800x530.jpeg 848w, https://substackcdn.com/image/fetch/$s_!H-FM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F065fd0b4-9165-4b46-b32d-05dd35d55f68_800x530.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!H-FM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F065fd0b4-9165-4b46-b32d-05dd35d55f68_800x530.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@chrishcush?utm_source=medium&amp;utm_medium=referral">Christian Bowen</a> on&nbsp;<a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>Healthcare is often spoken of as a field that is on the verge of an AI revolution. Big names in AI such as Google <a href="https://deepmind.com/applied/deepmind-health/%29">DeepMind</a>, publicise their efforts in healthcare, claiming that &#8220;<a href="https://ai.google/healthcare/">AI is poised to transform medicine.</a>&#8221;</p><p>But how <strong>impactful has AI been so far?</strong> Have we really identified areas in healthcare that will benefit from new technology?</p><p>At the ACM CHI Conference on &#8216;Human Factors in Computing Systems&#8217; held in May this year, <a href="https://arxiv.org/pdf/1902.02960.pdf">Carrie J. Cai</a> of Google presented her award-winning work on &#8216;<a href="https://arxiv.org/pdf/1902.02960.pdf">Human-centered tool for coping with Imperfect Algorithms During Medical Decision-Making</a>, discussing the increasing usage of machine learning algorithms in medical decision making. Her work proposes a novel system enabling doctors to refine and modify the search of pathological images on-the-fly, continuously enhancing the usability of the system.</p><p><a href="https://www.sciencedirect.com/science/article/pii/S1386505603002119">Retrieving visually similar medical images</a> from past patients (e.g. tissue from biopsies) for reference when making medical decisions with new patients is a promising avenue where the state-of-the-art deep learning visual models can be highly applicable. However, capturing the exact notion of similarity required by the user during a specific diagnostic procedure offers big challenges to existing systems because of a phenomenon known as the <strong>intention gap</strong>, which refers to the difficulty in capturing the exact intention of the user. We will discuss this in more detail later.</p><p>Cai&#8217;s research showcases how the refinement tools they developed on their medical image retrieval system increases the diagnostic utility of images and most importantly, increases a user&#8217;s trust in the machine learning algorithm for medical decision making. Furthermore, the findings show how the users are able to understand the strengths and weaknesses of the underlying algorithm and disambiguate its errors from their own. Overall the work presented an optimistic view of the future of human-AI collaborative systems in expert decision-making in healthcare.</p><p>In this post, we want to look into three main areas namely&#8202;&#8212;&#8202;(1) the state of content-based image retrieval systems, (2) the role of deep learning in these systems and finally, (3) a discussion on their application and impact in healthcare.</p><p><strong>The state of content-based image retrieval systems</strong></p><p>Over the last two decades or so, content-based image retrieval (CBIR) has been a vivid research area in computer vision, mainly due to the ever-growing accessibility of visual data on the web. Text-based search techniques for images suffer many inconsistencies due to mismatches with the visual content, hence considering the visual content as a ranking clue for similarity is seen to be important in many cases.</p><p><a href="https://arxiv.org/pdf/1706.06064.pdf">Wengang Zhou et al.</a> point out two crucial challenges in CBIR systems that they call as the <strong>intention gap</strong> and the <strong>semantic gap</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JCdu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff127517a-9efd-492a-ba5c-0e333ad1f04f_800x546.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JCdu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff127517a-9efd-492a-ba5c-0e333ad1f04f_800x546.png 424w, https://substackcdn.com/image/fetch/$s_!JCdu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff127517a-9efd-492a-ba5c-0e333ad1f04f_800x546.png 848w, https://substackcdn.com/image/fetch/$s_!JCdu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff127517a-9efd-492a-ba5c-0e333ad1f04f_800x546.png 1272w, https://substackcdn.com/image/fetch/$s_!JCdu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff127517a-9efd-492a-ba5c-0e333ad1f04f_800x546.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JCdu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff127517a-9efd-492a-ba5c-0e333ad1f04f_800x546.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f127517a-9efd-492a-ba5c-0e333ad1f04f_800x546.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JCdu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff127517a-9efd-492a-ba5c-0e333ad1f04f_800x546.png 424w, https://substackcdn.com/image/fetch/$s_!JCdu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff127517a-9efd-492a-ba5c-0e333ad1f04f_800x546.png 848w, https://substackcdn.com/image/fetch/$s_!JCdu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff127517a-9efd-492a-ba5c-0e333ad1f04f_800x546.png 1272w, https://substackcdn.com/image/fetch/$s_!JCdu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff127517a-9efd-492a-ba5c-0e333ad1f04f_800x546.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Figure 1&#8202;&#8212;&#8202;Taken from the paper &#8220;Recent Advance in Content-based Image Retrieval: A Literature Survey&#8221; by <a href="https://arxiv.org/pdf/1706.06064.pdf">Wengang Zhou et&nbsp;al.</a></figcaption></figure></div><p>The intention gap, as implied by the meaning, refers to the difficulty in capturing the <strong>exact intention of the user</strong> by a query at hand, such as an example image or a keyword. This is the challenge addressed by <a href="https://arxiv.org/pdf/1902.02960.pdf">Carrie J. Cai et al.</a> with their refinement tools in the user interface. Looking at <a href="https://www.sciencedirect.com/science/article/pii/S1047320315001327">past research</a>, query formation by example image seems to be the most widely explored area, intuitively due to the convenience of obtaining rich query information through images. This demands accurate feature extraction from images which brings us to the next point, the semantic gap.</p><p>The semantic gap deals with the difficulty in describing high-level semantic concepts with low-level visual features. Now, this topic has attracted a considerable amount of research over the years with several notable breakthroughs such as the introduction of <a href="https://www.cs.ubc.ca/~lowe/papers/ijcv04.pdf">invariant local visual feature SIFT</a> and introduction of <a href="https://www.robots.ox.ac.uk/~vgg/publications/2003/Sivic03/">Bag-of-Visual-Words (BoW) model</a>.</p><p>Figure 1 shows the two main functionalities of a CBIR system. Matching the similarities between the query understanding and image features can also be an important step, but it fully depends on how well the system expresses the query and the image.</p><p>The recent explosion of learning-based feature extractors such as <a href="https://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf">deep convolutional neural networks (CNN)</a> opened up many avenues for research that can be directly applied to deal with the semantic gap we discussed in CBIR systems. These techniques have shown significant improvements over the hand-crafted feature extractors and have already demonstrated <a href="https://dl.acm.org/citation.cfm?id=1459449">potential in semantic-aware retrieval applications</a>.</p><p><strong>The role of deep learning</strong></p><p>The underlying details of the CBIR system analysed by <a href="https://arxiv.org/pdf/1902.02960.pdf">Carrie J. Cai et al.</a> are presented in detail by <a href="https://arxiv.org/pdf/1901.11112.pdf">Narayan Hedge et al.</a> in their study &#8220;<a href="https://arxiv.org/pdf/1901.11112.pdf">Similar Image Search for Histopathology: SMILY</a>&#8221;. The overview of the system is shown in Figure 2.</p><p>A convolutional neural network (CNN) algorithm is used for the embedding computation module shown in Figure 2, which act as the feature extractor in the system. The network condenses image information into a numerical feature vector, also known as an embedding vector. A database of images (in this case patches of pathology image slides) along with their numerical vectors were computed and stored using the pre-trained CNN algorithm. When a query image was selected for searching, the embedding of the query image is computed using the same CNN algorithm and compared with the vectors in the database to retrieve the most similar images.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!obvO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b833659-e763-49b2-8183-d9676a83c4fe_800x527.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!obvO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b833659-e763-49b2-8183-d9676a83c4fe_800x527.png 424w, https://substackcdn.com/image/fetch/$s_!obvO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b833659-e763-49b2-8183-d9676a83c4fe_800x527.png 848w, https://substackcdn.com/image/fetch/$s_!obvO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b833659-e763-49b2-8183-d9676a83c4fe_800x527.png 1272w, https://substackcdn.com/image/fetch/$s_!obvO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b833659-e763-49b2-8183-d9676a83c4fe_800x527.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!obvO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b833659-e763-49b2-8183-d9676a83c4fe_800x527.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6b833659-e763-49b2-8183-d9676a83c4fe_800x527.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!obvO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b833659-e763-49b2-8183-d9676a83c4fe_800x527.png 424w, https://substackcdn.com/image/fetch/$s_!obvO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b833659-e763-49b2-8183-d9676a83c4fe_800x527.png 848w, https://substackcdn.com/image/fetch/$s_!obvO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b833659-e763-49b2-8183-d9676a83c4fe_800x527.png 1272w, https://substackcdn.com/image/fetch/$s_!obvO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b833659-e763-49b2-8183-d9676a83c4fe_800x527.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Figure 2&#8202;&#8212;&#8202;Taken from &#8220;<a href="https://arxiv.org/pdf/1901.11112.pdf">Similar Image Search for Histopathology: SMILY&#8221; by Narayan Hegde et&nbsp;al.</a></figcaption></figure></div><p>Further, <a href="https://arxiv.org/pdf/1901.11112.pdf">Narayan Hedge et al.</a> explains that the CNN architecture is based on a <a href="https://arxiv.org/pdf/1404.4661.pdf">deep ranking network</a> presented by <a href="https://arxiv.org/pdf/1404.4661.pdf">Jiang Wang et al.</a>, that consists of convolutional and pooling layers together with concatenation operations. During the training stage of the network, sets of 3 images were fed: a reference image of a certain class, a second image of the same class and the third image of a totally different class. The loss function was modelled such that the network assigns a lower distance between the embedding of the images coming from the same class than the embedding of the image of the different class. Thus the image from the different class helps strengthen the similarity between the embeddings of images from the same class.</p><p>The network was trained using a large dataset of natural images (e.g. dogs, cats, trees etc) rather than pathology images. Having learnt to distinguish similar natural images from dissimilar ones, the same trained architecture was directly applied for feature extraction of pathology images. This can be seen as a strength of neural networks in applications with limited data, commonly termed as <a href="http://openaccess.thecvf.com/content_cvpr_2014/html/Oquab_Learning_and_Transferring_2014_CVPR_paper.html">transfer learning</a>.</p><p>The CNN feature extractor computed 128-sized vectors for each image and <a href="https://en.wikipedia.org/wiki/Euclidean_distance">L2 distance</a> was chosen to be the comparison function between vectors. <a href="https://arxiv.org/pdf/1901.11112.pdf">Narayan Hedge et al.</a> visualised all the embeddings produced from the dataset of pathology image slides using t-SNE as shown in Figure 3. (a) shows embeddings coloured by organ site and (b) shows embeddings coloured by histologic features.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iMoz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119c5b0e-aafb-4e76-8ef0-f4dc25d63b12_800x346.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iMoz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119c5b0e-aafb-4e76-8ef0-f4dc25d63b12_800x346.png 424w, https://substackcdn.com/image/fetch/$s_!iMoz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119c5b0e-aafb-4e76-8ef0-f4dc25d63b12_800x346.png 848w, https://substackcdn.com/image/fetch/$s_!iMoz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119c5b0e-aafb-4e76-8ef0-f4dc25d63b12_800x346.png 1272w, https://substackcdn.com/image/fetch/$s_!iMoz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119c5b0e-aafb-4e76-8ef0-f4dc25d63b12_800x346.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iMoz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119c5b0e-aafb-4e76-8ef0-f4dc25d63b12_800x346.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/119c5b0e-aafb-4e76-8ef0-f4dc25d63b12_800x346.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iMoz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119c5b0e-aafb-4e76-8ef0-f4dc25d63b12_800x346.png 424w, https://substackcdn.com/image/fetch/$s_!iMoz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119c5b0e-aafb-4e76-8ef0-f4dc25d63b12_800x346.png 848w, https://substackcdn.com/image/fetch/$s_!iMoz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119c5b0e-aafb-4e76-8ef0-f4dc25d63b12_800x346.png 1272w, https://substackcdn.com/image/fetch/$s_!iMoz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F119c5b0e-aafb-4e76-8ef0-f4dc25d63b12_800x346.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Figure 3&#8202;&#8212;&#8202;Taken from &#8220;<a href="https://arxiv.org/pdf/1901.11112.pdf">Similar Image Search for Histopathology: SMILY&#8221; by Narayan Hegde et&nbsp;al</a>.</figcaption></figure></div><p>In fact, similar architectures and training techniques to deep ranking networks can be widely seen in deep learning literature such as S<a href="https://www.cs.cmu.edu/~rsalakhu/papers/oneshot1.pdf">iamese Neural Networks</a> and have been even applied for <a href="https://www.cs.toronto.edu/~ranzato/publications/taigman_cvpr14.pdf">face detection applications</a>.&nbsp;<br>Now, coming back to CBIR systems, we see that deep learning could help in reducing the semantic gap (discussed above) as these learning-based approaches are proven to be impressive in identifying important features even in noisy natural images.</p><p><strong>Application and impact in healthcare</strong></p><p>So far we looked at what goes into CBIR systems and the potential of deep learning in overcoming the crucial challenge of the semantic gap. <strong>But how applicable is CBIR in healthcare?</strong> And can we clearly quantify the impact?</p><p><a href="https://www.sciencedirect.com/science/article/pii/S1386505603002119">Henning M&#252;ller et al.</a> states that the radiology department of the University Hospital of Geneva alone produced more than 12,000 images a day in 2002 with cardiology being the second-largest producer of digital images. The <a href="https://www.sciencedirect.com/science/article/pii/S1386505603002119">study</a> further argues that the goal of medical information systems should be to &#8220;deliver the needed information at the right time, the right place to the right persons in order to improve the quality and efficiency of care processes.&#8221; Thus in clinical decision making, support techniques such as case-based reasoning or evidence-based medicine are desired to benefit from CBIR systems.</p><p>No matter how sound the technology is, integration of these systems in real clinical practices demands significantly more work, especially in <strong>building trust between the system and its users.</strong> This is where the study of <a href="https://arxiv.org/pdf/1902.02960.pdf">Carrie J. Cai et al.</a> stands strong by being very flexible with user&#8217;s relevance feedback, which provides the ability to the user to rate the returned results of the system. <a href="https://www.sciencedirect.com/science/article/pii/S1386505603002119">Henning M&#252;ller et al.</a> also talks about the importance of relevance feedback in an interactive setting for improving the system results and also to increase the adaptability of the CBIR systems.</p><p>Another major point is quantifying the impact of these systems which is crucial for the adaptation and advancement of this field of research. After a user study with 12 pathologists, <a href="https://arxiv.org/pdf/1902.02960.pdf">Carrie J. Cai et al.</a> claims that with their CBIR system users were able to increase the diagnostic utility of the system with less effort. Also, results show <strong>increased trust, enhanced mental support for the users and improved likelihood</strong> to use the system in real clinical practices in the future. But diagnostic accuracy (although empirically stated to remain the same) was not evaluated in this study as it was out of scope.</p><p>Looking forward, it is evident that continuous collaboration of medical experts and AI system developers is required in both identifying the use cases and evaluating the impact of AI applications in healthcare. Additionally, the research community should focus on the development of open test datasets and query standards in order to set benchmarks for CBIR applications. This would be immensely helpful to drive the research forward with clear ideas of the contributions.</p><p>This article was originally published in <a href="https://thegradient.pub/subscribe/">The Gradient</a>. Hope you enjoyed reading.</p><p><em>Special thanks to Hugh Zhang, Max Smith and Nancy Xu for their insight and comments.</em></p>]]></content:encoded></item><item><title><![CDATA[Getting Rich and Finding Happiness with Naval Ravikant]]></title><description><![CDATA[The moment I saw this recent episode of &#8216;Joe Rogan Experience&#8217; on my podcast list, I knew it was going to be a good one. Many times I have&#8230;]]></description><link>https://www.mirantha.com/p/getting-rich-and-finding-happiness-with-naval-ravikant-5e42783a0e1</link><guid isPermaLink="false">https://www.mirantha.com/p/getting-rich-and-finding-happiness-with-naval-ravikant-5e42783a0e1</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Sat, 08 Jun 2019 19:42:28 GMT</pubDate><enclosure url="https://substackcdn.com/image/youtube/w_728,c_limit/3qHkcs3kG44" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>The moment I saw this recent episode of &#8216;Joe Rogan Experience&#8217; on my podcast list, I knew it was going to be a good one. Many times I have been fascinated by the brilliant ideas portrayed by Naval on life and our society, and this podcast was no exception. I enjoyed it so much that I decided to compile a summary of the ideas that I found quite interesting. Hope you enjoy reading!</em></p><div class="captioned-image-container"><figure><div id="youtube2-3qHkcs3kG44" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;3qHkcs3kG44&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/3qHkcs3kG44?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><figcaption class="image-caption"><em>The podcast</em></figcaption></figure></div><h3>Life</h3><p>People don&#8217;t want to start over. You have to willing to be a fool and kind of have that beginner&#8217;s mind and go back to the beginning to start over. If you&#8217;re not doing that you&#8217;re just getting older.</p><h3>Social Media</h3><p>(In social media), rather than you looking at yourself, you&#8217;re looking at how other people look at you.</p><p>It&#8217;s kind of a disease. Because social media is making celebrities of all of us. And celebrities are the most miserable people in the world. They have this strong self-image that gets built up by compliments, and it doesn&#8217;t take many insults to cancel out a lot of compliments. And then you&#8217;re carrying around this big weighty image. It is very easy to be attacked.</p><h3>Success</h3><p>You want to be rich and anonymous, not poor and famous.</p><p>You don&#8217;t want to be the guy who succeeds in life while being highly stressed, unhappy and leaving a trail of emotional wreckage with you and your loved ones. You want to get there calmly, quietly and without struggle.</p><h3>Desire</h3><p>Desire is a contract you make with yourself to be unhappy until you get what you want. Don&#8217;t have too many.</p><p>Pick your one overwhelming desire. It&#8217;s okay to suffer over that one. But on all the others, you want to let them go, so you can be calm, peaceful and relaxed.</p><h3>Business</h3><p>If you want to be effective in business, you need a clear, calm, cool and collective mind.</p><p>We live in an age of infinite leverage. Your actions can be multiplied by a thousand fold. Because of that, the impacts of good decision making is much higher than it used to be.</p><p>A clear mind leads to better judgement, leads to better outcomes. So if you want to operate at peak performance, you have to learn how to tame your mind, just like you have to learn how to tame your body.</p><h3>Work</h3><p>We like to view the world as linear. Which is saying, I&#8217;m gonna put in 8 hours of work, I&#8217;m gonna get back 8 hours of output. It doesn't work that way.</p><p>Outputs are non-linear based on the quality of work that you put in. The right way to work is like a lion. You and I are not like cows, we are not meant to graze all day. We are meant to hunt like lions. Machines are meant to work 9&#8211;5, not humans.</p><p>You are not gonna get rich renting out your time. You need to have equity to gain your financial freedom.</p><p>The idea that we are all factory like cogs in a machine, who are specialised and have to do things by memorisation or instruction, is gonna go away and we are gonna go back to being small groups of creative bands of individuals setting out to do missions. And when those missions are done, we are gonna collect our money, we get rated, and then we rest and reassess until we are ready for the next sprint.</p><h3>Automation</h3><p>Automation has been happening since the dawn of time. When electricity came along, that put a lot of people out of work. What it does is, it frees people up for new creative work. So the question is not &#8216; is automation is gonna eliminate jobs?&#8217; There is no finite number of jobs. Obviously new jobs are being created. They&#8217;re usually more creative jobs. So the question is &#8216; how quickly is this transition going to happen? And what kind of jobs will be eliminated and what kind of jobs will be created? It&#8217;s impossible looking forward to predicting what kinds of jobs will be created.</p><h3>Capitalise</h3><p>The correct criticism of capitalism is when it does not provide equal opportunity. But people confuse this with equal outcome. When you have equal outcome, that can only be enforced by violence. Because free people make different choices, and when they make different choices, they have different outcomes.</p><p>Socialism comes from the heart. Capitalism comes from the head.</p><h3>Technology</h3><p>Technology empowers the individual, the individual means that you have the break down of family structure and religion and it does mean that there is a leftward shift to it. Technology leads the world left.</p><h3>Politics</h3><p>If all your believes line up into one political party, if all your believes are the same as your neighbours and friends, you are not a clear thinker. Your beliefs are socialised, they are taken from other people. So if you want to be a clear thinker you cannot pay attention to politics, it will destroy your ability to think.</p><h3>Modern society</h3><p>For most of modern life, all of our diseases are diseases of abundance. Not diseases of scarcity.</p><p>We are over-exposed to everything. So the way to survive in modern society is to be an ascetic. It is to retreat from society, there is too much society everywhere you go. Everyone is trying to program everybody. The only solution is to turn it off.</p><p>All of man&#8217;s problems arise because he cannot sit by himself in a room for 30 minutes alone.</p><h3>Peace and Happiness</h3><p>Peace is happiness at rest. Happiness is peace in motion. You can convert peace to happiness anytime you want. But peace is what you want most of the time.</p><p>The way we think you get peace is by resolving all your external problems. But there are unlimited external problems. So the only way to actually to get peace is on the inside by giving up this idea of problems.</p><p>It&#8217;s easier to change yourself than to change the world.</p><h3>Meaning of&nbsp;life</h3><p>The question (of the meaning of life) is more interesting than the answer.</p><p>If there was a single answer we will not be free. We would be trapped. Because then we would all have to live to that answer.</p><p>The fundamental delusion is thinking that there is something out there that will make you happy and feel free forever&#8202;&#8212;&#8202;there is. Its called death.</p><h3>Retirement</h3><p>Retirement is when you stop sacrificing today for some imaginary tomorrow.</p><p>Way to get out of the competition trap is by being authentic. Way to retire is to actually find the thing that you know how to do better than anybody else. And you know how to do better than anybody else because you love to do it. So nobody can compete with you.</p><p>Then figure out how to map that to what society actually wants. Apply some leverage, put your name on it so you take the risks but you gain the rewards, have ownership and equity in what you do and just crank it up.</p><h3>Reality and&nbsp;life</h3><p>Your real resume is a catalogue of all your suffering. You have to do hard things anyway to create meaning in life. Making money is a fine one.</p><p>Life is really a single player game. It&#8217;s all going on your head. Whatever you think you believe would very much shape your reality.</p><p>The world just reflects your own feelings back at you. Reality is neutral. Reality has no judgements. It&#8217;s your chiose how you see your senses.</p><blockquote><p>Every man has two lives. And the second starts when he realises he has just one.&#8202;&#8212;&#8202;Confucius</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CZII!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad57d290-c14e-4551-9ab4-54be043bfe2a_800x533.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CZII!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad57d290-c14e-4551-9ab4-54be043bfe2a_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!CZII!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad57d290-c14e-4551-9ab4-54be043bfe2a_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!CZII!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad57d290-c14e-4551-9ab4-54be043bfe2a_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!CZII!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad57d290-c14e-4551-9ab4-54be043bfe2a_800x533.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CZII!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad57d290-c14e-4551-9ab4-54be043bfe2a_800x533.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ad57d290-c14e-4551-9ab4-54be043bfe2a_800x533.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CZII!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad57d290-c14e-4551-9ab4-54be043bfe2a_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!CZII!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad57d290-c14e-4551-9ab4-54be043bfe2a_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!CZII!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad57d290-c14e-4551-9ab4-54be043bfe2a_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!CZII!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad57d290-c14e-4551-9ab4-54be043bfe2a_800x533.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p><em>If you have read this post so far, I hope that you find these ideas inspiring as much as I did. And as always, it was a pleasure listening to <a href="https://medium.com/u/67f5049293c7">Naval Ravikant</a>.</em></p><p><em>Thanks for reading!</em></p>]]></content:encoded></item><item><title><![CDATA[How to Make Your Data Science Presentation Great and Memorable]]></title><description><![CDATA[Recall the last data science talk that inspired you? The one you thought that had an impressive impact. Was it only the mathematical&#8230;]]></description><link>https://www.mirantha.com/p/how-to-make-your-data-science-presentation-great-and-memorable-8fdb07978a7e</link><guid isPermaLink="false">https://www.mirantha.com/p/how-to-make-your-data-science-presentation-great-and-memorable-8fdb07978a7e</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Mon, 13 May 2019 07:39:22 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/4c033680-8ae6-41bf-9eb6-add0854da82d_800x533.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tByM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd60d06e5-bf78-4f33-8f85-4709f52df689_800x533.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tByM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd60d06e5-bf78-4f33-8f85-4709f52df689_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!tByM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd60d06e5-bf78-4f33-8f85-4709f52df689_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!tByM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd60d06e5-bf78-4f33-8f85-4709f52df689_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!tByM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd60d06e5-bf78-4f33-8f85-4709f52df689_800x533.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tByM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd60d06e5-bf78-4f33-8f85-4709f52df689_800x533.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d60d06e5-bf78-4f33-8f85-4709f52df689_800x533.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tByM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd60d06e5-bf78-4f33-8f85-4709f52df689_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!tByM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd60d06e5-bf78-4f33-8f85-4709f52df689_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!tByM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd60d06e5-bf78-4f33-8f85-4709f52df689_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!tByM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd60d06e5-bf78-4f33-8f85-4709f52df689_800x533.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@taylor_grote?utm_source=medium&amp;utm_medium=referral">Taylor Grote</a> on&nbsp;<a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p><em><strong>Recall the last data science talk that inspired you? The one you thought that had an impressive impact. Was it only the mathematical technicalities or the state-of-the-art accuracies that caught your attention?</strong></em></p><p><em><strong>Surely not. Effective presentation techniques play a major role in taking an idea to a wider audience. And having the skills to deliver a memorable presentation is vital to any researcher.</strong></em></p><p><em><strong>Great presentations help you to build a brand for your research and yourself, which will guide you immensely in your academic or professional career prospects.</strong></em></p><p>This post guides you through some of the key points that would make a data science research presentation more effective. I start by discussing five generic ideas and dive a bit deeper into one vital point, which is the storyline of your presentation.</p><ol><li><p><strong>Good structure. </strong>A good presentation takes the audience on a journey step by step. And at each step as you progress, your ideas should reveal an ultimate goal that is clear to the listener. A common structure always starts with an introduction about yourself and your research problem. It is important to set a clear scene initially so you can build your story from there. The storyline, which is in fact the most important feature of a good presentation will be discussed in detail later in the post.</p></li><li><p><strong>Professional slides.</strong> Slides reinforce your story. You cannot underestimate the influence of quality slides on an audience. Here, it is important to keep in mind that your audience would tend to read everything on your slides while listening to you. So choose wisely what you want on your slides. Otherwise, it can distract your listeners and confuse them in the end. A lot of text on the slides is usually a bad idea. Effective graphics are proven to grab attention and help clear understanding. Keep your slides uncluttered as much as possible.</p></li><li><p><strong>Technical contributions.</strong> The ultimate goal of any research is the contribution you make to an industry or knowledge in general. So you want to emphasise on the technical contributions you were able to deliver with your work. Again this is an important part of your storyline which is discussed further in this post.</p></li><li><p><strong>Clear and entertaining delivery.</strong> No matter how good your material is, the way you deliver it would decide whether your presentation is going to be memorable or not. Clear and correct use of language is important together with good pronunciation and phase. Make sure that you are audible to everyone and do not forget to smile.</p></li><li><p><strong>Confident speaker.</strong> Some might argue that confidence depends on each person&#8217;s character, but there are factors that you can use to improve your confidence levels walking into a presentation. Good preparation before the presentation is utmost important here. Make sure you practice delivering the talk at least several times before going on stage. Trust me, it won&#8217;t be a waste of time and it would enhance your confidence more than you think!</p></li></ol><h3>Storyline in&nbsp;key</h3><p>Now let&#8217;s focus on one of the most crucial points when preparing and delivering your research presentation, the storyline. This decides the number of ears you will have throughout your presentation.</p><p>Below are the key areas you want to build around in order. Of course, some topics are interchangeable according to your preference, but this an effective outline if you are looking for one to guide your presentation preparation.</p><ol><li><p><strong>Setting the scene.</strong> This should be the first and foremost target. What is the problem you are addressing in your research? And why is it timely, relevant and interesting? Why does it matter? Make this setting very clear, and you have the attention of your audience grabbed. It should form the basis of what you are trying to convey. And the purpose of your efforts. When listeners can relate to your setting, it is hard to ignore you.</p></li><li><p><strong>Focus on your hypothesis/solution for your setting.</strong> Soon following the setting, you can get your audience to focus on your hypothesis/solution for the problem you are addressing. This is vital because now they see instantly what you are proposing, and they are keen to know more. So then you can guide them to the next steps of revealing your methods and procedures.</p></li><li><p><strong>Methodology/approach/work done.</strong> Now you explain your work towards achieving what you claimed in the previous step. Make sure to be concise. Nobody likes math formulas or deep technical details. Also avoid the urge the show-off your math or coding skills during this step. Simply present the steps you have taken on a higher level. If anyone is interesting to dig deep into the technicalities, they will follow up later. Flow charts and graphics are highly effective in this step. Paragraphs of text is a mistake.</p></li><li><p><strong>Context/related work. </strong>Now some might argue that this point should come before the methodology. In some cases, it can be true. But my argument is that the attention span of the audience will be high at the beginning of the talk. And that is where you have to get your work in the spotlight. If you do a good job at it, you anyway have the audience when you go into this step. Since they are eager to know what you have done, presenting related work, in the beginning, might bore them up without cutting to the chase. Nevertheless, context is important and you have to make your approach stand out from the existing techniques and ideas.</p></li><li><p><strong>Contributions made and results.</strong> Highlight your impact. Show your outcomes and results of your applications. Point out the contributions you have made to the knowledge and understanding of the field. This is where you strengthen your stand in the solution you have proposed.</p></li><li><p><strong>Outlook/open questions/future work.</strong> Eventually, keep a note on the broader arena that your efforts showcase. Now one point to ponder upon here is that, do you mention any limitations of your research if any? My opinion is yes. This is the place to convey your weaknesses and this will come out as a positive impression on your work. Also, open up questions for future work with your particular approach and emphasise the potential impact.</p></li></ol><p>I hope this post provides guidance to anyone looking to improve their presentation skills, especially in the highly technical field of data science. Personally, this is something I have spent considerable time on improving myself because I strongly believe in the impact of effective presentations for your research. Executed properly, these skills would help you boost your career as a researcher or data scientist.</p><p><em>I would like to hear your thoughts on this as well. Reach out to me on <a href="https://twitter.com/MJayatilake">Twitter</a> or comment below.</em></p><p><em>Thanks for reading.</em></p>]]></content:encoded></item><item><title><![CDATA[Graphs in Machine Learning?]]></title><description><![CDATA[A walkthrough of representation learning on graphs.]]></description><link>https://www.mirantha.com/p/graphs-in-machine-learning-87feb2ffa734</link><guid isPermaLink="false">https://www.mirantha.com/p/graphs-in-machine-learning-87feb2ffa734</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Wed, 27 Mar 2019 18:04:36 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/2dfbdc4a-1073-4ebb-94a4-4c533a69e8cc_800x1200.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A walkthrough of representation learning on graphs.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dOaJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8897fa-9a6c-414c-a92f-2e6712a33beb_800x1200.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dOaJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8897fa-9a6c-414c-a92f-2e6712a33beb_800x1200.jpeg 424w, https://substackcdn.com/image/fetch/$s_!dOaJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8897fa-9a6c-414c-a92f-2e6712a33beb_800x1200.jpeg 848w, https://substackcdn.com/image/fetch/$s_!dOaJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8897fa-9a6c-414c-a92f-2e6712a33beb_800x1200.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!dOaJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8897fa-9a6c-414c-a92f-2e6712a33beb_800x1200.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dOaJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8897fa-9a6c-414c-a92f-2e6712a33beb_800x1200.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd8897fa-9a6c-414c-a92f-2e6712a33beb_800x1200.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dOaJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8897fa-9a6c-414c-a92f-2e6712a33beb_800x1200.jpeg 424w, https://substackcdn.com/image/fetch/$s_!dOaJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8897fa-9a6c-414c-a92f-2e6712a33beb_800x1200.jpeg 848w, https://substackcdn.com/image/fetch/$s_!dOaJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8897fa-9a6c-414c-a92f-2e6712a33beb_800x1200.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!dOaJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8897fa-9a6c-414c-a92f-2e6712a33beb_800x1200.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@diesektion?utm_source=medium&amp;utm_medium=referral">Robert Anasch</a> on&nbsp;<a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>In the path of building machines to understand the real world we live in, it becomes evident that the ability to just identify individual items or recognise a pattern out of the given set of samples is merely a small part of the puzzle.</p><p>For instance, take the common application of machine learning to train a model to identify classes of objects in a set of given images. We know that state-of-the-art models are able to identify the different objects to almost the level of humans in those images.</p><p>But do they really understand what it sees? Or can they reason about the objects they detect? Do they really understand? No.</p><p>Towards the goal of building intelligence, it is clear that the systems should have the ability to formulate far more complex models of the world from the individual items they detect/sense.</p><p>How do we know that this is what should happen? Well, because that&#8217;s what we do. Humans. The best evidence of intelligence that we know of in the world.</p><p>A model can be interpreted as a representation of a thing or a set of things. Narrowing down to our area of focus, a model can be seen as a graph.</p><p>Taking the same example of detecting objects in an image, imagine we detect an instance of a dog and a person in a given image. Now a trained model will easily detect the dog and the person individually. But if it was us, after seeing the dog and the person in the image we naturally go further to see that, oh, that must be the pet of that person. And normally people and dogs have a good relationship.</p><p>Now what we did there was, we made sense. We reasoned. This phenomenon of &#8216;making sense&#8217; can be interpreted as an act of knowledge. Knowledge about the interactions between the detected object and past experience that we have seen these objects together before.</p><p>This infers that we need to integrate knowledge into our systems if we want them to build models of the world.</p><p>As we know, recent advancements in technology have gathered a huge magnitude of data about us and the world we live in. And the more data we collect, people have thought of ways to organise and manage this data, specifically in methods of graphs. It turns out that many points of data can be represented symbolically in ways defined by logic.</p><p>With the surge in the success of machine learning, integration of knowledge is clearly identified as a path to improvement. Hence more research interest has been gathered around the areas of using graphs in the pipelines of machine learning, that turns out to be quite promising.</p><p>But one challenge in this quest is that the machine learning approaches and the graph building approaches, don&#8217;t specifically speak the same language. In other terms, machine learning prevails in the numeric space, whereas graphs prevail in the symbolic space.</p><p>In the field of machine learning, several recent research attempts have taken strides towards trying to encode the graph structures in machine-readable forms.</p><p>Even though traditional methods have taken more statistical approaches towards this goal, it is seen that more and more approaches of automatically learning these embeddings have emerged more triumphant.</p><p>The following few posts aim to synthesise these concepts and present an overview of the different approaches of representation learning on graphs. The ideas will be discussed as a walk-through of the paper by Hamilton <em>et al.</em> called &#8216;<a href="https://arxiv.org/abs/1709.05584">Representation Learning on Graphs: Methods and Applications</a>&#8217;.</p><p>The discussion is divided into two main sections, namely, Embedding of Nodes and Embedding of Subgraphs.</p><p><em>The notions throughout the explanations are as follows;</em></p><p><em>Input is an undirected graph <strong>G = (V, E)</strong>, associated binary adjacency matrix <strong>A</strong></em></p><p><em>Node attribute matrix X &#8712; R m&#215;|V|</em></p><p><em>Output vector z &#8712; Rd&nbsp;, where d &lt;&lt; |V|</em></p><p><em>The goal is to use A and X to map a node/subgraph to a vector z.</em></p><p><em>You can avoid the paywall and read the rest that follows this post using the links below&nbsp;:)</em></p><p><strong><a href="https://mirantha.com/2019/03/10/embedding-of-nodes/">See the second post that follows this&#8202;&#8212;&#8202;Embedding of Nodes</a><br><a href="https://mirantha.com/2019/03/12/embedding-of-subgraphs/">And the third post in this series&#8202;&#8212;&#8202;Embedding of Subgraphs</a></strong></p><p>Thanks for reading.</p>]]></content:encoded></item><item><title><![CDATA[Solving the Mystery of Backpropagation]]></title><description><![CDATA[The algorithm is quite the workhorse in the majority of widely used, human-level surpassing learning systems based on neural networks. It&#8230;]]></description><link>https://www.mirantha.com/p/solving-the-mystery-of-backpropagation-73b18cae8e40</link><guid isPermaLink="false">https://www.mirantha.com/p/solving-the-mystery-of-backpropagation-73b18cae8e40</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Sun, 24 Feb 2019 10:50:08 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/8e18ee8d-4ff1-47c7-bdae-909aa7cfef05_800x1201.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZU--!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e236f59-531f-46f5-8c6d-bdcb88ece790_800x1201.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZU--!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e236f59-531f-46f5-8c6d-bdcb88ece790_800x1201.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ZU--!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e236f59-531f-46f5-8c6d-bdcb88ece790_800x1201.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ZU--!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e236f59-531f-46f5-8c6d-bdcb88ece790_800x1201.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ZU--!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e236f59-531f-46f5-8c6d-bdcb88ece790_800x1201.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZU--!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e236f59-531f-46f5-8c6d-bdcb88ece790_800x1201.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4e236f59-531f-46f5-8c6d-bdcb88ece790_800x1201.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZU--!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e236f59-531f-46f5-8c6d-bdcb88ece790_800x1201.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ZU--!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e236f59-531f-46f5-8c6d-bdcb88ece790_800x1201.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ZU--!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e236f59-531f-46f5-8c6d-bdcb88ece790_800x1201.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ZU--!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e236f59-531f-46f5-8c6d-bdcb88ece790_800x1201.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@cristina_gottardi?utm_source=medium&amp;utm_medium=referral">Cristina Gottardi</a> on&nbsp;<a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>The algorithm is quite the workhorse in the majority of widely used, human-level surpassing learning systems based on neural networks. It was popularised by the 1986 paper published in Nature authored by <a href="http://en.wikipedia.org/wiki/David_Rumelhart">David Rumelhart</a>, <a href="http://www.cs.toronto.edu/~hinton/">Geoffrey Hinton</a>, and <a href="http://en.wikipedia.org/wiki/Ronald_J._Williams">Ronald Williams</a>.</p><p>The original paper concludes, &#8220;applying the procedure to various tasks shows that interesting internal representations can be constructed by gradient descent in weight-space, and this suggests that it is worth looking for more biologically plausible ways of doing gradient descent in neural networks&#8221;. Well, backpropagation might not exactly be what&#8217;s happening in our natural neuron networks, but it surely presented great results in mathematical learning systems. And this would give birth to an exciting new era of Artificial Intelligence.</p><p>Backpropagation algorithm deals with a systematic method of continuously adjusting the internal parameters (weights and biases) of a neural network so that the error in the predictions made by the network will be minimum. Understanding of the inside workings of it seems vital if you are looking to work with complex applications of machine learning and deep learning.</p><p>The most clever thing about backpropagation seems to be the method used to calculate the partial derivatives of the cost function with respect to each weight and bias in the network. This paves the way to ponder even how this elegant algorithm was found for the first time.</p><p>But if you carefully look at the behaviour of the neural network, there might be a systematic way of deducing the mystery of the derivatives.</p><p>Imagine the case of changing a single weight <em>w</em> value by a small factor <em>&#916;w</em> as shown below;</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Oy0Z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b33b732-a1ef-45aa-844e-a4303cd7cc34_800x356.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Oy0Z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b33b732-a1ef-45aa-844e-a4303cd7cc34_800x356.png 424w, https://substackcdn.com/image/fetch/$s_!Oy0Z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b33b732-a1ef-45aa-844e-a4303cd7cc34_800x356.png 848w, https://substackcdn.com/image/fetch/$s_!Oy0Z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b33b732-a1ef-45aa-844e-a4303cd7cc34_800x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Oy0Z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b33b732-a1ef-45aa-844e-a4303cd7cc34_800x356.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Oy0Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b33b732-a1ef-45aa-844e-a4303cd7cc34_800x356.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0b33b732-a1ef-45aa-844e-a4303cd7cc34_800x356.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Oy0Z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b33b732-a1ef-45aa-844e-a4303cd7cc34_800x356.png 424w, https://substackcdn.com/image/fetch/$s_!Oy0Z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b33b732-a1ef-45aa-844e-a4303cd7cc34_800x356.png 848w, https://substackcdn.com/image/fetch/$s_!Oy0Z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b33b732-a1ef-45aa-844e-a4303cd7cc34_800x356.png 1272w, https://substackcdn.com/image/fetch/$s_!Oy0Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b33b732-a1ef-45aa-844e-a4303cd7cc34_800x356.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p>Now this change will affect the immediate activation involving that weight, changing it by <em>&#916;a</em>.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fmWc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee01257-eab9-4bbb-bfc6-de464b65df02_800x338.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fmWc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee01257-eab9-4bbb-bfc6-de464b65df02_800x338.png 424w, https://substackcdn.com/image/fetch/$s_!fmWc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee01257-eab9-4bbb-bfc6-de464b65df02_800x338.png 848w, https://substackcdn.com/image/fetch/$s_!fmWc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee01257-eab9-4bbb-bfc6-de464b65df02_800x338.png 1272w, https://substackcdn.com/image/fetch/$s_!fmWc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee01257-eab9-4bbb-bfc6-de464b65df02_800x338.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fmWc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee01257-eab9-4bbb-bfc6-de464b65df02_800x338.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3ee01257-eab9-4bbb-bfc6-de464b65df02_800x338.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fmWc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee01257-eab9-4bbb-bfc6-de464b65df02_800x338.png 424w, https://substackcdn.com/image/fetch/$s_!fmWc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee01257-eab9-4bbb-bfc6-de464b65df02_800x338.png 848w, https://substackcdn.com/image/fetch/$s_!fmWc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee01257-eab9-4bbb-bfc6-de464b65df02_800x338.png 1272w, https://substackcdn.com/image/fetch/$s_!fmWc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ee01257-eab9-4bbb-bfc6-de464b65df02_800x338.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The change of <em>&#916;a</em> will in-turn affect all the other nodes in the following layer.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oRHs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ab5d58-c071-4d1c-a25a-4cf3431f4425_800x297.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oRHs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ab5d58-c071-4d1c-a25a-4cf3431f4425_800x297.png 424w, https://substackcdn.com/image/fetch/$s_!oRHs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ab5d58-c071-4d1c-a25a-4cf3431f4425_800x297.png 848w, https://substackcdn.com/image/fetch/$s_!oRHs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ab5d58-c071-4d1c-a25a-4cf3431f4425_800x297.png 1272w, https://substackcdn.com/image/fetch/$s_!oRHs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ab5d58-c071-4d1c-a25a-4cf3431f4425_800x297.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oRHs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ab5d58-c071-4d1c-a25a-4cf3431f4425_800x297.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/48ab5d58-c071-4d1c-a25a-4cf3431f4425_800x297.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oRHs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ab5d58-c071-4d1c-a25a-4cf3431f4425_800x297.png 424w, https://substackcdn.com/image/fetch/$s_!oRHs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ab5d58-c071-4d1c-a25a-4cf3431f4425_800x297.png 848w, https://substackcdn.com/image/fetch/$s_!oRHs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ab5d58-c071-4d1c-a25a-4cf3431f4425_800x297.png 1272w, https://substackcdn.com/image/fetch/$s_!oRHs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48ab5d58-c071-4d1c-a25a-4cf3431f4425_800x297.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>And ultimately, passing through all the layers in a similar manner, <em>&#916;w</em> that started this entire change affects the final cost function.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IWLA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48dbe0fe-6c31-4d8a-967c-40ed8947d091_800x290.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IWLA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48dbe0fe-6c31-4d8a-967c-40ed8947d091_800x290.png 424w, https://substackcdn.com/image/fetch/$s_!IWLA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48dbe0fe-6c31-4d8a-967c-40ed8947d091_800x290.png 848w, https://substackcdn.com/image/fetch/$s_!IWLA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48dbe0fe-6c31-4d8a-967c-40ed8947d091_800x290.png 1272w, https://substackcdn.com/image/fetch/$s_!IWLA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48dbe0fe-6c31-4d8a-967c-40ed8947d091_800x290.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IWLA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48dbe0fe-6c31-4d8a-967c-40ed8947d091_800x290.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/48dbe0fe-6c31-4d8a-967c-40ed8947d091_800x290.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IWLA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48dbe0fe-6c31-4d8a-967c-40ed8947d091_800x290.png 424w, https://substackcdn.com/image/fetch/$s_!IWLA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48dbe0fe-6c31-4d8a-967c-40ed8947d091_800x290.png 848w, https://substackcdn.com/image/fetch/$s_!IWLA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48dbe0fe-6c31-4d8a-967c-40ed8947d091_800x290.png 1272w, https://substackcdn.com/image/fetch/$s_!IWLA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48dbe0fe-6c31-4d8a-967c-40ed8947d091_800x290.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Now, this we can think of it as a forward propagation of change. In other terms, we can represent the final change in the cost of the network in terms of the first change in weights we manipulated.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YO9q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdf4344e-c589-4f61-9f0e-591144be79a3_530x184.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YO9q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdf4344e-c589-4f61-9f0e-591144be79a3_530x184.png 424w, https://substackcdn.com/image/fetch/$s_!YO9q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdf4344e-c589-4f61-9f0e-591144be79a3_530x184.png 848w, https://substackcdn.com/image/fetch/$s_!YO9q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdf4344e-c589-4f61-9f0e-591144be79a3_530x184.png 1272w, https://substackcdn.com/image/fetch/$s_!YO9q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdf4344e-c589-4f61-9f0e-591144be79a3_530x184.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YO9q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdf4344e-c589-4f61-9f0e-591144be79a3_530x184.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bdf4344e-c589-4f61-9f0e-591144be79a3_530x184.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YO9q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdf4344e-c589-4f61-9f0e-591144be79a3_530x184.png 424w, https://substackcdn.com/image/fetch/$s_!YO9q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdf4344e-c589-4f61-9f0e-591144be79a3_530x184.png 848w, https://substackcdn.com/image/fetch/$s_!YO9q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdf4344e-c589-4f61-9f0e-591144be79a3_530x184.png 1272w, https://substackcdn.com/image/fetch/$s_!YO9q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdf4344e-c589-4f61-9f0e-591144be79a3_530x184.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">The change in cost as a partial derivative of the weight change performed</figcaption></figure></div><p>Now calculating this change in cost looks like a task of figuring out this term <em>&#120597;C/&#120597;w</em>. And looking at how it has been propagated over the network, we can formulate it with respect to all the changes that took place after the first &#916;w.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CjT0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15cd4ed7-34cb-4eb8-91ba-72b63af69fdd_546x206.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CjT0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15cd4ed7-34cb-4eb8-91ba-72b63af69fdd_546x206.png 424w, https://substackcdn.com/image/fetch/$s_!CjT0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15cd4ed7-34cb-4eb8-91ba-72b63af69fdd_546x206.png 848w, https://substackcdn.com/image/fetch/$s_!CjT0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15cd4ed7-34cb-4eb8-91ba-72b63af69fdd_546x206.png 1272w, https://substackcdn.com/image/fetch/$s_!CjT0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15cd4ed7-34cb-4eb8-91ba-72b63af69fdd_546x206.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CjT0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15cd4ed7-34cb-4eb8-91ba-72b63af69fdd_546x206.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/15cd4ed7-34cb-4eb8-91ba-72b63af69fdd_546x206.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CjT0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15cd4ed7-34cb-4eb8-91ba-72b63af69fdd_546x206.png 424w, https://substackcdn.com/image/fetch/$s_!CjT0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15cd4ed7-34cb-4eb8-91ba-72b63af69fdd_546x206.png 848w, https://substackcdn.com/image/fetch/$s_!CjT0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15cd4ed7-34cb-4eb8-91ba-72b63af69fdd_546x206.png 1272w, https://substackcdn.com/image/fetch/$s_!CjT0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15cd4ed7-34cb-4eb8-91ba-72b63af69fdd_546x206.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The above expression shows the change in the most immediate activation due to <em>&#916;w.</em> And this will, in turn, affect the next activations following <em>&#916;a</em>.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HsJ0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03a51628-380b-4b48-88c2-2995ca56f290_626x170.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HsJ0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03a51628-380b-4b48-88c2-2995ca56f290_626x170.png 424w, https://substackcdn.com/image/fetch/$s_!HsJ0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03a51628-380b-4b48-88c2-2995ca56f290_626x170.png 848w, https://substackcdn.com/image/fetch/$s_!HsJ0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03a51628-380b-4b48-88c2-2995ca56f290_626x170.png 1272w, https://substackcdn.com/image/fetch/$s_!HsJ0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03a51628-380b-4b48-88c2-2995ca56f290_626x170.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HsJ0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03a51628-380b-4b48-88c2-2995ca56f290_626x170.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/03a51628-380b-4b48-88c2-2995ca56f290_626x170.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HsJ0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03a51628-380b-4b48-88c2-2995ca56f290_626x170.png 424w, https://substackcdn.com/image/fetch/$s_!HsJ0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03a51628-380b-4b48-88c2-2995ca56f290_626x170.png 848w, https://substackcdn.com/image/fetch/$s_!HsJ0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03a51628-380b-4b48-88c2-2995ca56f290_626x170.png 1272w, https://substackcdn.com/image/fetch/$s_!HsJ0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03a51628-380b-4b48-88c2-2995ca56f290_626x170.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Now here <em>&#916;a</em> can be replaced by the previous expression and you will get the expression below;</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fMcv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b2c9172-41b0-4098-9479-d13866a14825_648x204.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fMcv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b2c9172-41b0-4098-9479-d13866a14825_648x204.png 424w, https://substackcdn.com/image/fetch/$s_!fMcv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b2c9172-41b0-4098-9479-d13866a14825_648x204.png 848w, https://substackcdn.com/image/fetch/$s_!fMcv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b2c9172-41b0-4098-9479-d13866a14825_648x204.png 1272w, https://substackcdn.com/image/fetch/$s_!fMcv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b2c9172-41b0-4098-9479-d13866a14825_648x204.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fMcv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b2c9172-41b0-4098-9479-d13866a14825_648x204.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0b2c9172-41b0-4098-9479-d13866a14825_648x204.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fMcv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b2c9172-41b0-4098-9479-d13866a14825_648x204.png 424w, https://substackcdn.com/image/fetch/$s_!fMcv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b2c9172-41b0-4098-9479-d13866a14825_648x204.png 848w, https://substackcdn.com/image/fetch/$s_!fMcv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b2c9172-41b0-4098-9479-d13866a14825_648x204.png 1272w, https://substackcdn.com/image/fetch/$s_!fMcv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b2c9172-41b0-4098-9479-d13866a14825_648x204.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>We tend to see a pattern arising here. Starting from the first change in <em>&#916;w</em>, the following activations are affected by the change of activations of the previous layer. <em>&#8706;a/&#8706;a</em> begins to be a common term to every node we pass through. Now it's clear that for every node in every layer the pattern will prevail as below;</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qq4A!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facf52e1b-734b-4c76-9bf1-5e287111a45f_800x164.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qq4A!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facf52e1b-734b-4c76-9bf1-5e287111a45f_800x164.png 424w, https://substackcdn.com/image/fetch/$s_!qq4A!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facf52e1b-734b-4c76-9bf1-5e287111a45f_800x164.png 848w, https://substackcdn.com/image/fetch/$s_!qq4A!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facf52e1b-734b-4c76-9bf1-5e287111a45f_800x164.png 1272w, https://substackcdn.com/image/fetch/$s_!qq4A!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facf52e1b-734b-4c76-9bf1-5e287111a45f_800x164.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qq4A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facf52e1b-734b-4c76-9bf1-5e287111a45f_800x164.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/acf52e1b-734b-4c76-9bf1-5e287111a45f_800x164.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qq4A!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facf52e1b-734b-4c76-9bf1-5e287111a45f_800x164.png 424w, https://substackcdn.com/image/fetch/$s_!qq4A!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facf52e1b-734b-4c76-9bf1-5e287111a45f_800x164.png 848w, https://substackcdn.com/image/fetch/$s_!qq4A!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facf52e1b-734b-4c76-9bf1-5e287111a45f_800x164.png 1272w, https://substackcdn.com/image/fetch/$s_!qq4A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facf52e1b-734b-4c76-9bf1-5e287111a45f_800x164.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The <em>m, n, p</em>&#8230; terms here denote the different layers and the <em>&#8721;</em> denotes that we sum over all the node in each layer.</p><p>As as we recall the backpropagation algorithm is tasked with finding the partial derivatives of all the parameters, <em>i.e</em>. all the weights and biases with respect to the change in cost at the end of the network. So if we simplify the above equation, it suggests that we can formulate expressions for all the weights and biases in terms of the values of activations and weights. And this procedure of calculating the magnitude of change in every parameter, giving us a direction to follow if we want to reduce the entire magnitude of the cost in the network. The derivatives calculated gives the direction for the gradient descent. Pretty intuitive and elegant.</p><p>Now, is this how David Rumelhart <em>et. al. </em>came up with the solution for backpropagation? Well, maybe. But the most fascinating thing about this algorithm is that how these procedures of consistently adapting to the change in cost eventually result in a parameter space that emulates the representation of input data so that it could predict/identify new instances of the same distribution.</p><p>This fact is often seen as the mystery of backpropagation, that had made critiques to call deep neural networks a black box. But are they really?</p><p>My argument is that if we systematically assess and take time to actually think about what happens during an optimisation period of a neural network, maybe we might be able to wrap our heads around it. But the many levels and levels of abstraction seems to be too much sometimes for our short term memory to withhold and formulate an overall picture of the entire process. And this is what machines are helping us to do.</p><p>My closing thoughts are, is this the best that we could come up with though? Because if you think about it, the whole process of generalisation through backpropagation is a very data-hungry and time-consuming process. Will there be more optimum ways for machines to obtain a representation of the objects of the real world? Well, these questions are right at the frontier of research. And we have never been more excited to work on them.</p><p><em>The ideas presented in the post are directly influenced by the book <strong>&#8220;Neural Networks and Deep Learning&#8221;</strong> by Michael A. Nielsen. Highly recommended for anyone who wants to learn deep learning from scratch.</em></p><p><em>Thanks for reading.</em></p>]]></content:encoded></item><item><title><![CDATA[Why Start a Tech Podcast Now?]]></title><description><![CDATA[I woke up this morning and thought &#8220;hey, it&#8217;s been a little while since I wrote a blog post&#8221;. For the past few months I have been getting&#8230;]]></description><link>https://www.mirantha.com/p/why-start-a-tech-podcast-now-16a5b7c090f6</link><guid isPermaLink="false">https://www.mirantha.com/p/why-start-a-tech-podcast-now-16a5b7c090f6</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Sat, 20 Oct 2018 03:58:09 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/59bb20ae-7845-4ffa-b801-3f069019db09_800x533.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BZF5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3a010c5-4816-4bff-a9f7-fb8671fc6133_800x533.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BZF5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3a010c5-4816-4bff-a9f7-fb8671fc6133_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!BZF5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3a010c5-4816-4bff-a9f7-fb8671fc6133_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!BZF5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3a010c5-4816-4bff-a9f7-fb8671fc6133_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!BZF5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3a010c5-4816-4bff-a9f7-fb8671fc6133_800x533.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BZF5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3a010c5-4816-4bff-a9f7-fb8671fc6133_800x533.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f3a010c5-4816-4bff-a9f7-fb8671fc6133_800x533.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BZF5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3a010c5-4816-4bff-a9f7-fb8671fc6133_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!BZF5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3a010c5-4816-4bff-a9f7-fb8671fc6133_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!BZF5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3a010c5-4816-4bff-a9f7-fb8671fc6133_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!BZF5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3a010c5-4816-4bff-a9f7-fb8671fc6133_800x533.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@joaosilas?utm_source=medium&amp;utm_medium=referral">Jo&#227;o Silas</a> on&nbsp;<a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></div><p>I woke up this morning and thought &#8220;hey, it&#8217;s been a while since I wrote a blog post, hasn&#8217;t it?&#8221;. For the past few months I have been getting great feedback on the articles I had written on this blog, especially on the topics of Machine Learning/Deep learning and I highly value all your thoughts even though I couldn&#8217;t get back to some of you personally. I thoroughly enjoyed the process though!</p><p>As mentioned in my bio, I started writing this blog purely because I wanted to share what I was learning in the world of Tech and I was quite inspired when I saw others who did the same. And believe me when I say, you cannot underestimate the value of &#8216;SHARING&#8217;, especially in this exciting movement we call Tech. I encourage you to try it!</p><p>All in all I want to share a brand new step I&#8217;m taking along with my good friend and AI startup founder, <a href="https://medium.com/u/68deefdc5a6b">CD Athuraliya</a>, towards scaling this &#8216;sharing-what-we-learn&#8217; 10 times bigger. Yes, I used the word &#8216;share&#8217; too many times so far but I don&#8217;t care. I&#8217;m quite excited about this.</p><p>So Podcasts. I listen to great podcasts everyday. They have enabled me to gain valuable knowledge and ideas while on my daily commutes and leisure hours. Naming a few podcasts I love at the moment&#8202;&#8212;<a href="https://twitter.com/mastersofscale?lang=en">&#8202;Master of Scale</a> with <a href="https://medium.com/u/974d6573e9dc">Reid Hoffman</a> (my first introduction to podcasts), <a href="http://feeds.feedburner.com/TechmemeRideHome">Techmeme Ride Home</a> with <a href="https://twitter.com/brianmcc">Brian McCullough</a> (best everyday Tech updates), <a href="https://art19.com/shows/pivot-with-kara-swisher-and-scott-galloway">Pivot</a> with <a href="https://twitter.com/karaswisher">Kara Swisher</a> and <a href="https://twitter.com/profgalloway">Scott Galloway</a> and <a href="https://www.theverge.com/converge">Converge</a> with <a href="https://medium.com/u/b6e05447f2cf">Casey Newton</a>.</p><p>There&#8217;s clearly so much space to deliver great value via the stream of audio, so we decided to give it a try and launch a podcast ourselves! Neither CD nor I have any prior experience in audio recording, but we thought that would make it more interesting to learn it on the go. Wish us luck!</p><p>So the podcast is called TECH SAVVY. It is available now across 10 different platforms with the help of <a href="https://medium.com/u/644234e0a96d">Anchor</a>.&#8202;&#8212;&#8202;<em>Anchor is a great APP for anyone who wants to get into podcasts. Highly recommended!</em></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Yi8D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1112542-771b-403d-be64-e5de8e550418_800x1040.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Yi8D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1112542-771b-403d-be64-e5de8e550418_800x1040.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Yi8D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1112542-771b-403d-be64-e5de8e550418_800x1040.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Yi8D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1112542-771b-403d-be64-e5de8e550418_800x1040.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Yi8D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1112542-771b-403d-be64-e5de8e550418_800x1040.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Yi8D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1112542-771b-403d-be64-e5de8e550418_800x1040.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f1112542-771b-403d-be64-e5de8e550418_800x1040.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Yi8D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1112542-771b-403d-be64-e5de8e550418_800x1040.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Yi8D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1112542-771b-403d-be64-e5de8e550418_800x1040.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Yi8D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1112542-771b-403d-be64-e5de8e550418_800x1040.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Yi8D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1112542-771b-403d-be64-e5de8e550418_800x1040.jpeg 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><h4>What&#8217;s the&nbsp;goal?</h4><p>We don&#8217;t want to just report on Tech. In fact we want to take a <strong>deeper and a different look</strong> at what&#8217;s happening inside Tech. Each episode we would take one or more facts, either prominent or timely, and form it into a discussion, where will be talking about our own opinions and ideas related to it.</p><p>One of the most important distinctions we are trying to make is that (as mentioned in our very first episode as well), we will be focusing <strong>more on the</strong> <strong>creation of Tech, not just the consumption of Tech.</strong></p><p>So considering this I would suggest that the podcast is more targeted towards listeners who want to dig deeper, even upto a conceptual level of how Tech works. But we promise not to geek it out too much also at the same time. We&#8217;ll try&#8230;</p><p>Also you could expect a bit of a &#8216;startup&#8217; approach in our talks as well given that both CD and I have been working with tech startups for several years now.</p><p>All things considered, TECH SAVVY will be a place where we share almost all of our interests and motives related to Tech. From time to time we will try to invite some interesting personalities as well to talk in the podcast, so it won&#8217;t just be a our squeaky voices rambling every time.</p><p>And of course this doesn&#8217;t mean that I will stop writing on this blog. In fact I would be having more things to share along with this experience, which I&#8217;m totally psyched on!</p><p><em>So make sure you subscribe to TECH SAVVY with CD and Mirantha, available wherever you listen to your podcasts on!</em></p><p><em>And also we still have a lot to learn and improve, so make sure to drop in your constructive criticism and feedback if you listen to us. You can use the hashtag #techsavvypodcast anywhere on social media to reach out to us and also when sharing the content.</em></p><p><em>Thanks for reading and hope you enjoy the pod!</em></p>]]></content:encoded></item><item><title><![CDATA[Human Pose Estimations — From 2D to 3D]]></title><description><![CDATA[Identification of human body poses with mere 2D imagery had been a grand challenge in the field machine vision and with the explosion of&#8230;]]></description><link>https://www.mirantha.com/p/human-pose-estimations-from-2d-to-3d-14ec390d66ea</link><guid isPermaLink="false">https://www.mirantha.com/p/human-pose-estimations-from-2d-to-3d-14ec390d66ea</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Thu, 08 Mar 2018 08:28:08 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/49dba2c8-1468-45c3-ad5e-91fd48313261_800x379.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nCy7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32bae353-b0be-44d7-b4a7-3bb9d0606fe1_800x379.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nCy7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32bae353-b0be-44d7-b4a7-3bb9d0606fe1_800x379.jpeg 424w, https://substackcdn.com/image/fetch/$s_!nCy7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32bae353-b0be-44d7-b4a7-3bb9d0606fe1_800x379.jpeg 848w, https://substackcdn.com/image/fetch/$s_!nCy7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32bae353-b0be-44d7-b4a7-3bb9d0606fe1_800x379.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!nCy7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32bae353-b0be-44d7-b4a7-3bb9d0606fe1_800x379.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nCy7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32bae353-b0be-44d7-b4a7-3bb9d0606fe1_800x379.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/32bae353-b0be-44d7-b4a7-3bb9d0606fe1_800x379.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nCy7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32bae353-b0be-44d7-b4a7-3bb9d0606fe1_800x379.jpeg 424w, https://substackcdn.com/image/fetch/$s_!nCy7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32bae353-b0be-44d7-b4a7-3bb9d0606fe1_800x379.jpeg 848w, https://substackcdn.com/image/fetch/$s_!nCy7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32bae353-b0be-44d7-b4a7-3bb9d0606fe1_800x379.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!nCy7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32bae353-b0be-44d7-b4a7-3bb9d0606fe1_800x379.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption"><strong>Fig 1.</strong> Left&#8202;&#8212;&#8202;Input images to the model. Middle&#8202;&#8212;&#8202;2D skeleton structure output showing the pose. Right&#8202;&#8212;&#8202;3D derivation of the 2D skeleton structures. The code implemented on these images can be found&nbsp;<a href="https://github.com/miranthajayatilake/Pose_Estimator">here</a>.</figcaption></figure></div><p>Identification of human body poses with mere 2D imagery had been a grand challenge in the field machine vision and with the explosion of Deep Learning algorithms, the area has seen quite promising advancements recently. As shown in Figure 1, the outputs from these models are able to accurately identify human body keypoints and form skeleton structures depicting the poses. Advancements of these techniques imply great potential with applications in areas such as sports, security surveillance, patient monitoring etc.</p><p>The process of human pose estimation can be divided into several parts:</p><ol><li><p>Identifying anatomical keypoints of the human body</p></li></ol><p>The first task is to identify the different parts of a body, preferably joints, so that these points can be tracked in the imagery. The model has to be trained initially using annotated data to be good at this task. Techniques such as heat maps are being widely used at this step and the accuracy directly impacts the nest step</p><p>2. Joining the keypoints to form the skeleton structure</p><p>Next the identified keypoints have to be joined with each other to form a skeleton structure. This task can be quite tricky as to decide which keypoints should be connected to which. Techniques such as assignment of a confidence score in-between keypoints are used here.</p><p>3. Forming a 3D representation of the skeleton structure</p><p>So far the process has being able to extract a 2D skeleton structure from the imagery which depicts the pose accurately, but can we derive a 3D model out of this? This can be a very powerful tool to have and as shown in Figure 1 (right), the 3D estimations are somewhat accurate, but there&#8217;s surely room for improvements.</p><p>4. Executing the above three point for multiple humans in a single image</p><p>Identifying the pose of a single human is impressive. Then what about doing that for multiple people in the same image? This question offers a brand new set of challenges in the steps of detecting humans and joining body keypoints.</p><p>On top of that, how about executing all these steps in a Real-time implementation? This is where the real deal lies. The research referred in this post tackles this frontier and you can find the paper here-&gt; (<a href="https://arxiv.org/abs/1611.08050">https://arxiv.org/abs/1611.08050</a>)</p><p>The code found <a href="https://github.com/miranthajayatilake/Pose_Estimator">here on my GitHub</a> is based on the tensorflow implementation of the algorithm of the paper open sourced by the authors. (Find the <a href="https://github.com/CMU-Perceptual-Computing-Lab/openpose">original repo here</a>)</p><p>This is quite an interesting frontier in Deep Learning towork in and there are many possibilities to explore!</p>]]></content:encoded></item><item><title><![CDATA[Understanding and optimizing GANs (Going back to first principles)]]></title><description><![CDATA[The hype around Generative Adversarial Networks (GANs) had been growing ever since the architecture was first introduced by Ian Goodfellow&#8230;]]></description><link>https://www.mirantha.com/p/understanding-and-optimizing-gans-going-back-to-first-principles-e5df8835ae18</link><guid isPermaLink="false">https://www.mirantha.com/p/understanding-and-optimizing-gans-going-back-to-first-principles-e5df8835ae18</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Wed, 07 Mar 2018 16:56:11 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/d9cb6d0d-89a8-4c80-a796-dcfcc88e4ce4_640x480.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!c6OF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb2b71e-1312-4b45-a3b1-9ca4513a378f_640x480.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!c6OF!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb2b71e-1312-4b45-a3b1-9ca4513a378f_640x480.gif 424w, https://substackcdn.com/image/fetch/$s_!c6OF!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb2b71e-1312-4b45-a3b1-9ca4513a378f_640x480.gif 848w, https://substackcdn.com/image/fetch/$s_!c6OF!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb2b71e-1312-4b45-a3b1-9ca4513a378f_640x480.gif 1272w, https://substackcdn.com/image/fetch/$s_!c6OF!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb2b71e-1312-4b45-a3b1-9ca4513a378f_640x480.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!c6OF!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb2b71e-1312-4b45-a3b1-9ca4513a378f_640x480.gif" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1eb2b71e-1312-4b45-a3b1-9ca4513a378f_640x480.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!c6OF!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb2b71e-1312-4b45-a3b1-9ca4513a378f_640x480.gif 424w, https://substackcdn.com/image/fetch/$s_!c6OF!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb2b71e-1312-4b45-a3b1-9ca4513a378f_640x480.gif 848w, https://substackcdn.com/image/fetch/$s_!c6OF!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb2b71e-1312-4b45-a3b1-9ca4513a378f_640x480.gif 1272w, https://substackcdn.com/image/fetch/$s_!c6OF!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb2b71e-1312-4b45-a3b1-9ca4513a378f_640x480.gif 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption"><strong>Fig 1</strong>. Improvement of fake image generation of faces over training using basic GAN algorithm</figcaption></figure></div><p>The hype around Generative Adversarial Networks (GANs) had been growing ever since the architecture was first introduced by Ian Goodfellow and the numerous advancements and applications become more and more fascinating by the day. But for anyone who wants to get started with GANs, it can be quite tricky to figure out where to start. &#8216;Don&#8217;t Panic.&#8217; This post shall guide you.</p><p>As with many things, the best way to fully understand a concept is to hit the roots. Grab hold of the first principles. For GANs, this is the original paper here -&gt;(<a href="https://arxiv.org/abs/1406.2661">https://arxiv.org/abs/1406.2661</a>). Now to understand a paper of this sort there can be two approaches, theoretical and practical. I often prefer the latter, but in case you love to dig deep into the math, <a href="https://medium.com/@samramasinghe/generative-adversarial-networks-a-theoretical-walk-through-5889d5a8f2bb">here</a> is a great post by my buddy <a href="https://medium.com/u/bc1eaea94061">Sameera</a> breaking down the entire algorithm theoretically. In the meantime this post will present a simple implementation of the algorithm in its purest form using Keras. Let&#8217;s get started.</p><p>In the underlying setting of a GAN are two models namely, the generator and the discriminator, where the generator is constantly competing with the discriminator, which is an adversary that is learning to distinguish between the model distribution (e.g. generated fake images) and the data distribution (e.g. real images). This concept is famously visualized by a counterfeiter vs policeman scenario, where the generative model is thought of as a counterfeiter generating fake cash and the discriminator model as a policeman trying to detect the fake cash. The idea is that with constant competition between each other, both the counterfeiter and the policeman improve in each other&#8217;s role but ultimately the counterfeiter achieves a stage of producing fake cash that is indistinguishable from the real ones. Simple. Now let&#8217;s put this into code.</p><p>The example script provided with this post is used to generate fake images of faces. The ultimate result we are trying to achieve with the algorithm is represented in Figure 1.</p><p><strong>Building the Generator model</strong></p><p>So the generator model is supposed to take in some noise and output a desirable looking image. Here we use Keras Sequential model along with Dense and Batch Normalization layers. The activation function used is Leaky Relu. Refer the code snippet below. The generator model can be divided into several blocks. One block consisting of Dense Layer -&gt; Activation -&gt;Batch Normalization. Three such blocks are added and the last block transforms the pixels into the desired shape of the image we&#8217;re expecting as the output. The input to the model will be a noise vector of shape (100,) and the model is returned at the end. Note how the nodes in each dense layer increases as the model progresses.</p><p><strong>Building the Discriminator model</strong></p><p>The discriminator takes in an input of an image, flatten it and pass it through two blocks of Dense -&gt; Activation, to finally output a scalar between 1 and 0. Output 1 should represent that the input image is real and 0 otherwise. Simple as that. Refer the code below.</p><p><em>Note&nbsp;:-<br>You can modify these models later to have more blocks, more batch norm layers, different activations etc. As per this example, these models are enough to understand the concepts behind GANs.</em></p><p><strong>Finding loss and training</strong></p><p>We calculate three losses, all using Binary Cross Entropy in this example in order to train the two models.</p><p>First the discriminator. It is trained to go two ways as shown in code below. First to output 1 for real images (array &#8216;img&#8217;) and then to output 0 for generated images (array &#8216;gen_img&#8217;). As training progresses the discriminator improves at this task. But our end goal is attained at a theoretical point where the discriminator outputs 0.5 for both types of inputs (i.e. indecisive if fake or real).</p><p>Next is training the generator, which is the tricky bit. To do this we first formulate a combined model of Discriminator given the output of Generator. Remember! Ideally we want this to be 1, which means the Discriminator identifying a fake generated image as real. So we train the output of the combined model against 1. See the code below.</p><p><strong>Now let&#8217;s play!<br></strong>That is pretty much the gist of the code to simply understand the workings of GANs.</p><p><em>*** The full code can be found <a href="https://github.com/miranthajayatilake/GANwKeras">here</a> on my GitHub. You can refer to all the additional code for importing RGB images, initializing the models and logging the results in the code. Also note that during training the mini-batches are set to Hi32 images in order to be able to run on CPU.<br>Also the real images used in the example are 5000 images from the CelebA dataset. This is an open source dataset and I have uploaded it to my Floydhub for easy downloading which you can find <a href="https://www.floydhub.com/mirantha/datasets/celeba">here</a>. **</em></p><p>There are many ways you can optimize the code to obtain better results and also to get an idea how different components of the algorithm affect the efficiency of the results. Observing the results while tweaking different components such as the optimizers, activators, normalizations, loss calculators, hyperparameters etc, is the best way to enhance your understanding of the algorithm. I chose to vary the optimizers.</p><p>So training for 5000 epochs with batches of 32, I tested with three types of optimization algorithms. With Keras this process is as easy as importing and replacing the name of the optimizer function. All optimizers in-built to Keras can be found <a href="https://keras.io/optimizers/">here</a>.&nbsp;<br>Also the losses where plotted in each instance to understand the behavior of the models.</p><ol><li><p>Using SGD ( Stochastic gradient descent optimizer). The output and the loss variations are shown in Figure 2 and 3 respectively.</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NZzf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9e065d6-fb9f-4884-9d1c-10e7e078bed4_640x480.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NZzf!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9e065d6-fb9f-4884-9d1c-10e7e078bed4_640x480.gif 424w, https://substackcdn.com/image/fetch/$s_!NZzf!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9e065d6-fb9f-4884-9d1c-10e7e078bed4_640x480.gif 848w, https://substackcdn.com/image/fetch/$s_!NZzf!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9e065d6-fb9f-4884-9d1c-10e7e078bed4_640x480.gif 1272w, https://substackcdn.com/image/fetch/$s_!NZzf!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9e065d6-fb9f-4884-9d1c-10e7e078bed4_640x480.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NZzf!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9e065d6-fb9f-4884-9d1c-10e7e078bed4_640x480.gif" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f9e065d6-fb9f-4884-9d1c-10e7e078bed4_640x480.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NZzf!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9e065d6-fb9f-4884-9d1c-10e7e078bed4_640x480.gif 424w, https://substackcdn.com/image/fetch/$s_!NZzf!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9e065d6-fb9f-4884-9d1c-10e7e078bed4_640x480.gif 848w, https://substackcdn.com/image/fetch/$s_!NZzf!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9e065d6-fb9f-4884-9d1c-10e7e078bed4_640x480.gif 1272w, https://substackcdn.com/image/fetch/$s_!NZzf!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9e065d6-fb9f-4884-9d1c-10e7e078bed4_640x480.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Fig 2. </strong>Output of the GAN using SGD as the optimizer</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SUbF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ffdcad-a48e-4c14-a43d-5dde8887243a_800x399.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SUbF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ffdcad-a48e-4c14-a43d-5dde8887243a_800x399.png 424w, https://substackcdn.com/image/fetch/$s_!SUbF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ffdcad-a48e-4c14-a43d-5dde8887243a_800x399.png 848w, https://substackcdn.com/image/fetch/$s_!SUbF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ffdcad-a48e-4c14-a43d-5dde8887243a_800x399.png 1272w, https://substackcdn.com/image/fetch/$s_!SUbF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ffdcad-a48e-4c14-a43d-5dde8887243a_800x399.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SUbF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ffdcad-a48e-4c14-a43d-5dde8887243a_800x399.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/59ffdcad-a48e-4c14-a43d-5dde8887243a_800x399.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SUbF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ffdcad-a48e-4c14-a43d-5dde8887243a_800x399.png 424w, https://substackcdn.com/image/fetch/$s_!SUbF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ffdcad-a48e-4c14-a43d-5dde8887243a_800x399.png 848w, https://substackcdn.com/image/fetch/$s_!SUbF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ffdcad-a48e-4c14-a43d-5dde8887243a_800x399.png 1272w, https://substackcdn.com/image/fetch/$s_!SUbF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59ffdcad-a48e-4c14-a43d-5dde8887243a_800x399.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Fig 3</strong>. Plot showing the variation of losses while training the GAN using&nbsp;SGD</figcaption></figure></div><p>Comment&#8202;&#8212;&#8202;Though the convergence is noisy we can see here that the generator loss is decreasing over epochs, which implies that the discriminator tends to detect fake images as real.</p><p>2. Using RMSProp optimizer. The output and the loss variations are shown in Figure 4 and 5 respectively.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2ZwJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7be0930c-ddca-4899-bf97-b117f9b3c599_640x480.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2ZwJ!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7be0930c-ddca-4899-bf97-b117f9b3c599_640x480.gif 424w, https://substackcdn.com/image/fetch/$s_!2ZwJ!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7be0930c-ddca-4899-bf97-b117f9b3c599_640x480.gif 848w, https://substackcdn.com/image/fetch/$s_!2ZwJ!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7be0930c-ddca-4899-bf97-b117f9b3c599_640x480.gif 1272w, https://substackcdn.com/image/fetch/$s_!2ZwJ!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7be0930c-ddca-4899-bf97-b117f9b3c599_640x480.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2ZwJ!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7be0930c-ddca-4899-bf97-b117f9b3c599_640x480.gif" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7be0930c-ddca-4899-bf97-b117f9b3c599_640x480.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2ZwJ!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7be0930c-ddca-4899-bf97-b117f9b3c599_640x480.gif 424w, https://substackcdn.com/image/fetch/$s_!2ZwJ!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7be0930c-ddca-4899-bf97-b117f9b3c599_640x480.gif 848w, https://substackcdn.com/image/fetch/$s_!2ZwJ!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7be0930c-ddca-4899-bf97-b117f9b3c599_640x480.gif 1272w, https://substackcdn.com/image/fetch/$s_!2ZwJ!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7be0930c-ddca-4899-bf97-b117f9b3c599_640x480.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Fig 4. </strong>Output of the GAN using RMSProp as the optimizer</figcaption></figure></div><p>Losses:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VvWC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb2887f4-a16d-49c9-822c-175e6a3ba744_800x399.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VvWC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb2887f4-a16d-49c9-822c-175e6a3ba744_800x399.png 424w, https://substackcdn.com/image/fetch/$s_!VvWC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb2887f4-a16d-49c9-822c-175e6a3ba744_800x399.png 848w, https://substackcdn.com/image/fetch/$s_!VvWC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb2887f4-a16d-49c9-822c-175e6a3ba744_800x399.png 1272w, https://substackcdn.com/image/fetch/$s_!VvWC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb2887f4-a16d-49c9-822c-175e6a3ba744_800x399.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VvWC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb2887f4-a16d-49c9-822c-175e6a3ba744_800x399.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bb2887f4-a16d-49c9-822c-175e6a3ba744_800x399.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VvWC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb2887f4-a16d-49c9-822c-175e6a3ba744_800x399.png 424w, https://substackcdn.com/image/fetch/$s_!VvWC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb2887f4-a16d-49c9-822c-175e6a3ba744_800x399.png 848w, https://substackcdn.com/image/fetch/$s_!VvWC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb2887f4-a16d-49c9-822c-175e6a3ba744_800x399.png 1272w, https://substackcdn.com/image/fetch/$s_!VvWC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb2887f4-a16d-49c9-822c-175e6a3ba744_800x399.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Fig 5</strong>. Plot showing the variation of losses while training the GAN using&nbsp;RMSProp</figcaption></figure></div><p>Comment&#8202;&#8212;&#8202;Here also the we see that the generator loss is decreasing which is a good thing. Surprisingly the discriminator loss on real images increases which is quite interesting.</p><p>3. Using Adam optimizer. The output and the loss variations are shown in Figure 6 and 7 respectively.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1kCm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b004d1d-3407-4636-8715-73edffa0f81f_640x480.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1kCm!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b004d1d-3407-4636-8715-73edffa0f81f_640x480.gif 424w, https://substackcdn.com/image/fetch/$s_!1kCm!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b004d1d-3407-4636-8715-73edffa0f81f_640x480.gif 848w, https://substackcdn.com/image/fetch/$s_!1kCm!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b004d1d-3407-4636-8715-73edffa0f81f_640x480.gif 1272w, https://substackcdn.com/image/fetch/$s_!1kCm!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b004d1d-3407-4636-8715-73edffa0f81f_640x480.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1kCm!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b004d1d-3407-4636-8715-73edffa0f81f_640x480.gif" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3b004d1d-3407-4636-8715-73edffa0f81f_640x480.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1kCm!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b004d1d-3407-4636-8715-73edffa0f81f_640x480.gif 424w, https://substackcdn.com/image/fetch/$s_!1kCm!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b004d1d-3407-4636-8715-73edffa0f81f_640x480.gif 848w, https://substackcdn.com/image/fetch/$s_!1kCm!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b004d1d-3407-4636-8715-73edffa0f81f_640x480.gif 1272w, https://substackcdn.com/image/fetch/$s_!1kCm!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b004d1d-3407-4636-8715-73edffa0f81f_640x480.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Fig 6. </strong>Output of the GAN using Adam as the optimizer</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!A1f_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf5bba5b-127b-4444-b6a6-55edb7a55a00_800x399.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!A1f_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf5bba5b-127b-4444-b6a6-55edb7a55a00_800x399.png 424w, https://substackcdn.com/image/fetch/$s_!A1f_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf5bba5b-127b-4444-b6a6-55edb7a55a00_800x399.png 848w, https://substackcdn.com/image/fetch/$s_!A1f_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf5bba5b-127b-4444-b6a6-55edb7a55a00_800x399.png 1272w, https://substackcdn.com/image/fetch/$s_!A1f_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf5bba5b-127b-4444-b6a6-55edb7a55a00_800x399.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!A1f_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf5bba5b-127b-4444-b6a6-55edb7a55a00_800x399.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf5bba5b-127b-4444-b6a6-55edb7a55a00_800x399.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!A1f_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf5bba5b-127b-4444-b6a6-55edb7a55a00_800x399.png 424w, https://substackcdn.com/image/fetch/$s_!A1f_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf5bba5b-127b-4444-b6a6-55edb7a55a00_800x399.png 848w, https://substackcdn.com/image/fetch/$s_!A1f_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf5bba5b-127b-4444-b6a6-55edb7a55a00_800x399.png 1272w, https://substackcdn.com/image/fetch/$s_!A1f_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf5bba5b-127b-4444-b6a6-55edb7a55a00_800x399.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Fig 7</strong>. Plot showing the variation of losses while training the GAN using&nbsp;Adam</figcaption></figure></div><p>Comment&#8202;&#8212;&#8202;The adam optimizer yields the best looking results so far. Notice how the discriminator loss on fake images retains a larger value, meaning the discriminator tends to lean towards detecting fake images as real.</p><h3>Remarks</h3><p>I hope this post conveys a basic look into the inner workings of GANs from a practical perspective to understand and see how you could improve on the basic models. There are numerous implementations of GANs within the open source community on different applications and having a sound understanding on the first principles will help you immensely to understand the advancements. Also GANs being relatively new to Deep learning, there are many research avenues open for anyone interested.</p><p>So the possibilities are immense for you to explore!</p>]]></content:encoded></item><item><title><![CDATA[Quick implementation of Yolo V2 with Keras!]]></title><description><![CDATA[Real time multiple object localization remains a grand debate in the field of digital image processing since many years. With the invent of&#8230;]]></description><link>https://www.mirantha.com/p/quick-implementation-of-yolo-v2-with-keras-ebf6eb40c684</link><guid isPermaLink="false">https://www.mirantha.com/p/quick-implementation-of-yolo-v2-with-keras-ebf6eb40c684</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Fri, 23 Feb 2018 03:19:09 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/8f1d985f-8ad8-4d8d-b389-5472cddcfadc_800x450.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cuFN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35c55425-4929-4321-a49c-130837fa62a3_800x450.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cuFN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35c55425-4929-4321-a49c-130837fa62a3_800x450.jpeg 424w, https://substackcdn.com/image/fetch/$s_!cuFN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35c55425-4929-4321-a49c-130837fa62a3_800x450.jpeg 848w, https://substackcdn.com/image/fetch/$s_!cuFN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35c55425-4929-4321-a49c-130837fa62a3_800x450.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!cuFN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35c55425-4929-4321-a49c-130837fa62a3_800x450.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cuFN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35c55425-4929-4321-a49c-130837fa62a3_800x450.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/35c55425-4929-4321-a49c-130837fa62a3_800x450.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cuFN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35c55425-4929-4321-a49c-130837fa62a3_800x450.jpeg 424w, https://substackcdn.com/image/fetch/$s_!cuFN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35c55425-4929-4321-a49c-130837fa62a3_800x450.jpeg 848w, https://substackcdn.com/image/fetch/$s_!cuFN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35c55425-4929-4321-a49c-130837fa62a3_800x450.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!cuFN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35c55425-4929-4321-a49c-130837fa62a3_800x450.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">I do not hold ownership to any of the above pictures. These are merely used for educational purposes to describe the concepts.</figcaption></figure></div><p>Real time multiple object localization remains a grand debate in the field of digital image processing since many years. With the invent of Deep Learning and convolutional neural networks, the efforts have yielded quite promising results and the ability of well trained models detecting many classes of objects very accurately is in our hands now.</p><p>In this post I intend to present a model famously known as Yolo which stands for &#8216;You Only Look Once&#8217;, proposed by <a href="https://arxiv.org/abs/1612.08242">Joseph Redmo et al</a>, that has shown great strides towards very fast multiple localizations of objects and its implementation using Keras, which is a high level Deep Learning library.</p><p>Let us first look differentiating among the terms classification, localization and detection. We hear these terms often in the image processing world and these are distinctive to each other in their applications.&nbsp;<br><strong>Classification</strong>&#8202;&#8212;&#8202;Refers to identifying if a given object is present inside an image or not. Common example: Cat or no-cat.&nbsp;<br><strong>Localization</strong>&#8202;&#8212;&#8202;Refers to not only identifying is a given object is present inside an image, but also distinguishing the object&#8217;s location using a bounding box.<br><strong>Detection</strong>&#8202;&#8212;&#8202;Simply refers to multiple localizations in a single image.</p><p>Yolo is addressing the detection of objects in images and with the publication of <a href="https://arxiv.org/abs/1612.08242">Yolo V2 paper</a>, this technique was quickly popularized it the field. Let&#8217;s look at the main steps in the Yolo V2 algorithm. These can be pointed out as below;</p><ul><li><p>Divide the image using a grid (eg: 19x19)<br>Dividing the image into a grid of smaller images increases the possibilities of object detection inside each cell easier.</p></li><li><p>Perform image classification and Localization on each grid cell&nbsp;<br>A vector for each cell representing the probability of an object detected, the dimensions of the bounding box and class of the detected image are given as the output at this step.</p></li><li><p>Perform thresholding to remove multiple detected instances<br>Thresholding picks the cells with the highest probabilities so that the more correcet bounding boxes are selected</p></li><li><p>Perform Non-max suppression to refine the boxes more<br>The technique of non-max suppression offers a convenient way to refine the results more using a calculation know as <a href="https://www.pyimagesearch.com/2016/11/07/intersection-over-union-iou-for-object-detection/">Intersection of Union</a></p></li></ul><p>Additional point&#8202;&#8212;&#8202;Anchor boxes are used to detect several objects in one grid cell. This is a specialty in the Yolo V2 algorithm compared to the others.</p><p>The first implementation of Yolo was presented using a model in C known as <a href="https://pjreddie.com/darknet/">Darknet</a> by Joseph Redmon et al and over the evolution of the method, implementation with currently more popular ML libraries such as Tensorflow and Keras were also built.</p><p>My <a href="https://github.com/miranthajayatilake/YOLOw-Keras">Github repository here</a> presents a quick implementation of this algorithm using Keras. Using the code anyone can test with their own images and dig down into its workings. All the details regarding its installation and execution can be found in the repo.</p><p>Feel free use the code in your applications and share to spread the knowledge!</p>]]></content:encoded></item><item><title><![CDATA[Are white people more prone to terrorism? (EDA on US-Mass-Shootings Dataset)]]></title><description><![CDATA[I&#8217;m not trying to sound racist but you&#8217;ll see why i said that just towards the end of this post. But first here&#8217;s the story.]]></description><link>https://www.mirantha.com/p/are-white-people-more-prone-to-terrorism-eda-on-us-mass-shootings-dataset-3b89f904ede8</link><guid isPermaLink="false">https://www.mirantha.com/p/are-white-people-more-prone-to-terrorism-eda-on-us-mass-shootings-dataset-3b89f904ede8</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Sun, 03 Dec 2017 06:43:55 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/693d5492-68ca-4560-9aff-dafea492a235_800x436.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wbBo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbcf1651-1c31-4bc1-a323-8454a1798348_800x436.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wbBo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbcf1651-1c31-4bc1-a323-8454a1798348_800x436.jpeg 424w, https://substackcdn.com/image/fetch/$s_!wbBo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbcf1651-1c31-4bc1-a323-8454a1798348_800x436.jpeg 848w, https://substackcdn.com/image/fetch/$s_!wbBo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbcf1651-1c31-4bc1-a323-8454a1798348_800x436.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!wbBo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbcf1651-1c31-4bc1-a323-8454a1798348_800x436.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wbBo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbcf1651-1c31-4bc1-a323-8454a1798348_800x436.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dbcf1651-1c31-4bc1-a323-8454a1798348_800x436.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wbBo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbcf1651-1c31-4bc1-a323-8454a1798348_800x436.jpeg 424w, https://substackcdn.com/image/fetch/$s_!wbBo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbcf1651-1c31-4bc1-a323-8454a1798348_800x436.jpeg 848w, https://substackcdn.com/image/fetch/$s_!wbBo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbcf1651-1c31-4bc1-a323-8454a1798348_800x436.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!wbBo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbcf1651-1c31-4bc1-a323-8454a1798348_800x436.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Courtesy&#8202;&#8212;&#8202;Google&nbsp;Images</figcaption></figure></div><p>I&#8217;m not trying to sound racist but you&#8217;ll see why i said that just towards the end of this post. But first here&#8217;s the story.</p><p>I have been familiarizing myself with data science, the widely popularized field of study with the rise of AI, over he last couple of months and have been constantly fascinated by its potential applications. This inquisitiveness led me into the world of <a href="https://www.kaggle.com/">Kaggle</a> one day. When I discovered Kaggle the little fan girl inside me rejoiced seeing how cool the Kaggle community is.</p><p>The amount of knowledge you can gain from following the work of other professional and aspiring data scientists plus the amount of shared community datasets are such incredible resources for anyone looking to step into data sceince. Highly recommended.</p><p>So going through some datasets I came across the striking <a href="https://www.kaggle.com/zusmani/us-mass-shootings-last-50-years">US Mass Shootings&#8202;&#8212;&#8202;Last 50 Years (1966&#8211;2017)</a> dataset generously shared by <a href="https://medium.com/u/bcb9ec10a982">Zeeshan-ul-hassan Usmani</a>. I have met Zesshan once during a speech he delivered in Colombo where he presented few of his inspiring case studies. Incredible guy. <a href="https://twitter.com/zeeshanusmani">Go follow him on Twitter -&gt;</a></p><p>Coming back to the dataset, it contained detailed information of 398 mass shootings in the United States. Not only due to terrorism, but also due to other factors such as domestic violence, mental health conditions, social problems etc. The overview I quote:</p><blockquote><p>The US has witnessed 398 mass shootings in last 50 years that resulted in 1,996 deaths and 2,488 injured. The average number of mass shootings per year is 7 for the last 50 years that would claim 39 lives and 48 injured per year.</p></blockquote><p>These facts resemble a darker side of the world we live in. The fact that we can use our knowledge to create meaning out of the past and help the future ways of peace even by a tiny amount should be the inspiration behind analysis on such data.</p><p>With that in mind here are some of the visualizations generated using the dataset.</p><p><em>Side Note: I&#8217;m no professional in data science. I took great help from others who have shared their kernels for these results. I used Python with numpy, pandas, matplotlib, seabron and geopy libraries. If there are any wrongdoings with the analytics, let me know in the comments.</em></p><p>First, the US map showing the locations of all reported incidents. The size of the bubbles identifies the amount of fatalities in each incident.</p><p>Let&#8217;s have a look at the yearly number of incidents.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mvb0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb7c28b-fd0c-4651-a3ef-b913b8add4de_794x498.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mvb0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb7c28b-fd0c-4651-a3ef-b913b8add4de_794x498.png 424w, https://substackcdn.com/image/fetch/$s_!mvb0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb7c28b-fd0c-4651-a3ef-b913b8add4de_794x498.png 848w, https://substackcdn.com/image/fetch/$s_!mvb0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb7c28b-fd0c-4651-a3ef-b913b8add4de_794x498.png 1272w, https://substackcdn.com/image/fetch/$s_!mvb0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb7c28b-fd0c-4651-a3ef-b913b8add4de_794x498.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mvb0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb7c28b-fd0c-4651-a3ef-b913b8add4de_794x498.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1eb7c28b-fd0c-4651-a3ef-b913b8add4de_794x498.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mvb0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb7c28b-fd0c-4651-a3ef-b913b8add4de_794x498.png 424w, https://substackcdn.com/image/fetch/$s_!mvb0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb7c28b-fd0c-4651-a3ef-b913b8add4de_794x498.png 848w, https://substackcdn.com/image/fetch/$s_!mvb0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb7c28b-fd0c-4651-a3ef-b913b8add4de_794x498.png 1272w, https://substackcdn.com/image/fetch/$s_!mvb0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1eb7c28b-fd0c-4651-a3ef-b913b8add4de_794x498.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>A significant increase in attacks is very much clear towards the latter. We might think of connections between the rise of religious extremists and social instabilities with these results, but I would also argue that this can be a outcome of the improvement of reporting such incidents especially with the rise of social media.</p><p>Next, what can we see from the total number of attacks categorized by the month?</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WfGz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F364f8d21-cebc-4896-910a-832895386f2f_794x485.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WfGz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F364f8d21-cebc-4896-910a-832895386f2f_794x485.png 424w, https://substackcdn.com/image/fetch/$s_!WfGz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F364f8d21-cebc-4896-910a-832895386f2f_794x485.png 848w, https://substackcdn.com/image/fetch/$s_!WfGz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F364f8d21-cebc-4896-910a-832895386f2f_794x485.png 1272w, https://substackcdn.com/image/fetch/$s_!WfGz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F364f8d21-cebc-4896-910a-832895386f2f_794x485.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WfGz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F364f8d21-cebc-4896-910a-832895386f2f_794x485.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/364f8d21-cebc-4896-910a-832895386f2f_794x485.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WfGz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F364f8d21-cebc-4896-910a-832895386f2f_794x485.png 424w, https://substackcdn.com/image/fetch/$s_!WfGz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F364f8d21-cebc-4896-910a-832895386f2f_794x485.png 848w, https://substackcdn.com/image/fetch/$s_!WfGz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F364f8d21-cebc-4896-910a-832895386f2f_794x485.png 1272w, https://substackcdn.com/image/fetch/$s_!WfGz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F364f8d21-cebc-4896-910a-832895386f2f_794x485.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Seem to increase towards the beginning and the end of an year. Also see the total number of victims against each month.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4dl0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8123f16c-87c8-4d28-baf1-878c15bdffef_794x603.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4dl0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8123f16c-87c8-4d28-baf1-878c15bdffef_794x603.png 424w, https://substackcdn.com/image/fetch/$s_!4dl0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8123f16c-87c8-4d28-baf1-878c15bdffef_794x603.png 848w, https://substackcdn.com/image/fetch/$s_!4dl0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8123f16c-87c8-4d28-baf1-878c15bdffef_794x603.png 1272w, https://substackcdn.com/image/fetch/$s_!4dl0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8123f16c-87c8-4d28-baf1-878c15bdffef_794x603.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4dl0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8123f16c-87c8-4d28-baf1-878c15bdffef_794x603.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8123f16c-87c8-4d28-baf1-878c15bdffef_794x603.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4dl0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8123f16c-87c8-4d28-baf1-878c15bdffef_794x603.png 424w, https://substackcdn.com/image/fetch/$s_!4dl0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8123f16c-87c8-4d28-baf1-878c15bdffef_794x603.png 848w, https://substackcdn.com/image/fetch/$s_!4dl0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8123f16c-87c8-4d28-baf1-878c15bdffef_794x603.png 1272w, https://substackcdn.com/image/fetch/$s_!4dl0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8123f16c-87c8-4d28-baf1-878c15bdffef_794x603.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>We can go on breaking down the number of incidents reported by each day of the month.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CLqG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39fbe892-7ff1-4d20-b8b4-c775f57dd3ea_794x486.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CLqG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39fbe892-7ff1-4d20-b8b4-c775f57dd3ea_794x486.png 424w, https://substackcdn.com/image/fetch/$s_!CLqG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39fbe892-7ff1-4d20-b8b4-c775f57dd3ea_794x486.png 848w, https://substackcdn.com/image/fetch/$s_!CLqG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39fbe892-7ff1-4d20-b8b4-c775f57dd3ea_794x486.png 1272w, https://substackcdn.com/image/fetch/$s_!CLqG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39fbe892-7ff1-4d20-b8b4-c775f57dd3ea_794x486.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CLqG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39fbe892-7ff1-4d20-b8b4-c775f57dd3ea_794x486.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/39fbe892-7ff1-4d20-b8b4-c775f57dd3ea_794x486.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CLqG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39fbe892-7ff1-4d20-b8b4-c775f57dd3ea_794x486.png 424w, https://substackcdn.com/image/fetch/$s_!CLqG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39fbe892-7ff1-4d20-b8b4-c775f57dd3ea_794x486.png 848w, https://substackcdn.com/image/fetch/$s_!CLqG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39fbe892-7ff1-4d20-b8b4-c775f57dd3ea_794x486.png 1272w, https://substackcdn.com/image/fetch/$s_!CLqG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39fbe892-7ff1-4d20-b8b4-c775f57dd3ea_794x486.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Looks like the attacks are somewhat spread all over a month. But then if we group the attacks by each day of the week, we get this.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://cdn-images-1.medium.com/max/800/1*dvbDlGQsgfLqswA98_lZYA.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://cdn-images-1.medium.com/max/800/1*dvbDlGQsgfLqswA98_lZYA.png 424w, https://cdn-images-1.medium.com/max/800/1*dvbDlGQsgfLqswA98_lZYA.png 848w, https://cdn-images-1.medium.com/max/800/1*dvbDlGQsgfLqswA98_lZYA.png 1272w, https://cdn-images-1.medium.com/max/800/1*dvbDlGQsgfLqswA98_lZYA.png 1456w" sizes="100vw"><img src="https://cdn-images-1.medium.com/max/800/1*dvbDlGQsgfLqswA98_lZYA.png" data-attrs="{&quot;src&quot;:&quot;https://cdn-images-1.medium.com/max/800/1*dvbDlGQsgfLqswA98_lZYA.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://cdn-images-1.medium.com/max/800/1*dvbDlGQsgfLqswA98_lZYA.png 424w, https://cdn-images-1.medium.com/max/800/1*dvbDlGQsgfLqswA98_lZYA.png 848w, https://cdn-images-1.medium.com/max/800/1*dvbDlGQsgfLqswA98_lZYA.png 1272w, https://cdn-images-1.medium.com/max/800/1*dvbDlGQsgfLqswA98_lZYA.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Looking at this it&#8217;s clear that the cumulative number of attacks during weekdays would be greater than that of weekends. To just make it clearer, see the below graph.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!B-4W!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f478858-b799-4c04-a262-ecfb5e27e5fe_800x477.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!B-4W!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f478858-b799-4c04-a262-ecfb5e27e5fe_800x477.png 424w, https://substackcdn.com/image/fetch/$s_!B-4W!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f478858-b799-4c04-a262-ecfb5e27e5fe_800x477.png 848w, https://substackcdn.com/image/fetch/$s_!B-4W!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f478858-b799-4c04-a262-ecfb5e27e5fe_800x477.png 1272w, https://substackcdn.com/image/fetch/$s_!B-4W!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f478858-b799-4c04-a262-ecfb5e27e5fe_800x477.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!B-4W!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f478858-b799-4c04-a262-ecfb5e27e5fe_800x477.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f478858-b799-4c04-a262-ecfb5e27e5fe_800x477.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!B-4W!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f478858-b799-4c04-a262-ecfb5e27e5fe_800x477.png 424w, https://substackcdn.com/image/fetch/$s_!B-4W!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f478858-b799-4c04-a262-ecfb5e27e5fe_800x477.png 848w, https://substackcdn.com/image/fetch/$s_!B-4W!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f478858-b799-4c04-a262-ecfb5e27e5fe_800x477.png 1272w, https://substackcdn.com/image/fetch/$s_!B-4W!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f478858-b799-4c04-a262-ecfb5e27e5fe_800x477.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Significantly the number of victims would be larger with attacks on weekdays for obvious reasons.</p><p>Next we look at how the gender of the shooter affects the number of victims.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!J-M_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc32cf7de-b7f9-4d89-83ab-4be8f01cfa0a_800x612.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!J-M_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc32cf7de-b7f9-4d89-83ab-4be8f01cfa0a_800x612.png 424w, https://substackcdn.com/image/fetch/$s_!J-M_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc32cf7de-b7f9-4d89-83ab-4be8f01cfa0a_800x612.png 848w, https://substackcdn.com/image/fetch/$s_!J-M_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc32cf7de-b7f9-4d89-83ab-4be8f01cfa0a_800x612.png 1272w, https://substackcdn.com/image/fetch/$s_!J-M_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc32cf7de-b7f9-4d89-83ab-4be8f01cfa0a_800x612.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!J-M_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc32cf7de-b7f9-4d89-83ab-4be8f01cfa0a_800x612.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c32cf7de-b7f9-4d89-83ab-4be8f01cfa0a_800x612.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!J-M_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc32cf7de-b7f9-4d89-83ab-4be8f01cfa0a_800x612.png 424w, https://substackcdn.com/image/fetch/$s_!J-M_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc32cf7de-b7f9-4d89-83ab-4be8f01cfa0a_800x612.png 848w, https://substackcdn.com/image/fetch/$s_!J-M_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc32cf7de-b7f9-4d89-83ab-4be8f01cfa0a_800x612.png 1272w, https://substackcdn.com/image/fetch/$s_!J-M_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc32cf7de-b7f9-4d89-83ab-4be8f01cfa0a_800x612.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Male shooters have caused more damage considering with the outliers of the plot. Should be the case since the number of incidents involving a male shooter is significantly higher.</p><p>Does the age of the shooter tell us something about the incidents?</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!khZM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ed20935-8d1e-4ba7-85e3-d1ac0bfff327_788x596.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!khZM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ed20935-8d1e-4ba7-85e3-d1ac0bfff327_788x596.png 424w, https://substackcdn.com/image/fetch/$s_!khZM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ed20935-8d1e-4ba7-85e3-d1ac0bfff327_788x596.png 848w, https://substackcdn.com/image/fetch/$s_!khZM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ed20935-8d1e-4ba7-85e3-d1ac0bfff327_788x596.png 1272w, https://substackcdn.com/image/fetch/$s_!khZM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ed20935-8d1e-4ba7-85e3-d1ac0bfff327_788x596.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!khZM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ed20935-8d1e-4ba7-85e3-d1ac0bfff327_788x596.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4ed20935-8d1e-4ba7-85e3-d1ac0bfff327_788x596.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!khZM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ed20935-8d1e-4ba7-85e3-d1ac0bfff327_788x596.png 424w, https://substackcdn.com/image/fetch/$s_!khZM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ed20935-8d1e-4ba7-85e3-d1ac0bfff327_788x596.png 848w, https://substackcdn.com/image/fetch/$s_!khZM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ed20935-8d1e-4ba7-85e3-d1ac0bfff327_788x596.png 1272w, https://substackcdn.com/image/fetch/$s_!khZM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ed20935-8d1e-4ba7-85e3-d1ac0bfff327_788x596.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Well, the ages seems to spread across the range of 15&#8211;45 years when considered more than 3 attacks.</p><p>Lastly the below plot visualizes the cumulative number of victims by their race.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hvSw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb4b16a5-8bf9-48b4-99cb-f998553ba0e5_623x759.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hvSw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb4b16a5-8bf9-48b4-99cb-f998553ba0e5_623x759.png 424w, https://substackcdn.com/image/fetch/$s_!hvSw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb4b16a5-8bf9-48b4-99cb-f998553ba0e5_623x759.png 848w, https://substackcdn.com/image/fetch/$s_!hvSw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb4b16a5-8bf9-48b4-99cb-f998553ba0e5_623x759.png 1272w, https://substackcdn.com/image/fetch/$s_!hvSw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb4b16a5-8bf9-48b4-99cb-f998553ba0e5_623x759.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hvSw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb4b16a5-8bf9-48b4-99cb-f998553ba0e5_623x759.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fb4b16a5-8bf9-48b4-99cb-f998553ba0e5_623x759.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hvSw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb4b16a5-8bf9-48b4-99cb-f998553ba0e5_623x759.png 424w, https://substackcdn.com/image/fetch/$s_!hvSw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb4b16a5-8bf9-48b4-99cb-f998553ba0e5_623x759.png 848w, https://substackcdn.com/image/fetch/$s_!hvSw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb4b16a5-8bf9-48b4-99cb-f998553ba0e5_623x759.png 1272w, https://substackcdn.com/image/fetch/$s_!hvSw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb4b16a5-8bf9-48b4-99cb-f998553ba0e5_623x759.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Looking at the plot it&#8217;s obvious that white Americans including European Americans have faced significantly more damage during mass shooting in the US over the last 50 years. The values report almost 2000 victims of these races, which is around 60% out of all reported victims in this dataset.</p><p>Does that depict a major target of these mass shootings over the years? Does it mean that white people in the US are more prone to terrorism in the future? Well, not exactly. Not all mass shooting incidents in this dataset were caused by terrorism at the first place. Although the data shows such a tendency with regard to all mass shooting causes, I think there has to be more elements to this in order to draw such a conclusion. Preferably more data points.</p><p>Anyway, food for thought.</p><p><strong>Remarks:</strong></p><p>This article takes a general path along some common EDA techniques for beginner level data analytics. This can be a good starting point for anyone interested in data science to grab hold of the general norms of data handling and interpretation of visuals.</p><p>The evolving power of data science will pave way to reveal insights that were unseen before. The applications will be soon popularized over many fields and industries that will reshape the way we think and act.</p><p>I&#8217;m looking forward to share more learnings on data science in time to come.</p><p><em>Give a clap&#128079; if it was worth reading so others could also find this article. Thanks.</em></p>]]></content:encoded></item><item><title><![CDATA[Teaching Alexa how to turn my light on (Building the simplest Alexa skill)]]></title><description><![CDATA[A few days back I was tackling the task of developing a custom skill for Amazon&#8217;s voice assistant, a.k.a. &#8216;Alexa&#8217;. I thought of a very&#8230;]]></description><link>https://www.mirantha.com/p/teaching-alexa-how-to-turn-my-light-on-building-the-simplest-alexa-skill-e0fbaf2b9867</link><guid isPermaLink="false">https://www.mirantha.com/p/teaching-alexa-how-to-turn-my-light-on-building-the-simplest-alexa-skill-e0fbaf2b9867</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Thu, 23 Nov 2017 02:08:48 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/d60b3101-2a2d-4161-80d4-235503a33c91_800x533.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JBwh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe23d511a-6a8b-4e75-b81f-e2c48012bdfd_800x533.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JBwh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe23d511a-6a8b-4e75-b81f-e2c48012bdfd_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!JBwh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe23d511a-6a8b-4e75-b81f-e2c48012bdfd_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!JBwh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe23d511a-6a8b-4e75-b81f-e2c48012bdfd_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!JBwh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe23d511a-6a8b-4e75-b81f-e2c48012bdfd_800x533.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JBwh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe23d511a-6a8b-4e75-b81f-e2c48012bdfd_800x533.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e23d511a-6a8b-4e75-b81f-e2c48012bdfd_800x533.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JBwh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe23d511a-6a8b-4e75-b81f-e2c48012bdfd_800x533.jpeg 424w, https://substackcdn.com/image/fetch/$s_!JBwh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe23d511a-6a8b-4e75-b81f-e2c48012bdfd_800x533.jpeg 848w, https://substackcdn.com/image/fetch/$s_!JBwh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe23d511a-6a8b-4e75-b81f-e2c48012bdfd_800x533.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!JBwh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe23d511a-6a8b-4e75-b81f-e2c48012bdfd_800x533.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/photos/eds4moomBRk?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Piotr Cichosz</a> on&nbsp;<a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure></div><p>A few days back I was tackling the task of developing a custom skill for Amazon&#8217;s voice assistant, a.k.a. &#8216;Alexa&#8217;. I thought of a very basic execution to learn from, which was to build a setup to output an on/off signal to a device using voice commands. Sounded simple enough for the first step.</p><p><em>Background check: I had my hardware device already integrated with AWS IoT MQTT broker, subscribed to a topic and ready to accept messages. You can do this easily following <a href="http://docs.aws.amazon.com/iot/latest/developerguide/register-device.html">Amazon&#8217;s developer guide</a>. Having this, the straight-forward method to achieve my objective was to make Alexa publish a message to the same MQTT topic so that the device receives the message.</em></p><p>Although I could find many resources on Amazon&#8217;s documentation and other forums on building Lambda functions with Alexa, I couldn&#8217;t find a direct implementation guide for my objective. Hence here it is.</p><p><em>Note: I&#8217;m not going to make this a step-by-step guide for setting up an Alexa skill and an AWS Lambda function. Amazon resources like <a href="https://developer.amazon.com/alexa-skills-kit/alexa-skill-quick-start-tutorial">this</a> does a better job at it. Also you can search for other forums that explains the entire process. I&#8217;m just going to share the two major codes that you&#8217;ll need in the process, which are the Alexa skill interaction model settings and the Lambda function index.js code.</em></p><p><strong>Interaction model of the Alexa Skill</strong></p><p>I wrote a simple intent schema as below. I didn&#8217;t go into slots in order to keep complications out. Here the two intents&#8202;&#8212;&#8202;SwitchOnIntent and SwitchOffIntent defines the two voice commands expected from the user.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!37Ft!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd20752e9-9061-494e-8560-05339fe5b5e4_800x259.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!37Ft!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd20752e9-9061-494e-8560-05339fe5b5e4_800x259.jpeg 424w, https://substackcdn.com/image/fetch/$s_!37Ft!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd20752e9-9061-494e-8560-05339fe5b5e4_800x259.jpeg 848w, https://substackcdn.com/image/fetch/$s_!37Ft!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd20752e9-9061-494e-8560-05339fe5b5e4_800x259.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!37Ft!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd20752e9-9061-494e-8560-05339fe5b5e4_800x259.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!37Ft!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd20752e9-9061-494e-8560-05339fe5b5e4_800x259.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d20752e9-9061-494e-8560-05339fe5b5e4_800x259.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!37Ft!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd20752e9-9061-494e-8560-05339fe5b5e4_800x259.jpeg 424w, https://substackcdn.com/image/fetch/$s_!37Ft!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd20752e9-9061-494e-8560-05339fe5b5e4_800x259.jpeg 848w, https://substackcdn.com/image/fetch/$s_!37Ft!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd20752e9-9061-494e-8560-05339fe5b5e4_800x259.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!37Ft!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd20752e9-9061-494e-8560-05339fe5b5e4_800x259.jpeg 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p>A simple set of sample utterances were defined as below.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RNVY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa23dc914-4322-40b2-9b13-b61c9255faa7_800x264.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RNVY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa23dc914-4322-40b2-9b13-b61c9255faa7_800x264.jpeg 424w, https://substackcdn.com/image/fetch/$s_!RNVY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa23dc914-4322-40b2-9b13-b61c9255faa7_800x264.jpeg 848w, https://substackcdn.com/image/fetch/$s_!RNVY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa23dc914-4322-40b2-9b13-b61c9255faa7_800x264.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!RNVY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa23dc914-4322-40b2-9b13-b61c9255faa7_800x264.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RNVY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa23dc914-4322-40b2-9b13-b61c9255faa7_800x264.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a23dc914-4322-40b2-9b13-b61c9255faa7_800x264.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RNVY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa23dc914-4322-40b2-9b13-b61c9255faa7_800x264.jpeg 424w, https://substackcdn.com/image/fetch/$s_!RNVY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa23dc914-4322-40b2-9b13-b61c9255faa7_800x264.jpeg 848w, https://substackcdn.com/image/fetch/$s_!RNVY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa23dc914-4322-40b2-9b13-b61c9255faa7_800x264.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!RNVY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa23dc914-4322-40b2-9b13-b61c9255faa7_800x264.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p><strong>Lambda Function</strong></p><p>The lambda function facilitates communication between the Alexa skill and AWS IoT broker. The Zip file that includes the code plus all dependencies needed for the function can be found in my github repository below. The main code resides in the index.js javascript file.</p><p><strong><a href="https://github.com/miranthajayatilake/AWS_LAMBDA_LIGHTCONTROL" title="https://github.com/miranthajayatilake/AWS_LAMBDA_LIGHTCONTROL">miranthajayatilake/AWS_LAMBDA_LIGHTCONTROL</a></strong><a href="https://github.com/miranthajayatilake/AWS_LAMBDA_LIGHTCONTROL" title="https://github.com/miranthajayatilake/AWS_LAMBDA_LIGHTCONTROL"><br></a><em><a href="https://github.com/miranthajayatilake/AWS_LAMBDA_LIGHTCONTROL" title="https://github.com/miranthajayatilake/AWS_LAMBDA_LIGHTCONTROL">AWS_LAMBDA_LIGHTCONTROL - Projects with AWS services</a></em><a href="https://github.com/miranthajayatilake/AWS_LAMBDA_LIGHTCONTROL" title="https://github.com/miranthajayatilake/AWS_LAMBDA_LIGHTCONTROL">github.com</a></p><p>Upload the Zip file to the lambda function. For the execution role setting I used a custom role with the policy <a href="https://console.aws.amazon.com/iam/home#/policies/arn%3Aaws%3Aiam%3A%3Aaws%3Apolicy%2FAWSIoTFullAccess">AWSIoTFullAccess</a> for now.</p><p>You have to fill in the Alexa skill ID, the thing endpoint and the topic you want Alexa to publish to in the index.js file.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!s-UK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e4dc8aa-2a40-4227-a513-f12e11d11751_800x109.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!s-UK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e4dc8aa-2a40-4227-a513-f12e11d11751_800x109.jpeg 424w, https://substackcdn.com/image/fetch/$s_!s-UK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e4dc8aa-2a40-4227-a513-f12e11d11751_800x109.jpeg 848w, https://substackcdn.com/image/fetch/$s_!s-UK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e4dc8aa-2a40-4227-a513-f12e11d11751_800x109.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!s-UK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e4dc8aa-2a40-4227-a513-f12e11d11751_800x109.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!s-UK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e4dc8aa-2a40-4227-a513-f12e11d11751_800x109.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5e4dc8aa-2a40-4227-a513-f12e11d11751_800x109.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!s-UK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e4dc8aa-2a40-4227-a513-f12e11d11751_800x109.jpeg 424w, https://substackcdn.com/image/fetch/$s_!s-UK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e4dc8aa-2a40-4227-a513-f12e11d11751_800x109.jpeg 848w, https://substackcdn.com/image/fetch/$s_!s-UK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e4dc8aa-2a40-4227-a513-f12e11d11751_800x109.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!s-UK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e4dc8aa-2a40-4227-a513-f12e11d11751_800x109.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The two main handlers are as below. For instance if the SwitchOnIntent is triggered, the message &#8216;on&#8217; is published to the given endpoint topic, and if the publishing is successful, Alexa provides the voice feedback saying &#8216;Switched on&#8217;.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!l5x8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17593fa5-feb2-4ce9-8842-cda20d1ec19f_525x529.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!l5x8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17593fa5-feb2-4ce9-8842-cda20d1ec19f_525x529.png 424w, https://substackcdn.com/image/fetch/$s_!l5x8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17593fa5-feb2-4ce9-8842-cda20d1ec19f_525x529.png 848w, https://substackcdn.com/image/fetch/$s_!l5x8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17593fa5-feb2-4ce9-8842-cda20d1ec19f_525x529.png 1272w, https://substackcdn.com/image/fetch/$s_!l5x8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17593fa5-feb2-4ce9-8842-cda20d1ec19f_525x529.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!l5x8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17593fa5-feb2-4ce9-8842-cda20d1ec19f_525x529.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/17593fa5-feb2-4ce9-8842-cda20d1ec19f_525x529.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!l5x8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17593fa5-feb2-4ce9-8842-cda20d1ec19f_525x529.png 424w, https://substackcdn.com/image/fetch/$s_!l5x8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17593fa5-feb2-4ce9-8842-cda20d1ec19f_525x529.png 848w, https://substackcdn.com/image/fetch/$s_!l5x8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17593fa5-feb2-4ce9-8842-cda20d1ec19f_525x529.png 1272w, https://substackcdn.com/image/fetch/$s_!l5x8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17593fa5-feb2-4ce9-8842-cda20d1ec19f_525x529.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Everything done right your device will receive the message from the topic and with a simple logic statement you can make the device control anything using a digital output.</p><p>That&#8217;s pretty much it. With all other configurations in place now you can test the service. I used the test option in the Alexa skill terminal first and then since I don&#8217;t have an Echo myself, used the web simulator at <a href="https://echosim.io/">Echosim</a>. It was quite cool to see the result.</p><h3>Remarks:</h3><p>This shows a very basic execution of Amazon&#8217;s voice assistant to perform a simple task to be used as an initial step to learn VUI. Of course there is so much more you can build on top of this, combining many features and services.</p><p>It is surely fascinating to see the way platforms like Amazon services have come to make it really easy for developers to develop sophisticated applications on a high level.</p><p>The great potential of VUI applications is pretty evident and it is surely on track to become the most used man-machine interface in the near future.</p>]]></content:encoded></item><item><title><![CDATA[Why I think Artificial Intelligence is going to take away our jobs and make the world a better…]]></title><description><![CDATA[Ok. The title might seem to have two contrasting statements, but let me explain.]]></description><link>https://www.mirantha.com/p/why-i-think-artificial-intelligence-is-going-to-take-away-our-jobs-and-make-the-world-a-better-5c3f95baa8b</link><guid isPermaLink="false">https://www.mirantha.com/p/why-i-think-artificial-intelligence-is-going-to-take-away-our-jobs-and-make-the-world-a-better-5c3f95baa8b</guid><dc:creator><![CDATA[Mirantha Jayathilaka, PhD]]></dc:creator><pubDate>Sun, 24 Sep 2017 16:14:43 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/ad10c3cc-4e2a-4c39-a134-25e77846a27a_800x502.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DyS9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69424bb0-cb7f-44b9-8f2b-b7c45d4e5d86_800x502.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DyS9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69424bb0-cb7f-44b9-8f2b-b7c45d4e5d86_800x502.jpeg 424w, https://substackcdn.com/image/fetch/$s_!DyS9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69424bb0-cb7f-44b9-8f2b-b7c45d4e5d86_800x502.jpeg 848w, https://substackcdn.com/image/fetch/$s_!DyS9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69424bb0-cb7f-44b9-8f2b-b7c45d4e5d86_800x502.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!DyS9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69424bb0-cb7f-44b9-8f2b-b7c45d4e5d86_800x502.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DyS9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69424bb0-cb7f-44b9-8f2b-b7c45d4e5d86_800x502.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/69424bb0-cb7f-44b9-8f2b-b7c45d4e5d86_800x502.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DyS9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69424bb0-cb7f-44b9-8f2b-b7c45d4e5d86_800x502.jpeg 424w, https://substackcdn.com/image/fetch/$s_!DyS9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69424bb0-cb7f-44b9-8f2b-b7c45d4e5d86_800x502.jpeg 848w, https://substackcdn.com/image/fetch/$s_!DyS9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69424bb0-cb7f-44b9-8f2b-b7c45d4e5d86_800x502.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!DyS9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69424bb0-cb7f-44b9-8f2b-b7c45d4e5d86_800x502.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/photos/FXN2ENfu-sg?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">rawpixel.com</a> on&nbsp;<a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure></div><p>Ok. The title might seem to have two contrasting statements, but let me explain.</p><p>The big hype around AI has led to many debates on whether people are going to lose their jobs when machines take over. And the obvious answer? YES! It is going to happen.</p><p>Although I believe that the existence of a so called &#8220;Artificial General Intelligence&#8221;;</p><blockquote><p><a href="https://en.wikipedia.org/wiki/Artificial_general_intelligence">Artificial general intelligence (AGI) is the intelligence of a machine that could successfully perform any intellectual task that a human being can. (wikipedia)</a></p></blockquote><p>is decades away even if it&#8217;s ever going to come up, the development of &#8220;Narrow Artificial Intelligence&#8221;;</p><blockquote><p><em><a href="https://en.wikipedia.org/wiki/Weak_AI">Weak artificial intelligence (weak AI), also known as narrow AI, is non-sentient artificial intelligence that is focused on one narrow task.(wikipedia)</a></em></p></blockquote><p>is already done and famously proven to be better than humans by developments such as AlphaGo (by Google&#8217;s DeepMind).</p><p><strong>So what can be seen here?</strong></p><h3>Machines are thousand times better than humans in &#8220;TASK EXECUTION&#8221;.</h3><p>I argue that around 4 out of 5 jobs we do today involves <strong>repetitive execution</strong> of a task at some point, that involves only a minute amount of thinking. Machines are surely going to be so good at this than us. Thousand times faster with almost no margin for error. That is good!</p><p>Think about it. We are going to get so much work done the right way and with so little time. Put into good use, see the opportunities of achieving that infinitely high efficiency and productivity! Yes please, take the jobs.</p><p>But what is left for us?</p><h3>Creativity!</h3><p>Put those brains into use. Soon gone will be the days where we could sit at a desk, execute the same tasks for years and years and expect a promotion. Mark my words.</p><blockquote><p>If you&#8217;re not constantly in that innovative mindset, you WILL be left&nbsp;behind.</p></blockquote><p>Creativity is going to be the most valuable skill to have and master in the future, in almost all areas of work. The question won&#8217;t be how well you can do something, but rather how creative can you get with what you do. So that you can pivot the process and let a machine take care of the execution towards meeting the goals. With execution out of the way you&#8217;ll have so much more time to be creative about the next move.</p><h3>So this is good for humanity, isn&#8217;t&nbsp;it?</h3><p>I argue that Artificial Intelligence will create a world of greater productivity and lesser mistakes with machines taking care of the execution. Along with that will be a generation with a more creative and an innovative workforce who will enjoy more time in their hands to think out-of-the-box that will pave the way for more great inventions going forward.</p><p>Food for thought!</p>]]></content:encoded></item></channel></rss>