<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Adebayo Oluwatosin on Medium]]></title>
        <description><![CDATA[Stories by Adebayo Oluwatosin on Medium]]></description>
        <link>https://medium.com/@adebayotosin101?source=rss-845eedcef55d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*oOU84IAMJdZfwoP7Cldm_A.jpeg</url>
            <title>Stories by Adebayo Oluwatosin on Medium</title>
            <link>https://medium.com/@adebayotosin101?source=rss-845eedcef55d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 11:42:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@adebayotosin101/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Your Favorite Activation Functions.]]></title>
            <link>https://medium.com/analytics-vidhya/your-favorite-activation-functions-c6fbe8e22b7b?source=rss-845eedcef55d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6fbe8e22b7b</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[sigmoid]]></category>
            <category><![CDATA[activation-functions]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Adebayo Oluwatosin]]></dc:creator>
            <pubDate>Wed, 05 Feb 2020 12:37:11 GMT</pubDate>
            <atom:updated>2020-02-05T12:41:49.858Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everyone, Debayo here, first article of the year (I really still feel my article openings are more suited to podcasts and videos rather than print, but it is what it is)</p><p>This article will be explaining activation functions, yeah, activation functions.</p><p>Before we go into the topic itself, I want to show you why activation functions are useful or why activation functions have become an integral part of developing deep learning models</p><p>Let’s start from this angle, follow me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*KOSC6yDV-XboR_X9xf0wvA.jpeg" /><figcaption>I’ve used this meme before but i was too lazy to find another one</figcaption></figure><p>If we multiply 2 * 100 we get 200 right, we get 200 if we decide to multiply 5 * 20 * 2, the only difference in the two is that one is more expensive than the other yeah?</p><p>The same thing applies when we are building neural networks that are <strong>linear</strong>, note the word <strong>Linear </strong>and by linear i mean your regular, wx + b = y ,it is easy for me to build a 2 layer neural net and an input layer and output layer which contains the input layer multiplying the weights, but the moment I convert it to a multiple layer network, that is linear (remember the concept is based on the linearity of the network), stacking neural nets at its most basic forms doesn’t give it any more power, it is just a more expensive version of the two layered network and any change in the input layer directly affects the hidden layers.</p><p>So to cure this problem, this is a problem because when you stack linear layers together, there is no real change unlike leaving it as a single input and output model, the hidden layers are not allowed to choose or compute what they “want” and this is bad for us and that’s why it is a problem, we employ a phenomenon, Andrew Trask called ‘’sometimes correlation’’ it’s as simple as the name describes the hidden layer choose what it decides to correlate to, the hidden layer is giving the chance to compute output how it deems fit , this phenomenon introduces non-linearity to the neural network, the entities in charge of ‘’sometimes correlation” are your activation functions.</p><p>In this article I’ll be covering the important activation functions and how the create the non linearity in your neural networks and how you build them with python.</p><p>This article will be a short one compared to my previous ones (expect more from me this year! I can’t believe its February already mehn)</p><p>So basically activation functions are functions that are applied to the neurons in a layer, introducing non-linearity, basically it takes in input and provides some sort of output. They apply a mathematical transformation and produce output. Like earlier stated, they are just functions and can be built quite easily, but then not every output giving function can serve as an activation function, certain requirements or constraints limits what can serve as an activation function:</p><p>1. No matter the kind of input given, the function must give out some form of output, you shouldn’t be able to give out some form of number that doesn’t have an output value.</p><p>2. Activation Functions have to be nonlinear. if they aren’t it just defeats the purpose as to why they were created in the first place doesn’t it?</p><p>3. Activation functions also must move in one direction, it is either increasing or decreasing. It is somewhat dangerous to have multiple values of x (input) mapping to the same value of y (output)</p><p>4. Activation functions must also be very efficient. You really don’t want it to be slow to compute because you’ll be calling them on almost every layer you are building.</p><p>Now that this out of the way, let’s see popular examples of activation functions that have found use in the deep learning space in recent times and I’ll be writing about 4 of them and maybe one extra (maybe not, lol)</p><p>It is important to know that making use of an activation over another is dependent on the type of problem being solved, especially in the output layer side of things.</p><p>The activation functions we will cover today are</p><p>· Sigmoid</p><p>· Relu</p><p>· Tanh and</p><p>· Softmax</p><p>Let’s take it from the top and talk about Sigmoid first.</p><p>Sigmoid basically squeezes an infinite amount of input to fit between 0 and 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*U97Av6wPBNcAL23YzqhKlA.png" /><figcaption>sigmoid people!!</figcaption></figure><p>As we can see in the graph, all inputs have Y values that fit in either 1 or 0. Negative numbers have output closer to 0 than positive numbers, what this means is larger numbers are closer to getting an output of 1 and smaller (negative) values are more likely to have output closer to zero.</p><p>Sigmoid is majorly used in the hidden layers but can find expression in the output layer when dealing with problems with binary output (0 or 1, Just remember to round it up).</p><p>Next up, if you read online articles on building neural nets and the likes, you’d have seen this activation function like a million times, and you are not out of order, this is because ReLU (Rectified Linear Unit) is the best activation function we have around now, and this is because it makes convergence faster, it is computationally inexpensive and does not need to calculate anything.</p><p>Doesn’t calculate anything? Just follow me folks</p><p>what ReLU does basically is to turn or convert any negative input to zero and leave the positive numbers as they are.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/308/1*jQqvIaflac6s5EJY7Chb_A.png" /><figcaption>Rectified Linear Unit</figcaption></figure><p>From the graph above, it becomes clearer, how ReLU does its thing, all negative values are turned to zero and positives are left alone.</p><p>So anytime you use or see ReLU I’m sure you can explain what it is doing yeah?</p><p>Tanh is a nonlinear function that squashes values in the range of -1 and 1 and that is all that there is to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*vNnjQNxCaqKoAF8gamLqHg.png" /><figcaption>Tanh folks</figcaption></figure><p>From the graph, all values have output between -1 and 1.</p><p>The final activation function is one that we use in the output layer, it is used when we are performing multi classification problems and the idea is probabilities, yup probabilities.</p><p>The idea with this particular activation function is that it ranks the various output options that we have as probabilities. Enough of the suspense, this activation function is called Softmax. Like I stated earlier, this activation function is used when dealing with problems with multiple classes, meaning that we have more than 2 possible output values.</p><p>Take for example, we want to classify the color of balls in a sack, and in that sack we have 5 different colors, say green, red, blue, black and yellow.</p><p>If our model selects a ball, softmax might say the probability of the selected ball to be colored yellow is 0.87, and blue 0.13 etc. this means that the ball according to our model is more likely to be yellow other than other colors found in the sack.</p><p>For a more practical example, say we are building a model to detect objects in a picture, and in our training data we have say, Car, Motorcycles (heard the Lagos state government banned them in the state and people are riding horses to work now, awesome stuff really), Humans, Objects such as Traffic lights etc and finally pot holes (we have plenty of those in Nigeria).</p><p>Once we have trained a model and a label is picked, what softmax does is to give us the probability that that label is either a Human, an Object, a Pot hole, a Car or a Motorcycle, and the label with the highest probability score is regarded a the label.</p><p>Understand that the sum of the probability score should be equal to 1.</p><p>Make sense yeah?</p><p>That’s softmax.</p><p>That’s all the activation functions we’ll be dealing with in this article.</p><p>I promised an implementation of each activation function and this is it guys</p><p><a href="https://repl.it/@debayotomisin/null">https://repl.it/@debayotomisin/null</a></p><p>I think it is important not to overlook the importance of activation functions in building your models, they are critical components of your model and in a way dictate the direction your model takes during the process of training. Understanding which function to use in relation to the kind of data and the kind of problem you are trying to solve with save you a lot of trouble and make you a better engineer.</p><p>That’s it from my end, till next time. (I really need to work on my opening and closing sequence for real).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*Pj8xyqKgA_jZkIGUH32m2w.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6fbe8e22b7b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/your-favorite-activation-functions-c6fbe8e22b7b">Your Favorite Activation Functions.</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Beginner’s Guide to Statistics for Data Science Part 2]]></title>
            <link>https://medium.com/analytics-vidhya/a-beginners-guide-to-statistics-for-data-science-part-2-563cd2c47446?source=rss-845eedcef55d------2</link>
            <guid isPermaLink="false">https://medium.com/p/563cd2c47446</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[math]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Adebayo Oluwatosin]]></dc:creator>
            <pubDate>Fri, 06 Dec 2019 15:08:59 GMT</pubDate>
            <atom:updated>2019-12-12T04:49:30.390Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G2ZAZSaM6XU6mErOVpurTQ.png" /><figcaption>We’ll use this same image for even the third and final article in this series</figcaption></figure><p>Welcome everyone, to the second part of our three article series on basic terms and concepts in statistics, the response from the first article was great really and I really appreciate you all. ( i say really a lot too yeah, and yeah too)</p><p>Here’s the link to the first article just in case you missed it.</p><p><a href="https://medium.com/@adebayotosin101/a-beginners-guide-to-statistics-for-data-science-55ce66f00aa2">A BEGINNER’S GUIDE TO STATISTICS FOR DATA SCIENCE</a></p><p>In the first part of the series, we spoke about parameters, populations, samples, variables, methods of sampling and a few of my jokes (I can’t overemphasize the importance of these things)</p><p>For the second part of the series, we will be diving into more concepts and terms that we sometimes as data people have trouble with, don’t worry, it’s really not that deep.This is a continuation of the first article that spoke about other concepts on which we will be building on and as always I will do my best in explaining all the concepts we will be considering. I’ve said concepts like 3 times already, someone please give me another word in the comment section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*KOSC6yDV-XboR_X9xf0wvA.jpeg" /></figure><p>With that out of the way, let’s dive in! (if you are familiar with anime channels on YouTube, at this point there is usually an intro video of some sort, unfortunately we can’t do that here, but then imagine it in your minds please?Yes I watch anime, deal with it.)</p><p>If you remember clearly, in the last article, we spoke about a ton of stuffs yeah, (you didn’t read that? Just go back to the beginning of this article)</p><p>One of the things we spoke about was a term called STATISTIC and we described as computations gotten from our samples, for example the mean NEPA bill paid in my estate and all. We want to pick up some interesting things about this particular term, follow me yeah?</p><p>I am interested in knowing the reasons why students in Nigerian Universities usually prefer to read for examinations a few days or weeks to the start of exams, it is a very funny phenomenon really, but that is what it is.</p><p>So I randomly pick 10 students from 5 university in the southwestern part of Nigeria (because I live here) say Federal University of Tech, Akure, University of Ibadan, Obafemi Awolowo University, Covenant University, University of Lagos, and we make sure we pick a student from each faculty in each school we have successfully generated our sample, (I’ll leave you to think about what sampling method we used here).</p><p>We ask them various questions and record their views in relation to our research goal which is to know why students prefer to read few weeks to exam (in case you forgot).</p><p>Based on our findings we discover that the major reason why students read a few weeks to the start of exams is because they don’t really care about school and only want to make money, we might also discover that most people in our sample just cram for exams and cramming months to exams doesn’t just sound smart, we might also discover that, student schedules, timetables can be very tough and so students in our sample don’t have enough time to prepare for exams until the final weeks of the semester where academic work, classes, usually would have died down, and this gives them more time to read.</p><p>That’s a lot to take in really, is anyone seeing where I’m headed? Just follow me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*PaqNMAy_WJjILIq6RxQnhA.jpeg" /><figcaption>oh harry!</figcaption></figure><p>All the findings from our samples, we can easily call inferences, and what we call this is <strong>INFERENTIAL STATISTICS</strong>.</p><p>In essence, Inferential Statistics refer to the use of sample data to reach some conclusions (i.e., make some inferences). What we are trying to do here is to get those inferences and see if they generalize, so in the actual sense, getting the inferences is not what we are really after, we want to see if those conclusions apply to the general population the sample was derived from. We want to generalize. Inferential statistics is a big part of data science because majority of what you will find yourself doing as a data scientist or rather as a data person is trying to makes sense out of data, trying to draw conclusions and descriptions, yeah descriptions.</p><p>We also have <strong>DESCRIPTIVE STATISTICS</strong>, the idea behind descriptive statistics is that, it only applies to the sample or with the entire population you are working with.</p><p>This is the idea.</p><p>Take for example we gather data of how many storeys, buildings in my estate have. I’m sure you are tired of hearing me talk about where I live, bear with me, please.</p><p>If we find that the average house in my estate is 2 storeys, this statistic only applies to my estate, it describes the nature of buildings in my estate.</p><p>This is an example of descriptive statistics.</p><p>Another example yeah?</p><p>Students in the faculty of computing FUTA, take an exam on System design and analysis, in the department of cyber security, the average score is 35. The exam is graded over 70 (I know you wanted to know, now you do.), this average score applies to only students in the department of cyber security, hence it is also a descriptive statistic, hope this makes sense? (Answer in your minds, or leave a question in the comment section).</p><p>Anytime you collect scores or values or rather anytime you collect data like this, it is usually ends up as a group of scores or values, that my friends is called a <strong>DISTRIBUTION.</strong></p><p>Descriptive statistics apply only to the members of a sample or population from which data have been collected.</p><p>Now that we have spoken about the various types of statistics, let’s move on to different measures.</p><p>For this article, we will discuss the measures of central tendency.</p><p>Sometimes we want to see how spread out our values are, the shape of our distribution, the most frequently occurring value and so many other things.</p><p>Central tendencies, which you probably know especially if you went to a Nigerian secondary school (it is guaranteed that you’d have done this) are your</p><p>· Mean</p><p>· Median</p><p>· Mode</p><p>I won’t take too much time discussing this but for the sake of peace of mind let’s touch them</p><p>· Mean: is the arithmetic average of a distribution of scores. Understand that the mean gotten from a sample differs from that of a population (I know you know that, don’t you?)</p><p>· Median: median is the score that marks the 50th percentile, this refers to 50% of the distribution. In simple terms, median represents the middle score of a distribution. One of the major functions of the median is that it shows skew, whether a distribution is skewed or not (what do we mean when we say a distribution is skewed? Yeah? Hold that thought, we’ll get there in a minute or five)</p><p>To calculate the median, you arrange the distribution from lowest to highest and select the middle values, 50th percentile. We can also have 2 middle values, especially when the total number of scores is an even number, what we do is to find the average between the two scores in the middle and that will be your median.</p><p>· Mode: this is the least used of the central tendencies that is because it provides the least information among the three (in your mind you were expecting that it’ll be the least used but the most useful? Hahaha, you really need to watch the movies you see, life is hard).</p><p>What it shows basically is the score which has the highest frequency. Not so useful in the end yeah?</p><p>Distributions can have more than one mode.</p><p>They are called bi-modal distributions, for distributions with 2 modes and multi-modal for distributions with multiple modes.</p><p>Finally, about that thought I told you to hold for a minute there, Skewed distributions yeah? Not that thought, your internet subscription will soon finish I know, Arsenal and Manchester United are crappy clubs, I know, Chelsea’s transfer ban has been lifted, Liverpool are the best team in England, listen, I’m fully aware.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*b2iWKdGe0GNFaUZjFpyAKQ.png" /></figure><p>But let’s talk about skewing for a minute yeah?</p><p>When we say a distribution is skewed, what we are saying is that majority of the data points or values in the distribution tend to a certain direction.</p><p>Take for example In a place meant for old people, people who are advanced in age, my objective for going there is to get the ages of everybody including staff and plot a chart with it, probably draw up a couple inferences too with the data I intend to gather.</p><p>Most of the ages I’d gather will be from sixty up to one hundred years and maybe even a hundred and twenty years.</p><p>Drawing a chart of this data, what we will discover is that most of the data will be drawn away from the origin and be at the right hand side of the chart. This is what we refer to as a <strong>NEGATIVELY SKEWED DISTRIBUTION. </strong>In essence what this just means is that the tail of the distribution is pulled to the lower end of the chart (by lower end we mean closer to the origin, you know what an origin is don’t you?).</p><p>It is said that anything that has a negative side will also have a positive side and yes, we have <strong>POSITIVELY SKEWED DISTRIBUTION, </strong>in this case, the data points are drawn towards the origin and the tail is at the higher end of the distribution, away from the origin.</p><p>One more example to demonstrate this is this. We conduct a survey to know what students in primary and higher institutions in Nigeria think about the importance of schooling on a scale of 1 to 5.</p><p>We take a sample of 30 primary school students, and thirteen of them picked 5 (meaning extremely important) seven of them picked 4 (very important) another five picked 3, then picked 2 and then the baby Marlians among then picked 1, which number tow.</p><p>Already from this distribution we can see that it tends towards the origin, which makes this distribution a positively skewed distribution.</p><p>We then take the same question to their older siblings up in universities and polytechnics and the likes, and obviously we already know (school na scam, leemmaaao, then drop out for God’s sake).</p><p>We have three people picking 5, we have another three people picking 4 and then we have eight people picking 3 and then we have seven people picking 2 and the Marlians, eight of them picking 1 (No offense to all marlians out there, I, also consider myself a marlian of some sort).</p><p>We can clearly see that this distribution is also skewed but this time it is negatively skewed.</p><p>Just in case you missed it</p><p>1. Inferential Statistics:</p><p>2. Descriptive Statistics:</p><p>3. Measures of central Tendency</p><p>4. Skewing of a distribution: Negatively or positively skewed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*4Qi_o9bNr7dG3hzGKvFN6A.jpeg" /><figcaption>this meme never gets old really</figcaption></figure><p>You really didn’t expect me to write it again did you? I’m glad you didn’t, truth is I’m here to stay yeah, so deal with it.</p><p>Questions and suggestions and recommendations are open in the comment section, I’d really really like that.</p><p>We have one final article for this particular series which should be released on Tuesday 11, December 2019. Before we start another set of series and I might just show us a little glimpse of what I do with deep learning the following Friday before we start another series discussing other relevant topics in the world of Data.</p><p>My name is Debayo Tomisin and thank you for reading!! See you Tuesday.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*Pj8xyqKgA_jZkIGUH32m2w.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=563cd2c47446" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/a-beginners-guide-to-statistics-for-data-science-part-2-563cd2c47446">A Beginner’s Guide to Statistics for Data Science Part 2</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A BEGINNER’S GUIDE TO STATISTICS FOR DATA SCIENCE]]></title>
            <link>https://medium.com/analytics-vidhya/a-beginners-guide-to-statistics-for-data-science-55ce66f00aa2?source=rss-845eedcef55d------2</link>
            <guid isPermaLink="false">https://medium.com/p/55ce66f00aa2</guid>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[math]]></category>
            <dc:creator><![CDATA[Adebayo Oluwatosin]]></dc:creator>
            <pubDate>Tue, 03 Dec 2019 17:45:40 GMT</pubDate>
            <atom:updated>2019-12-09T12:07:30.250Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Beginner’s Guide to Statistics for Data Science</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G2ZAZSaM6XU6mErOVpurTQ.png" /><figcaption>only reasonable image i was able to find. ikr</figcaption></figure><p>In today’s world, we see clearly see the impact that technology is having in shaping how we interact with each other, how and what we eat (don’t think so? Go on Instagram and see for yourself amigo), what we wear and also more important things like detecting credit card fraud before it happens, catching cyber terrorists, and saving the people in titanic(if you are a data person and you don’t get this joke, you might as well close this article, of course I’m just joking!) among other things and as a result we have more and more people trooping into this very wide field and thankfully, there is more than enough room for everyone.</p><p>This article is for data people, I’m saying data people because it entails BI professionals, ML engineers, Data Scientists, Data Engineers, and all those who are a part or have a role in the world of data.</p><p>This article is to guide you on basic statistical terms you may have heard somewhere or seen elsewhere. Fear not! The light is here (i think).</p><p>Over the next couple minutes, I’ll do my best in explaining certain concepts like samples, population, parameters and a whole host of other things which will come in subsequent articles</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*VdItlgr2W8vDXtOvh3uDGA.jpeg" /></figure><p>This is a series that will contain 3 articles explaining various basic concepts and terminologies in the world of data science.</p><p>For the first article in this series we will be covering basic terminologies and concepts that sometime confuse data scientists who don’t have a solid grasp of these concepts.</p><p>If you are already good on the statistics end, then this article might not be for you, but you can stick till the end and see if you’ll pick up a thing or two.</p><p>Let’s get started then!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*RLSR-xbkOUf-2hrVV-T6uQ.jpeg" /></figure><p>So usually you’d be expecting something like ‘before we go into those terminologies, let’s explore the various meanings or definitions of statistics’, well, we don’t do that here.But then, I’d really want to approach this from a different angle, and this is the angle.</p><p>Imagine this guys, you are working on a project, that’ll classify fraudulent transactions from legitimate ones, your data size is over 20,000 observations.</p><p>You do the necessary EDA, feature engineering, cross validation and the pre-processing you’ve learnt in all the months, you’ve started this data science thingy, then you finally train your model and test it, works fine yeah? F1 score and confusion matrix for the test data is fire! Model ti wa online! (Translation for my non Yoruba friends, model is now online)</p><p>Remember you are trying to build a system that’ll separate legit transactions from fraudulent ones right? Good. After building the system, you expect the system to be able to correctly classify transactions it wasn’t even trained on right? The general <strong>POPULATION</strong>, from a <strong>SAMPLE </strong>of 20,000 observations. You get my point now? Well if you don’t stick with me yeah?</p><p>Population in your case is the data points that your model wasn’t trained on and represents the general community of financial transactions your model is meant to be able to classify, that being said, (the idea should be clearly vague, clear in a vague way)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*WWSo9MqImAof1nfwGPXu1Q.jpeg" /></figure><p>A population is an individual or group that represents all members or a category of interest. Your interest in this case is financial transactions. Still not clear? Or still vaguely clear? One more example then? Alright.</p><p>You want to find the average amount paid as electricity bills in your estate (I’m particular about this because, it’s a big issue in both cities I live in and at this point, only God can safe us.</p><p>One way you can go about this is to gather data into a list of some sort (and no, I don’t mean a python list! Sighs, programmers) from every house, every apartment that uses or is connected to the grid that supplies electricity to your estate, now because this list (still not the list you are thinking about, get a grip man!) contains every member of the group you are interested in, it can be considered a population.</p><p>If you succeed in generating the mean amount paid, what you have successfully done is to generate a <strong>PARAMETER!</strong> Because a parameter is a value generated from a population. Parameters are values that are applied to a population.</p><p>All we discussed is one way you can go about doing this thing called data gathering, which is not what we are here for by the way.</p><p>Another way is to randomly select certain houses and apartments in the estate and then get the amount they pay as electricity bills, this, my people, is what statisticians call a <strong>SAMPLE.</strong></p><p>Sample, basically refers to an extract from a population, a subset of a population. The data used in the initial example of the financial transaction classification is a sample from the very wide population of financial transactions in the finance world, which we are a big part of.</p><p>If you also succeed in generating the average amount paid from the sample, what you have succeeded in getting is a <strong>STATISTIC!</strong> We don’t do that here yeah? Well sometimes we do.</p><p>Statistics are values, (yes they are actual values) that are derived from sample data.</p><p>You need to keep this in mind yeah? A population doesn’t need to be very large to count as a population. My estate may not contain more than 20 houses, not very large is it? No, but is it a population as regards the category? Yes it is.</p><p>Samples are not necessarily good representations of the populations from which they are selected from. Take for example, (I’m tired of typing electricity every time) my NEPA situation (much better), if the houses that make up my sample are for example, a printing press, a bakery, a fast food restaurant, and a game house, this is obviously not a good sample representation because all the listed houses are use light more than the average house with light bulbs and TVs and washing machines etc. Hence this is not a good sample and the mean amount paid generated will not accurately reflect mean amount paid in the estate.</p><p>There are a number of ways samples can be generated, I’ll be listing them and explaining in the little way I can</p><p>1. Random Sampling: Random doesn’t mean haphazard. It just means that every observation in the population has an equal chance of getting selected into a sample. The major advantage of random sampling is that any differences between the sample and the population from which the sample was selected will not be systematic. In our example of printing press, bakery etc. the sample was systematic because we selected elements that are more likely to consume power. The difference in the population and the sample are due to chance rather than systematic bias</p><p>2. Representative Sampling: This method just aims at accurately representing the population through the pre-selected sample. Take for example, in my estate we have 20 houses in total, 50% are residential, 30% are industrial the remaining 20% are office spaces, the sample must also reflect this figures. This means that 50% of your sample must be residential, 30% must be industrial and 20% must be office spaces. Random sampling attempts to model the population but representative sampling does that exactly. This sampling procedure can be costly and time consuming but it increases your chances of being able to generalize the results from the sample to the population</p><p>3. Convenience sampling: observations are selected based on convenience. Take for example, my NEPA situation, I might only just consider houses that are 20 meters away from mine, why? Because I cannot come and kill myself (you thought I was done with the jokes?) but this an example of convenience sample based proximity or say I choose to go to houses that don’t have dogs, why? I’m too old to be chased around by dogs, I don’t want to trend on twitter for the wrong reasons please. This is an example of convenience sampling based on ease of access. I know you are thinking, convenience sampling isn’t a great sampling method, I thought so too, but if the sample is not different from the population in ways that might affect the solution, then it is an acceptable method of sampling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*v_3tRDLk0Dj8YDuVKhVzEQ.jpeg" /></figure><p>I have one more thing to talk about guys, You are getting bored? We’ll end soon, stay with me.</p><p>Breaking protocol a bit, I’ll just dive straight into what variables are and how they are used.</p><p>A variable is anything that can be codified (to arrange and collect in a systematic fashion) and has more than one value. An example may be gender (which apparently we have over 51 of nowadays), income, exam scores, etc. These represent variables.</p><p>In contrast, any value that has a single value is regarded as a Constant.</p><p>Types of variables include</p><p>1. Quantitative<strong> </strong>(or continuous) and</p><p>2. Qualitative<strong> </strong>(or categorical).</p><p>A quantitative variable is one that is scored in such a way that the numbers, or values, indicate some sort of amount. For example, height is a quantitative (or continuous) variable because higher scores on this variable indicate a greater amount of height.</p><p>In contrast, qualitative variables are those for which the assigned values do not indicate more or less of a certain quality. An example, if I conduct a survey to see eating habits of developers, there are those who eat like their very lives are at stake (Foodies), those who eat like every normal human does (Humans), those who don’t eat as much (conservatives) and finally those who have an issue with food (), meaning they don’t like eating, they’d rather code all day. (Don’t guess my category, you’ll be surprised). We have four categories, which we can then group with numbers as:</p><p>1 — Foodies</p><p>2 — Humans</p><p>3 — Conservatives</p><p>4 –</p><p>You can see that the numbers don’t necessarily represent any certain form of increase or decrease, it represents the various categories attributed to the variable.</p><p>That’s a wrap guys, i really hope you were able to grasp the concepts i tried to explain and also my jokes (very important stuff guys!)</p><p>Just in case you missed it:</p><p>1. Population:</p><p>2. Sample:</p><p>3. Parameter:</p><p>4. Statistics:</p><p>5. Methods of sampling: Random, Representative, Convenience</p><p>6. Variables and types of variables:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*4Qi_o9bNr7dG3hzGKvFN6A.jpeg" /></figure><p>You were expecting me to write about it again. leeemmaaoo, you don’t know… about it.</p><p>Feel free to drop a comment, question, suggestion and criticism and thoughts on the article.</p><p>Like I said, this is a series and will have 2 more articles discussing various other topics, that said, the follow up article drops Friday, 6 December, 2019.</p><p>Thanks for reading</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/236/1*zEMF9JZiiggE9gM_blxUcg.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55ce66f00aa2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/a-beginners-guide-to-statistics-for-data-science-55ce66f00aa2">A BEGINNER’S GUIDE TO STATISTICS FOR DATA SCIENCE</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WHY YOU NEED PIPELINES?]]></title>
            <link>https://medium.com/@adebayotosin101/why-you-need-pipelines-15b20324703c?source=rss-845eedcef55d------2</link>
            <guid isPermaLink="false">https://medium.com/p/15b20324703c</guid>
            <category><![CDATA[data-pipeline]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deployment]]></category>
            <dc:creator><![CDATA[Adebayo Oluwatosin]]></dc:creator>
            <pubDate>Thu, 04 Jul 2019 00:36:05 GMT</pubDate>
            <atom:updated>2019-07-04T00:36:05.886Z</atom:updated>
            <content:encoded><![CDATA[<p>One Step Away From Model Deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CYvQPtIciYH6pBE4xGylgg.jpeg" /><figcaption>This Pipeline?</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oVOxLxyyF0FoQfhvKlkmjA.png" /><figcaption>Nigerian Troubles.</figcaption></figure><p>Well in this case, I don’t mean your regular pipelines, gas or petroleum pipelines ( Niger delta Militants beware! Nigerians only! lol)</p><p>In this case we mean the pipelines that are used in the process of creating machine learning systems. It is very surprising that there are are very few materials/ content covering this topic and even fewer covering the topic of deployment, hence this post. This post was inspired by the lack of content on this subject matter and i’ll be listing things i feel that makes understanding pipelines a big part of the machine learning process. So take a seat, grab a bag of chips and soda(bigi apple if you will, lol), the rest of the journey will be quite short.</p><p>A Pipeline is a chain which connects those ordered final operations in one, well, how to call it?, pipeline. In other words, into pipeline you put raw data, which is then modified using operations chosen and ordered by you. The purpose of the pipeline is to assemble several steps that can be cross validated together while setting different parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*wMVIJf7J9tZnDIbOQkMBEA.png" /><figcaption>A standard Machine Learning Pipeline.</figcaption></figure><p>A machine learning algorithm usually takes clean (and often tabular) data, and learns some pattern in the data, to make predictions on new data. However, when ML is used in real-world applications, the raw information that you get from the real-world is often not ready to be fed into the ML algorithm. So you need to preprocess that information to create input data for the ML algorithm. Similarly, the output of the ML algorithm by itself is just some number in software, which will need to be processed to perform some action in the real-world. All the preprocessing is what goes down in the pipeline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jEerlbNb721S1ES7lfTpNA.jpeg" /><figcaption>The City of Hustle, sorry Lagos.</figcaption></figure><p>Let’s take for example, you have data on house prices in Lagos, naturally, data gotten is usually dirty(presence of missing values), incomplete etc, you will also need to align the various features with your target variable if it is in a supervised learning environment, don’t forget the data cleaning process, feature extraction and selection, even to the interaction of other features to from new ones, all this is not machine learning but rather data preprocessing, now to the machine learning part, after all the preprocessing is done (usually the most tasking aspect of any ml project, it can be quite frustrating, trust me…) we feed our data into our model say a Linear SVM (Support Vector Machine, i really have a thing for this algorithm really), the process of predicting house prices (our target variable) is the machine learning activity here.</p><p>If we are to deploy this model, when input is being fed by the user, it is sent down the pipeline and the output is also sent through the pipeline.</p><p>So this entire framework from converting raw data to data usable by ML algorithm, training an ML algorithm, and finally using the output of the ML algorithm to perform actions in the real-world is the <strong>pipeline</strong>.</p><p>I hope with these few words of mine, i have been able to convince you on the importance of pipelines in your ml study goals.</p><p>I’m Adebayo Oluwatosin, and i am not your regular ml guy!</p><p>Thanks for reading! drop a clap and more importantly comments!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*Pj8xyqKgA_jZkIGUH32m2w.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15b20324703c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>