<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[The Data League - Medium]]></title>
        <description><![CDATA[League of Xtraordinary Data Enthusiast - Medium]]></description>
        <link>https://medium.com/the-data-league?source=rss----ed4e5a798325---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>The Data League - Medium</title>
            <link>https://medium.com/the-data-league?source=rss----ed4e5a798325---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 16:25:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/the-data-league" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Future of Artificial Intelligence]]></title>
            <link>https://medium.com/the-data-league/the-future-of-artificial-intelligence-36b63fd1518?source=rss----ed4e5a798325---4</link>
            <guid isPermaLink="false">https://medium.com/p/36b63fd1518</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai-ethics]]></category>
            <category><![CDATA[cyborg]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[future-technology]]></category>
            <dc:creator><![CDATA[Agbo Dozie]]></dc:creator>
            <pubDate>Tue, 04 Jun 2019 08:23:07 GMT</pubDate>
            <atom:updated>2019-06-06T12:47:12.313Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vD2Z879DCqUsw3pYOIx6lQ.jpeg" /></figure><p>If you have seen the 2017 movie <strong>Salvation</strong>, you would probably be as impressed as I was with the extraordinary ability of the brilliant Darius Tanz who was trying to save humanity from the impending asteroid collision of the day. But more impressive was the superpower capabilities he had, not the kind of movie stars in <strong>Avengers Endgame</strong> however, but a kind that was imposed by his Personal Assistant AI robot, Tess! That was representative of a lot currently going on in reality — robots are making us superheroes, from managing and forecasting sales in a way that could probably only been pulled off by prophets of the order of Nostradamus, to quickly completing tasks infamous for how they feed on time. They have become an invaluable component of our existence — probably inevitable too.</p><p>As most of us already know, technology is grossly affecting our daily lives, impacting virtually everything we do.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*66T3Timq7_C3mJ9VYYL1Wg.png" /></figure><p>In fact, there would soon be only a handful of things not affected by technologies. And AI has been the chief of them. The field has grown since the 80s into the current time, a growth accelerated faster towards the tail of the years than the head. Looking retrospectively, we may gain sufficient insights about the future of this technology. After all, that is what is at the heart of AI, or more accurately Machine Learning.</p><p>Although, as with anything associated with intelligence, it is hard to tell how they will evolve, but the future of AI is one that is highly interwoven with the lives of human beings. We intend to scratch the near future of the technology, a little beyond the recent self-driving cars and its impact in businesses. Shall we take a peek?</p><p>Some fields that are and would keep experiencing the radical invasion of AI include:</p><p><strong><em>· Transportation</em></strong></p><p>Today is the era of self-driving cars. The tech pioneer Elon Musk has promised a fleet of full self-driving Tesla vehicles by next year, BMW and Mercedes have launched theirs, and Uber testing out their lidar-equipped AI-equipped automobiles. I guess you already know where I am going with this. It may sound freaky-creepy-exciting to some people, but it is a step for mankind as a whole, and a leap for machines into another vital part of our lives.</p><p>Just recently, the International Institute for Sustainable Development produced a report stating that the testing of fully autonomous long-distance trains is already underway. Also, a 2015-founded Chinese startup TuSimple , successfully completed a 200-mile test drive for a driverless truck passed from Yuma, Arizona, to San Diego, California. The startup used 10s of millions of miles of simulated driving was used to train the dense neural network behind the vehicle. There seem to be no relenting; autonomous bikes and cars are future “inevitables”.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fj6cvcVqIpekW4%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fj6cvcVqIpekW4%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExOWI3MDFweWUxZ2IzbDI4dDJjb3l0ODExeTA2b3R1Y244aXp4aGQzMiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2Fj6cvcVqIpekW4%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="291" frameborder="0" scrolling="no"><a href="https://medium.com/media/56aa1d535b45f444bd0dd132e9011084/href">https://medium.com/media/56aa1d535b45f444bd0dd132e9011084/href</a></iframe><p>We would not have to worry about parking spaces as it would be cheaper for your car to just drive back home, and the pharmaceutical companies could cut down cost by using delivery EVs as opposed to setting up retail outlets. These vehicles would be available to the market by 2020.</p><p><strong><em>· Health</em></strong></p><p>This area is undergoing serious transformation, with AI systems now involved in diagnostics, medical recommendation, and emergency services. And in this regard, the IBM Watson system is a pioneer. The system leverages both Machine Learning and Natural Language Processing modules, and has made promising progress in oncology. For example, in a cancer research, 99% of the treatment recommendations from Watson are coherent with the physician decisions!</p><p>We also have Google DeepMind Health studying patient data to make diagnostics, and Atomwise — a deep learning app that help companies make breakthroughs in rolling out new drugs, as well as Ginger.io an app which looks at a patient’s history and then leverages cutting-edge data-driven solutions to proffer mental health improving recommendations.</p><p>Although there are a number of drawbacks in this area, as there are strict regulations and challenges associated with data exchange in this sector. Indeed everyone is entitled to keeping their medical records private; so exchanging data between medical institutions has been a challenge. AI will solve this problem in the future, and give you that privacy you deserve.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*6X0HsVumXRCY2cKxkCqqSQ.jpeg" /><figcaption>Ok, thats way too far, can’t I have a private thought?</figcaption></figure><p>Thanks to the recent innovations — Federated Learning — the marriage of AI with Blockchain, that allows for models to be trained with preservation of privacy; we hope that would help in the future to solve the data exchange issue.</p><p><strong><em>· Cybernetics</em></strong></p><p>This part is one area that is very dear to my heart. I have a goal to figure out how the Universe works, and will likely do that both with my mind and a machine’s. Cyborgs are no longer a science fiction thing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pBx6oYosleCX3f7VFyuxWA.jpeg" /></figure><p>Thing of it for a moment, that you could implant a chip in your nervous track that connects you to the tons of information on the internet, that brain cells can be cultured in the laboratory, that biological brains can be embedded in machines and artificially developed brains can be connected to biological systems — BCIs. It’s a lot to imagine, I know, but that is the future. It will be commonplace to blink your eye and scroll through your textbooks under your eyelid. Ok, I guess I would leave it here before you start finding this funny. But keep in mind that personal assistant robots are becoming more popular than ever, and there are already concrete developments of facial recognition systems, biometric AI, and machines that provide empathetic responses. Where do you think that is going?</p><p><strong><em>· Entertainment</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*CP8HZ1KdP2m8RL5dGGStsw.png" /><figcaption>Hi Granny, I guess you have to adjust your glass well enough</figcaption></figure><p>From Netflix using AI for movie recommendation, to sites like Spotify and Pandora that use AI to help you create stations that exclusively play your favorite music, entertainment is far from being immune to the invasion. But these are just the tip of the iceberg of the extent to which AI will cater to our entertainment interests. In the future, AI applications may analyze our interests and draw upon them to create music and shows that use digital performers! Now given that everything will be based on personal preferences, you’ll rarely have to sit through a song you don’t like. If you are like me, you probably have popped a bottle of beer to that.</p><p>As earlier stated, it is difficult to tell where the journey goes with AI, but we can forecast, only forecast; well, also create. But while the technology is forming a big pat of our lives, we must keep some other considerations in mind.</p><p><strong>Other Considerations</strong></p><p>Some say the singularity of Artificial Intelligence is near; that point where artificial circuits starts to replicate themselves at molecular level, uniting with biological neurons, forming a network of extreme intelligence and with extraordinary powers like telepathy. It sounds like doomsday if such Intelligence decides to mete havoc upon humanity, right? At least that’s how it sounds to me. But it also sounds unrealistic to me too, at least not anytime soon. There are however considerations to make machines more intelligent and less artificial, just in case.</p><p>There are also ethical considerations to the technology. As UNESCO’s (United Nations Educational, Scientific and Cultural Organization) Director-General Audrey Azoulay opened this year’s global Conference, she said,</p><blockquote>“The issues raised by artificial intelligence are not technological. They concern our own humanity, raising scientific, political, philosophical and ethical questions.”</blockquote><p>When AlphaGo beat Go player of 9 dan rank Ke Jie 3 times, he made the following remark:</p><blockquote>“It’s perfect, it’s just flawless, merciless. I don’t think I could catch up with it in my lifetime”.</blockquote><p>And with recent advances in the field prospectively looking at intruding into people’s thoughts, there is a strong call for ethical considerations.</p><p><strong>It is still a question whether machines would eventually develop human-like minds. Well in philosophy, the story has it that Rene Descartes while in a bar made the remark, “I think, therefore I am”. These machines now think, technically. So its either they are a consciousness of their own, or Descartes was probably drunk.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*oxii0yc-Iea6mNtGxQJimw.jpeg" /><figcaption>Would we still be as ‘conscious’ as we think we are?</figcaption></figure><p><strong>I would not make a comment on this, but retain my position and stay open to the possibilities — there are indeed limitless possibilities, and so is it with the future of AI.</strong></p><p>Please leave a clap if you found this post interesting. Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36b63fd1518" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-data-league/the-future-of-artificial-intelligence-36b63fd1518">The Future of Artificial Intelligence</a> was originally published in <a href="https://medium.com/the-data-league">The Data League</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The mathematics and Intuitions of Principal Component Analysis (PCA) Using Truncated Singular…]]></title>
            <link>https://medium.com/the-data-league/the-mathematics-and-intuitions-of-principal-component-analysis-pca-using-truncated-singular-b4944e5e95e6?source=rss----ed4e5a798325---4</link>
            <guid isPermaLink="false">https://medium.com/p/b4944e5e95e6</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Lukmon AYINLA]]></dc:creator>
            <pubDate>Sun, 21 Apr 2019 10:14:13 GMT</pubDate>
            <atom:updated>2019-04-26T14:29:53.058Z</atom:updated>
            <content:encoded><![CDATA[<h4>The Mathematics and Intuitions of Principal Component Analysis (PCA) Using Truncated Singular Value Decomposition (SVD)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*MIXxXGSw2IoXL6BvMGomcw.jpeg" /></figure><p>As data scientists or Machine learning experts, we are faced with tonnes of columns of data to extract insight from, among these features are redundant ones, in more fancier mathematical term — co-linear features. The numerous columns of features without prior treatment leads to curse of dimensionality which in turn leads to over fitting.</p><p>To ameliorate this curse of dimensionality, principal component analysis (PCA for short) which is one of many ways to address this, is employed using truncated Singular Value Decomposition (SVD).</p><p>Principal Component Analysis starts to make sense when the number of measured variables are more than three (3) where visualization of the cloud of the data point is difficult and it is near impossible to get insight from.</p><p><strong><em>First: Let’s try to grasp the goal of Principal Component Analysis. The following should put in mind:</em></strong></p><ol><li>Is the number of samples (m) much less than the number of measured variables(d) — i.e number of columns in a data frame m&lt;&lt; d</li><li>The goal of PCA is to get a subspace (i.e a lower dimensions) and projecting the cloud of data points to the subspace without losing information embedded in the original data with higher dimensions, so are looking for vector that maximizes the variation of the data.</li></ol><p>Assuming the original data is in d-dimensional space, the goal is to arrive at a new data points in p dimension where p &lt;&lt;&lt; d ( for worst case scenario is p = d). That is the<strong> intuition</strong>.</p><p>The<strong> intuition </strong>can be represented mathematically as thus;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*OlM9-PDVD1EXzkmccMMs0w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/237/1*gCuPJ8MOMVPr71fnVsIEUQ.jpeg" /><figcaption>2D subspaces in a 3D space.</figcaption></figure><p>I would like to divide this analysis into the following;</p><ol><li>Understanding the concept of projection.</li><li>Principal Component Analysis itself.</li><li>PCA via truncated Singular Value Decomposition.</li></ol><h3><strong><em>Understanding the concept of projection.</em></strong></h3><p>As discussed earlier the main goal of PCA is to arrive at a subspace i.e. lower dimensional space without losing much information.</p><p><strong>Intuition:</strong> Before principal component analysis is carried out on a data set, the data must be centered by subtracting the mean of each measured variables from data points corresponding to the mean axis, so that the summation of all data points is zero.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QoabKkZ8CiEH6X-vWtfW2w.png" /><figcaption>Centered Data</figcaption></figure><p><strong>Mathematics:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/169/1*0analSjeriAZkgaKFiKkLQ.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/133/1*PJy9sCNjyH4YOGVP48mnzw.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/289/1*VzJ6FV7l57NDb7U2-grnbA.gif" /></figure><p>The center shifted data point does not change their positions relative to each other.</p><p><strong>Intuition:</strong> After the data is centered on the origin, we start drawing a random line given that it has to pass through the origin and fitting the line as much as possible on the data points. So, how does PCA know that a line is of the best fit ? This is done by projecting the data points on the line and checking the line that best minimizes the distances between the data points. and the line or the line the best maximizes the distances between the point of the projected data on the line and the origin. This forms an <strong><em>optimization problem.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OwbejRTgkItFyszB8GDIoA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dn3mXyI0-TpmoDhg1p6_5g.png" /></figure><p><strong>Mathematics: </strong>The length of the projected data points from the origin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*ih3PrZG3ysTLtaaj9bDLPA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/67/1*oHIbIqU-4JO8Lmga7h8MRQ.gif" /></figure><p>As said earlier, this results into an optimization problem considering the fitted line that maximizes the length of the projected data points from the origin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/185/1*B2mcOloT9DXvoTn4vCQopg.gif" /></figure><p>The lengths of the projections are squared to avoid cancellation of positive values by the negative values.</p><p>Let’s express J(phi) in terms of sample covariance of the data.</p><p><strong>Intuition: </strong>A quick one,<strong> <em>Covariance </em></strong>is the joint variation between two random variables from their corresponding expected value or mean.</p><p><strong>Mathematics:</strong> Where covariance, C is expressed as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/100/1*_kvFlZxBOSIDqORYpr5k3A.gif" /></figure><p>J(phi) can be written in terms of covariance as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/130/1*T0q8u3pUEiMaLh2CfOWFWA.gif" /></figure><h3><strong><em>Principal Component Analysis itself.</em></strong></h3><p><strong>Intuition:</strong> The purpose of PCA is to find that candidate axis with the maximum of sum of squared distances between the projected point of the fitted line and the origin, J(phi).</p><p><strong>Mathematics:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/142/1*986rNEhV2r4PK2vVQ5hP5Q.gif" /></figure><p>Let’s recall the objective function to be optimized and the span of the candidate axis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/130/1*T0q8u3pUEiMaLh2CfOWFWA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/67/1*oHIbIqU-4JO8Lmga7h8MRQ.gif" /></figure><p>Squaring both of the above equation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/67/1*eb1Namw7dPUdiS4gmKoc-w.gif" /></figure><p>Rewriting the above equation which forms the constraint of the maximization of the objective function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/66/1*VRNqZoaKi3A5AeVwhLBqOA.gif" /></figure><p>There is a mathematical trick to achieve this which is known as the <strong><em>Lagrange Multiplier.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/230/1*ifXP9fMA8P0oplE_OJErYQ.gif" /></figure><p>Recall;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/130/1*T0q8u3pUEiMaLh2CfOWFWA.gif" /></figure><p>So,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/253/1*g3IU5gCF7fWkaH9MwUkEHA.gif" /></figure><p>Finding the derivative of J with respect to phi and lambda respectively</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/196/1*WvL_NqvuMRVwoM5R3-kXQQ.gif" /></figure><p>Equating the derivative of the Lagrange Multiplier to zero forms an Eigen problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/253/1*vqCU5K01MOLjHaBPdb_gsw.gif" /></figure><p>So, we are on the search for eigen pairs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/57/1*zAlR4sGwWbC5jkEjEeJyVA.gif" /></figure><p>We are close to getting the principal components of the subspace of the original data, and there arise an eigen problem where the only know variable is formula above is the covariance matrix. This takes us to the final stage of solving PCA.</p><h3>PCA via truncated Singular Value Decomposition (SVD).</h3><blockquote>Singular value decomposition (SVD) is known as a Swiss Army Knife of Linear Algebra</blockquote><p><strong>Intuition: </strong>And what we want, is to solve the eigen problem that came up in Principal Components Analysis (PCA). There is a fact from the concept of Linear Algebra that every matrix X has a singular value decomposition. This implies that we can factorize or decompose X into three (3) matrices which are:</p><ol><li>Left singular vector, U.</li><li>Diagonal matrix, SIGMA.</li><li>Right singular vector, V.</li></ol><p><strong>Mathematics:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/111/1*mwomQosTUYKML70JN3WnyA.gif" /></figure><p>The dimension of X is (m x d), usually m greater than or equal to d, the dimension of U is (s x m), the dimension of sigma is (s x s) while the dimension of V transpose is (s x d) where;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/111/1*QVi-5mbwN3I6jo0E83tdSg.gif" /></figure><p>The left singular vector, U is orthogonal which implies that:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/75/1*7kw3lMh41g-QQ6_KOVdGpw.gif" /></figure><p>where I is an Identity matrix with dimension (s x s).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/161/1*CFq5F3jDJjVg8EWxv6aQ7A.gif" /></figure><p>sigma is the singular values. where</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/183/1*P8_8PvW6RSs8TpTq7Jwfyw.gif" /></figure><p>Starting with the covariance matrix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/100/1*_kvFlZxBOSIDqORYpr5k3A.gif" /></figure><p>Recall;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/111/1*mwomQosTUYKML70JN3WnyA.gif" /></figure><p>Substitute X in the covariance matrix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/237/1*Duw71Gp_xK1fXZ3ahkJXBg.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/227/1*Zoz1isqvzlQK9xZxRoy8QQ.gif" /></figure><p>Recall;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/75/1*7kw3lMh41g-QQ6_KOVdGpw.gif" /></figure><p>We will be left with,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/158/1*bZuU8_Fw-LjB7iWCIq2Jlw.gif" /></figure><p>Rearrange;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/133/1*sf2uXLpcrfFPJA8nIxlwTw.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/134/1*CHMjWenAk0lzaV3ko_T2bw.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/183/1*ua-5ulprSauVLbBrrrvzuA.gif" /></figure><p>At elemental level,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/133/1*PjdySucnAjtO2hDjWNzrCQ.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/179/1*nx8juaEXrsiJ2mqc7MWmKw.gif" /></figure><p>So, let’s start viewing SVD as this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*npUFvCYSUFybNKnLrq72xA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*kbWFk2cXzxinZoN6MrrF6w.gif" /></figure><p>By convention, the singular values occur in descending order.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/177/1*m4fmzyNClZpCDeNcOlC4Hw.gif" /></figure><p>We can look at X as a running sum of different matrices. So, let’s approximate the original singular value decomposition (SVD) using the first r-term where r &lt; or = s.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/171/1*WX-xsnYEK8rAgA7CtxI9rQ.gif" /></figure><p><strong>In summary:</strong></p><ol><li>Centralized the data X</li><li>Compute the below using r-truncated SVD</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/117/1*4VyoAsDpY5hnP57JKNs8Mw.gif" /></figure><p>3. Let the right singular vector Vr be the new axis that is, the principal component, such that:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/183/1*EeTtf2WiYiiVGMWROJMbMg.gif" /></figure><p>Let’s have a chit chat in comment below if you find anything wrong in this article, or anything you feel is missing, I am willing and ready to learn.</p><p>You can follow me on Medium and also on Twitter<strong> </strong><a href="https://twitter.com/LukmonAyinla2"><strong>@LukmonAyinla2</strong></a> for more update</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4944e5e95e6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-data-league/the-mathematics-and-intuitions-of-principal-component-analysis-pca-using-truncated-singular-b4944e5e95e6">The mathematics and Intuitions of Principal Component Analysis (PCA) Using Truncated Singular…</a> was originally published in <a href="https://medium.com/the-data-league">The Data League</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Twitter Sentiment Analysis]]></title>
            <link>https://medium.com/the-data-league/twitter-sentiment-analysis-532b4ae674e2?source=rss----ed4e5a798325---4</link>
            <guid isPermaLink="false">https://medium.com/p/532b4ae674e2</guid>
            <category><![CDATA[twitter]]></category>
            <category><![CDATA[sentiment-analysis]]></category>
            <category><![CDATA[twitter-data]]></category>
            <category><![CDATA[school-of-ai]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[BUSIRAH HAMMED]]></dc:creator>
            <pubDate>Fri, 12 Apr 2019 22:43:54 GMT</pubDate>
            <atom:updated>2019-04-12T22:43:54.221Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Teef1oieMgAklE7r.jpg" /></figure><p>Twitter is a popular social network where users can share thoughts. Getting people’s impression on a tweet is actually an awesome idea. I can actually get to know what people think about a particular brand, celebrity, personality.</p><p>Getting Twitter data has been made very easy using Twitter API, you can check my first article with UB women publication <a href="https://medium.com/@h_bushroh/data-mining-with-tweepy-577e8f9a16c8">here</a> on how to setup Twitter application and generate a Consumer Key, Consumer Secret, Access Token, and Access Token Secret.</p><pre>consumerKey = ‘XXXXXXXXXXXXXX’<br>consumerSecret = ‘XXXXXXXXXXXXXX’<br>accessToken = ‘XXXXXXXXXXXXXX’<br>accessTokenSecret = ‘XXXXXXXXXXXXXX’</pre><p>I’ll be using Tweepy to access Twitter data. Tweepy is a python library for accessing the Twitter API. The next step is API authentication, Authentication API enables you to manage all aspects of user identity when you use Auth0.</p><pre>auth = tweepy.OAuthHandler(consumerKey, consumerSecret)<br>auth.set_access_token(accessToken, accessTokenSecret)<br>api = tweepy.API(auth)</pre><p>You can now access Twitter data; I’ll be using api.search() from Tweepy to get my search, I am also using Cursor module,tweepy.Cursor() handles pagination so I can specify the number of tweets I want to get.</p><pre>tweets = tweepy.Cursor(api.search, q=’davido’).items(200)</pre><p>Now that I have my tweets ready I can get several attributes from the tweet, I can get tweets from a particular region, language, time a tweet was created. What I need for this project is tweets written in English, I am getting the text body of the tweet using tweet.text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*341sQGwvxyJz-EZnRuf0Tg.png" /></figure><p>I can start preprocessing my text by applying various preprocessing techniques like tokenization and lemmatization. You can check my article on text wrangling <a href="https://medium.com/machine-intelligence-team/text-wrangling-and-cleansing-with-nltk-8e55fa25c28b">here</a>. I’ll be using NLTK for preprocessing. NLTK(Natural Language Processing toolkit) is a tool for building Python programs to work with human language data.</p><p>The first thing I’ll be doing is to remove unwanted symbols using regex expression, tokenize data, remove common words and turn each word to its root level by lemmatizing the text. Lemmatization is the process of turning a text to its root word. Let’s have a view of our clean data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qUwKd1H4vywdHuj0-bTymQ.png" /><figcaption>root_text</figcaption></figure><p>After getting our data we need to classify tweets into positive and negative. In this series, I’ll be using TextBlob to classify tweets into different sentiments (positive, negative ). Texblob is a library for processing textual data, It provides a simple API for diving into common natural language processing tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F_lG21CfgfwaS9AmrgWeZg.png" /><figcaption>classify tweets into positive and negative</figcaption></figure><p>Now we are done with our sentiment analysis, the next step is to save and read data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SMOSry-hYR6jo0DgFtFLhw.png" /></figure><p>From here we can visualize, I am visualizing so I can understand the data better.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*6gjAnyeouS8Ubydlp5RlzQ.jpeg" /></figure><p><strong>Conclusion:</strong></p><p>Thanks for reading, I love feedbacks please let me know what you think. You can access the full code <a href="https://github.com/hammedb197/data-lit/blob/master/tsa.ipynb">here</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl0HlSF89is7bCAjte%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl0HlSF89is7bCAjte%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Fl0HlSF89is7bCAjte%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="314" frameborder="0" scrolling="no"><a href="https://medium.com/media/a3b1f75621976d22318e7c592f9f47af/href">https://medium.com/media/a3b1f75621976d22318e7c592f9f47af/href</a></iframe><p><strong>Resources:</strong></p><p><a href="https://auth0.com/docs/api/authentication#post-passwordless-verify">https://auth0.com/docs/api/authentication#post-passwordless-verify</a></p><p><a href="https://tweepy.readthedocs.io/en/v3.5.0/index.html">Tweepy Documentation - tweepy 3.5.0 documentation</a></p><p><a href="https://textblob.readthedocs.io/en/dev/quickstart.html#sentiment-analysis">https://textblob.readthedocs.io/en/dev/quickstart.html#sentiment-analysis</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=532b4ae674e2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-data-league/twitter-sentiment-analysis-532b4ae674e2">Twitter Sentiment Analysis</a> was originally published in <a href="https://medium.com/the-data-league">The Data League</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Sentiment Analysis?]]></title>
            <link>https://medium.com/the-data-league/what-is-sentiment-analysis-8974dbe55866?source=rss----ed4e5a798325---4</link>
            <guid isPermaLink="false">https://medium.com/p/8974dbe55866</guid>
            <category><![CDATA[opinion-mining]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[sentiment-analysis]]></category>
            <category><![CDATA[social-media]]></category>
            <dc:creator><![CDATA[Adeola Afolayan]]></dc:creator>
            <pubDate>Fri, 05 Apr 2019 12:24:39 GMT</pubDate>
            <atom:updated>2019-04-05T12:24:38.966Z</atom:updated>
            <content:encoded><![CDATA[<h3>Did you know that you can automatically direct your social media mentions to team members that are most suitable to respond? Let me explain.</h3><p>Suppose you (an entrepreneur) have recently launched a new digital product and you really want to find out your users’ opinion about your product. Considering the population of people on social media, your customers are definitely there and they would likely be talking about you. Twitter might be a good place to look for your product mentions.</p><p>As a proactive entrepreneur, You have logged on Twitter to search for related keywords to your product, and right to your face you see thousands of search results. You probably have thought about a way to collect all of these results and maybe perform some sorts of analysis on them…meanwhile scrolling through the search results you notice some words are very consistent, you know the most suitable team member(s) to address these concerns, yet you are not sure how to make sense of these texts!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f3uApGI6VnEY8Q2-kwvkKA.jpeg" /><figcaption>Twitter web</figcaption></figure><p>You don’t want to leave all these opinions bare because the pen they say is mightier than the sword and with today’s internet technology, such opinions can either make or mar your business.</p><p>As with every problem in life, there is a solution! You can automatically detect the number of reviews, and the message behind the reviews. You can even direct such reviews to the most suitable team member(s) to address the opinion. For instance, you can direct a Twitter mention to your software design team for design related mentions in order to apply the appropriate action necessary for the mention.</p><p>Spoiler alert, this is not a twitter enhanced feature!</p><p>It is a section of the natural language processing field that is used to analyze text-based data. The description above is only one of the several applications of <strong>Sentiment Analysis</strong>. It is also popularly referred to as opinion mining.</p><p>With the outburst of text related data via blogs, websites, news platforms, social media, and the various opinion sharing platforms, internet users are continuously putting out reviews, opinions and discussing topics within the ecosystem such as movie reviews, hotel reviews, news stories, and even elections.</p><p>Sentiment analysis helps make sense of unstructured text data, after all, 80% of the world’s data is unstructured. It is therefore important that we maximize tools like Sentiment analysis to draw out insights from data. Sentiment analysis does not only identify opinions but also extract attributes of these opinions.</p><p>Sentiment analysis uses the level of polarity (by measuring the level of positivity, negativity, and neutrality in a set of texts), emotion detection (also called lexicon analysis) and intent analysis(used to determine the purpose behind a text) to bring valuable insights to text-based data.</p><p>It is built on 2 major approaches which include rule-based and automatic approaches. The rule-based approach matches words with preferred scores from a lexicon and applies these scores to the data set. The automatic approach uses machine learning technique by training a set of data to generate an algorithm, this algorithm is used to extract relevant knowledge from data. The rule-based approach is not sufficiently accurate as it’s a manual selection of keywords and it is not scalable. The automatic approach is considered to provide more accurate results and highly scalable, although it requires a training data set to form its algorithm.</p><p>Sentiment analysis can be applied across all sectors where human interaction is required, be it medicine, banking, the stock market, marketing, education, oil and gas. It’s a good way to put free available opinions to test and draw out interesting results.</p><p>Whenever you need to make sense of text-based data, think <strong>Sentiment Analysis</strong>, think <strong>Opinion Mining</strong>!</p><p>#sentimentanalysis #machinelearning #opinionmining #datascientist</p><p>PS: This post is a response to the challenge by <a href="https://medium.com/u/b128f28c5632">Ibrahim Gana</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8974dbe55866" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-data-league/what-is-sentiment-analysis-8974dbe55866">What is Sentiment Analysis?</a> was originally published in <a href="https://medium.com/the-data-league">The Data League</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ANALYTICAL HIERACHY PROCESS FOR SELECTING THE BEST PRESIDENTIAL CANDIDATE]]></title>
            <link>https://medium.com/the-data-league/analytical-hierachy-process-for-selecting-the-best-presidential-candidate-dc77bf1d4f1c?source=rss----ed4e5a798325---4</link>
            <guid isPermaLink="false">https://medium.com/p/dc77bf1d4f1c</guid>
            <category><![CDATA[ahp]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[leadership]]></category>
            <dc:creator><![CDATA[Eniola Olaleye]]></dc:creator>
            <pubDate>Sun, 17 Mar 2019 21:44:44 GMT</pubDate>
            <atom:updated>2019-03-17T21:45:39.478Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>ANALYTICAL HIERARCHY PROCESS FOR SELECTING THE BEST PRESIDENTIAL CANDIDATE</strong></p><p><strong>ASSIGNMENTS</strong></p><p><strong>COURSE : MATHEMATICAL MODELING FOR ARTIFICIAL INTELLIGENT SYSTEMS</strong></p><p><strong>UNIVERSITY OF LAGOS (DEPARTMENT OF SYSTEMS ENGINEERING)</strong></p><p>YOU CAN GET THE LINK TO MY CODES HERE</p><p><a href="https://github.com/galileoSolution/AHP-ASSIGNMENTS-UNILAG/blob/master/AHP%20ASSIGNMENT.ipynb">galileoSolution/AHP-ASSIGNMENTS-UNILAG</a></p><p>First of all what is AHP?</p><p>Analytic Hierarchy Process (AHP) is one of Multi Criteria decision making method that was originally developed by Prof. Thomas L. Saaty. In short, it is a method to derive ratio scales from paired comparisons. The input can be obtained from actual measurement such as price, weight etc., or from subjective opinion such as satisfaction feelings and preference. AHP allow some small inconsistency in judgment because human is not always consistent. The ratio scales are derived from the principal Eigen vectors and the consistency index is derived from the principal Eigen value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*oxVtkpG8gi12rp0yv_IELA.jpeg" /><figcaption>THAT DEFINITION IS TURNIONIWON.</figcaption></figure><p>The <strong>Analytic Hierarchy Process (AHP)</strong> is a structured technique for organizing and analyzing complex decisions.</p><ul><li>It is a practical approach to solving complex decision problems involving the comparisons of attributes or alternatives.</li></ul><h3>Reasons to Use Analytic Hierarchy Process for Collaborative Decision Making</h3><h3>1. Well-proven</h3><p>For the last 30–35 years AHP has been thoroughly tested by thousands of organizations from around the globe… and it seems to work!</p><p><strong>There are lots of case studies that describe how large organizations used AHP for their strategic decisions to achieve better outcomes.</strong></p><h3>2. Broad set of applications</h3><p>When you look into the case studies you will notice that it was used for variety of decision making problems.</p><p><strong>There are AHP applications related to </strong><a href="https://www.transparentchoice.com/project-prioritization"><strong>project prioritization</strong></a><strong>, vendor selection, technology selection, site selection, hiring decision and more…</strong></p><p>Having one good approach lets good decision making become part of your everyday processes; part of your culture.</p><h3>3. Intuitive and easy to use</h3><p><strong>People don’t feel comfortable taking recommendations from software if they don’t understand how it works.</strong> They don’t need to know the details but they want to understand the idea behind it.</p><p>For AHP, you break a complex decision into explicit goals, alternatives and criteria. You prioritize criteria and evaluate alternatives in light of those criteria. People get it.</p><p>In contrast, some more recently developed methodologies have a process and underlying math that is so complex that the software becomes a <em>“mathematical black box”</em>. It takes your input and returns recommendations. What happens in between is a mystery (at least for a regular human being) and that undermines trust. And <a href="https://blog.transparentchoice.com/importance-of-confidence-to-project-outcomes">trust is really important</a> when it comes to the final outcome.</p><p><strong>Using Analytic Hierarchy Process for your collaborative decision making works because, with AHP, you can explain how it works.</strong></p><h3>4. Designed for multi-criteria</h3><p><strong>When you make important decisions, there are always conflicts between criteria.</strong> For example, “minimizing price” and “maximizing quality” are often contradictory goals. This is made worse when you’re working in a team. Collaborative decision making, by definition, means people have different views and priorities.</p><p>Decision making best practice involves taking into account all important criteria. However, this “best practice” is often ignored as <em>multi-criteria analysis is much more challenging than, say, making a decision based on just the price</em>.</p><p><strong>Analytic Hierarchy Process allows you to take into account all important criteria and to organize them into a hierarchy.</strong></p><h3>5. Builds alignment around criteria priorities</h3><p>Some decision-making methodologies ask participants to assign weights to criteria. The question is, <em>“How should I set those weights?”</em> Well, however Fred in Finance does it, Sally in Sales will disagree.</p><p><strong>Participants always have different priorities and without a supporting process, it is hard to reach consensus. Some methodologies are missing this key mechanism. It leaves your group with an unresolved problem.</strong></p><p>And then the very smart quants dive in. They’ve developed another group of methods where weight of criterion is not a value but function. From theoretical point of view this might be a good concept but it is usually very hard to use for real collaboration.</p><p>If it is hard to agree on a value, and people need sensitivity analysis to check different scenarios, it will be much harder to agree on a function with a weird shape. How was the function developed? Shouldn’t it be a bit different? Remember what I wrote about <em>“mathematical black boxes”</em>? This is another. And it’s a Pandora’s box. I wouldn’t recommend you open it unless you want to spend a lot of time with equations and whiteboards.</p><p><strong>In AHP, setting priorities is resolved with pairwise comparisons.</strong></p><ul><li>Each participant is individually asked, “Is A or B more important, and by how much?”</li><li>After that, you review comparisons together, discuss and try to reach consensus on their values.</li><li>If consensus is not possible you can use average value and move forward.</li><li>Then, your collaboratively-agreed comparisons are translated into weights by an algorithm.</li></ul><p><strong>This is a process that is centered on collaboration and which has a mechanism that helps to eliminate deadlocks.</strong></p><h3>6. Validates consistency</h3><p>We are all humans and it’s our prerogative to be inconsistent sometimes. We make mistakes. When we make collaborative decisions there are multiple people that can make mistakes and be inconsistent. Is there any wonder so many group decisions end in deadlock and confusion?</p><p><strong>Fortunately, AHP can eliminate some of these problems. You deliver redundant data (more than needed) and an algorithm checks to see if your input is consistent.</strong></p><p>Good supporting software can then identify these inconsistencies and help you address the ones that need to be addressed.</p><h3>Good concepts stand the test of time…</h3><p>The ancient Greeks invented democracy, and it’s still the most successful system of government. But nobody today would implement it the way they did 2,000 years ago. So it is with AHP.</p><p><strong>Analytic Hierarchy Process is not the latest methodology but it is a well-proven process for collaborative decision making. It is one that is accessible to everyone and is affordable so that it can be used for decisions large-and-small.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*R-saO-Xe-E1iD9PgNfcKOQ.jpeg" /><figcaption>Time for the main deal</figcaption></figure><p>RANKING OF CRITERIA <br>I chose Four attributes which are as follows:<br>1. Education<br>2. Age<br>3. Truthful<br>4. Integrity</p><p>Three alternatives were chosen for the presidential election as follows:<br>1. BUHARI<br>2. ATIKU<br>3. FelaDurotoye</p><p>check this link on how i went about with it</p><p><a href="https://github.com/galileoSolution/AHP-ASSIGNMENTS-UNILAG/blob/master/AHP%20ASSIGNMENT.ipynb">galileoSolution/AHP-ASSIGNMENTS-UNILAG</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*P5dxUh_EPrb3wmw1V6-_kw.jpeg" /><figcaption>DONT WORRY ALMOST DONE</figcaption></figure><p>AFTER RANKING MY CRITERIA I.E THE ATTRIBUTES THIS IS WHAT I GOT ON HOW TO CHOOSE A GOOD PRESIDENTIAL CANDIDATES</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kb75Gk3TytD-fYSe4pKwzg.jpeg" /><figcaption>THIS IS IT OO THE ATTRIBUTES OF A GOOD PRESIDENTIAL CANDIDATE</figcaption></figure><p>DONT FORGET TO CHECK MY CODES FOR MORE DETAILS</p><p>AND PLEASE GIVE IT A CLAP IF YOU LIKE IT</p><p>REGARDS</p><p>ENIOLA</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc77bf1d4f1c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-data-league/analytical-hierachy-process-for-selecting-the-best-presidential-candidate-dc77bf1d4f1c">ANALYTICAL HIERACHY PROCESS FOR SELECTING THE BEST PRESIDENTIAL CANDIDATE</a> was originally published in <a href="https://medium.com/the-data-league">The Data League</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>