<?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[Testimony’s Data Journey - Medium]]></title>
        <description><![CDATA[I love data science and even better, I love to teach. - Medium]]></description>
        <link>https://medium.com/testimonys-data-journey?source=rss----2f75d6055779---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Testimony’s Data Journey - Medium</title>
            <link>https://medium.com/testimonys-data-journey?source=rss----2f75d6055779---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 13:38:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/testimonys-data-journey" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to use SQL in Google Colab]]></title>
            <link>https://medium.com/testimonys-data-journey/how-to-use-sql-in-google-colab-2b415d721ef6?source=rss----2f75d6055779---4</link>
            <guid isPermaLink="false">https://medium.com/p/2b415d721ef6</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Adeyemi Testimony]]></dc:creator>
            <pubDate>Fri, 24 Nov 2023 02:21:12 GMT</pubDate>
            <atom:updated>2024-01-09T09:40:18.695Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uRUWs315xS-_nZcsCZF7Xw.jpeg" /></figure><p>Google Colab, an online platform for coding with Python, has become a favorite among data scientists and machine learning experts. While it’s mainly used for Python, Colab also lets you run SQL commands, making it easy to combine data manipulation and analysis into your work. Of the two main ways to use SQL in Colab, using magic commands is the most straightforward.</p><pre># Set-up<br>%load_ext sql<br>%sql sqlite://<br>import pandas as pd</pre><p>Once the extension is installed, load your dataset using this command:</p><pre># Create database tables from CSV files<br><br>with open(&#39;Dataset.csv&#39;) as f: Cities = pd.read_csv(&#39;Dataset.csv&#39;, encoding=&#39;unicode_escape&#39;, index_col=0)<br>%sql drop table if exists Dataset;<br>%sql --persist Dataset</pre><p>Now, you’re ready to use SQL within your Colab notebook.</p><h3>Executing SQL Queries</h3><p>For all your SQL queries, the %sql magic command proves to be a handy tool. Its syntax is straightforward:</p><pre>%%sql</pre><p>For instance, to retrieve all customers from the customers table in the Dataset database, simply type:</p><pre>%sql <br>SELECT * FROM customers</pre><h3>Multi-Line SQL Queries</h3><p>When dealing with more complex SQL statements that span multiple lines, the %%sql magic command comes to the rescue. Its usage is equally simple:</p><pre>%%sql<br>select country<br>from Countries<br>where EU = &#39;no&#39;</pre><h4><strong>Advantages of using SQL in Google Colab:</strong></h4><ul><li>Simplicity: The syntax is straightforward and easy to understand, making it accessible to beginners and experienced users alike.</li><li>Efficiency: Single-line queries can be executed swiftly, while multi-line queries can be organized into code blocks for better readability.</li><li>Integration with Python: SQL commands can be seamlessly interlaced with Python code, enabling a powerful combination of data analysis and programming.</li></ul><p>Whether you’re a seasoned data scientist or a budding SQL enthusiast, use SQL within the versatile environment of Google Colab.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b415d721ef6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/testimonys-data-journey/how-to-use-sql-in-google-colab-2b415d721ef6">How to use SQL in Google Colab</a> was originally published in <a href="https://medium.com/testimonys-data-journey">Testimony’s Data Journey</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Logistic Regression: A Comprehensive Guide]]></title>
            <link>https://medium.com/testimonys-data-journey/logistic-regression-a-comprehensive-guide-0e0059e1ce12?source=rss----2f75d6055779---4</link>
            <guid isPermaLink="false">https://medium.com/p/0e0059e1ce12</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[logistic-regression]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Adeyemi Testimony]]></dc:creator>
            <pubDate>Sun, 19 Nov 2023 23:03:19 GMT</pubDate>
            <atom:updated>2023-11-19T23:02:58.366Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*6sxpnFRdU8rm1ZNcg9Nyxg.png" /></figure><p>Logistic regression, also known as logit regression, is a statistical method used to predict the probability of a binary outcome. Unlike linear regression, which predicts continuous values, logistic regression estimates the likelihood of an event falling into one of two categories. This binary nature makes it ideal for classification problems, such as determining whether an email is spam or not, whether a patient is likely to develop a particular disease, or whether a customer will make a purchase.</p><p>In other words, it helps predict data where the outcome is either yes or no.</p><p><strong>Real-world applications of Logistic Regression</strong></p><p>The versatility of logistic regression extends across a wide range of domains, reflecting its practical significance. Here are a few notable examples:</p><ul><li>Medical Diagnosis: Logistic regression plays a crucial role in medical diagnosis by analyzing patient data to predict the likelihood of a particular disease. For instance, it can be used to assess the risk of heart disease based on factors such as age, blood pressure, and cholesterol levels.</li><li>Fraud Detection: Financial institutions utilize logistic regression to identify fraudulent transactions by analyzing patterns in spending behavior. The algorithm can flag suspicious transactions based on deviations from expected patterns, helping prevent financial losses.</li></ul><p><strong>Terms Used in Logistic Regression</strong></p><p>To fully grasp the workings of logistic regression, it’s essential to understand some key terms:</p><ul><li>Independent Variables (X): These are the input features that influence the outcome of interest. For example, in predicting email spam, independent variables could include sender reputation, email content, and presence of attachments.</li><li>Dependent Variable (Y): This is the binary outcome being predicted, typically represented as 0 or 1. In the email spam example, the dependent variable would indicate whether the email is spam (1) or not (0).</li><li>Odds: The ratio of the probability of the event occurring to the probability of it not occurring.</li><li>Log Odds: The logarithm of the odds.</li><li>Sigmoid Function: A mathematical function that transforms the log odds into a probability between 0 and 1.</li></ul><p><strong>Mathematical Foundations of Logistic Regression</strong></p><p>At the heart of logistic regression lies a mathematical model that captures the relationship between the independent variables and the probability of the event occurring. The model can be represented as:</p><pre>P(Y=1) = 1 / (1 + exp(-βT*X))</pre><p>where:</p><ul><li>P(Y=1) is the probability of the event occurring</li><li>β is the vector of coefficients representing the impact of each independent variable on the probability</li><li>T denotes the transpose operation</li><li>X is the vector of independent variables</li><li>exp is the exponential function</li></ul><p><strong>When to Use Logistic Regression:</strong></p><ul><li><strong>Binary classification problems:</strong> Logistic regression is best suited for problems where the outcome variable can only take two values, such as yes/no, pass/fail, or spam/not spam.</li><li><strong>Linearly separable data: </strong>Logistic regression works well when the relationship between the independent variables and the outcome variable can be approximated by a straight line.</li><li><strong>Small to moderate number of independent variables:</strong> While logistic regression can handle a moderate number of independent variables, it can become unstable with too many variables.</li></ul><p><strong>When to Avoid Logistic Regression:</strong></p><ul><li><strong>Non-binary classification problems:</strong> Logistic regression is not suitable for problems with more than two outcome categories.</li><li><strong>Nonlinear relationships:</strong> If the relationship between the independent variables and the outcome variable is highly nonlinear, logistic regression may not be the best choice.</li><li><strong>Large number of independent variables:</strong> When dealing with a large number of independent variables, other machine learning algorithms, such as decision trees or random forests, may be more appropriate.</li></ul><p>In summary, logistic regression is a powerful and versatile tool for binary classification problems, but it’s important to consider the characteristics of your data and the specific nature of your problem before applying it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e0059e1ce12" width="1" height="1" alt=""><hr><p><a href="https://medium.com/testimonys-data-journey/logistic-regression-a-comprehensive-guide-0e0059e1ce12">Logistic Regression: A Comprehensive Guide</a> was originally published in <a href="https://medium.com/testimonys-data-journey">Testimony’s Data Journey</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linear Regression: Understanding the Linear Relationship]]></title>
            <link>https://medium.com/testimonys-data-journey/linear-regression-understanding-the-linear-relationship-ca5899b53a02?source=rss----2f75d6055779---4</link>
            <guid isPermaLink="false">https://medium.com/p/ca5899b53a02</guid>
            <dc:creator><![CDATA[Adeyemi Testimony]]></dc:creator>
            <pubDate>Sun, 19 Nov 2023 22:48:21 GMT</pubDate>
            <atom:updated>2023-11-19T16:23:18.815Z</atom:updated>
            <content:encoded><![CDATA[<p>Linear regression is a statistical technique that models the relationship between a dependent variable and one or more independent variables. It assumes a linear relationship between the variables, meaning that the dependent variable changes at a constant rate as the independent variable changes. In plain English, it assumes that two things are connected either that they go up together or in the opposite direction.</p><p>The most basic one is the height and age of children, as children grow older they grow taller. So we know that age and height are correlated.</p><p><strong>Real-life Example of Linear Regression</strong></p><p>Consider the relationship between the amount of fertilizer used on a crop and its yield. A farmer might collect data on the amount of fertilizer used on different plots of land and the yield of each plot. They could then use linear regression to model the relationship between fertilizer use and yield. The model would produce an equation that could be used to predict the yield of a plot of land based on the amount of fertilizer used.</p><h4><strong>Terms Used in Linear Regression</strong></h4><ul><li><strong>Dependent variable:</strong> The variable that is being predicted. In the example above, the yield of the crop is the dependent variable.</li><li><strong>Independent variable:</strong> The variable that is used to predict the dependent variable. In the example above, the amount of fertilizer used is the independent variable.</li><li><strong>Coefficient of determination (R-squared):</strong> A measure of how well the model fits the data. R-squared values range from 0 to 1, with higher values indicating a better fit.</li><li><strong>Intercept:</strong> The value of the dependent variable when the independent variable is 0.</li><li><strong>Slope:</strong> The rate of change of the dependent variable as the independent variable changes.</li></ul><h4>Mathematical Explanation/Foundations of Linear Regression</h4><p>Linear regression is based on the following equation:</p><pre>y = mx + b</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*8NJPctdMWKe2ukD1hWyWcw.png" /></figure><p>where:</p><ul><li>y is the dependent variable</li><li>x is the independent variable</li><li>m is the slope</li><li>b is the intercept</li></ul><p>To find the values of m and b, we use the least squares method. This method minimizes the sum of the squared differences between the predicted values y and the actual values of y.</p><h4>When Should You Use Linear Regression?</h4><p>Linear regression is a good choice when:</p><ul><li>There is a linear relationship between the dependent variable and the independent variable.</li><li>The data is clean and there are no outliers.</li><li>You want to make predictions about the dependent variable based on the independent variable.</li></ul><h4>When Not to Use Linear Regression</h4><p>Linear regression is not a good choice when:</p><ul><li>There is not a linear relationship between the dependent variable and the independent variable.</li><li>The data is noisy or there are outliers.</li><li>You want to understand the complex relationship between multiple variables.</li></ul><p>In these cases, other machine learning techniques, such as non-linear regression or tree-based methods, may be more appropriate.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca5899b53a02" width="1" height="1" alt=""><hr><p><a href="https://medium.com/testimonys-data-journey/linear-regression-understanding-the-linear-relationship-ca5899b53a02">Linear Regression: Understanding the Linear Relationship</a> was originally published in <a href="https://medium.com/testimonys-data-journey">Testimony’s Data Journey</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linear regression: Implementing in Python from Scratch]]></title>
            <link>https://medium.com/testimonys-data-journey/linear-regression-implementing-in-python-from-scratch-f87c69968323?source=rss----2f75d6055779---4</link>
            <guid isPermaLink="false">https://medium.com/p/f87c69968323</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[linear-regression]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Adeyemi Testimony]]></dc:creator>
            <pubDate>Sun, 19 Nov 2023 22:39:00 GMT</pubDate>
            <atom:updated>2023-11-19T22:39:00.669Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*zoc2a_1AB5aazt4SL60vDQ.png" /></figure><p>So let&#39;s try to implement this model from scratch in Python, let&#39;s take on a scenario, let&#39;s say we want to predict the price of a toy based on the buyer&#39;s age. Simple enough yeah? Hold on to that thought for a minute</p><p>First, let&#39;s define our prediction class. This class is made up of three main functions, initialize weights, train, update weights, and predict. Now I’ll explain what these functions do.</p><p>This is a first-level explanation(it’s a bit more complicated than this but I want you to get the main idea first, cool?)</p><p>1. <strong>Initialization Tool:</strong> Imagine you’re preparing to bake some cookies. You need to decide how fast you’ll learn from your mistakes (learning rate) and how many times you’ll try baking (epochs). This tool helps you set those values so that you can start baking (training) your cookies.</p><p>2. <strong>Training Tool: </strong>Now, think of yourself as a chef learning to bake cookies. You start with some basic ingredients (weights and bias), and this tool helps you improve your recipe by trying it out multiple times (for the number of epochs you decided earlier). After each try, you make tiny adjustments to make your cookies taste better. This tool helps you with those adjustments, called updating weights.</p><p><strong>3. Update Weights Tool:</strong> This is like your helper in the kitchen who calculates how much of each ingredient to add to make your cookies taste just right. It looks at how different your cookies tasted from what you expected (the difference between predicted and actual values) and suggests adjustments to your recipe (updating weights and bias).</p><p><strong>4. Prediction Tool: </strong>Now, after all that baking practice, you want to impress your friends by predicting how good your next batch of cookies will be. This tool uses the final recipe (weights and bias) to make an educated guess on how tasty your cookies will be based on the ingredients you have.</p><p>In simple terms, this class is like a baking class where you set the learning speed and the number of tries, then practice making cookies (training) while adjusting your recipe (updating weights), and finally, you can predict how good your cookies will be based on your practice.</p><p>Understood? Now let&#39;s dive deep into the maths and implement this in python</p><pre>class LinearRegression:<br>    #our first function that sets the learning rate and epochs<br>    def __init__(self, lr=0.001, epochs=1000):<br>        self.lr = lr<br>        self.epochs = epochs<br>        self.weights = None<br>        self.bias =  None<br><br><br>    #2nd function to train and initialise weights<br>    def train(self, X, y):<br>        #getting the features from our dataset<br>        n_samples, n_features = X.shape<br>        # Initialize weights and bias to zeros<br>        self.weights = np.zeros(n_features)<br>        self.bias = 0<br>        <br>        #calling the update weights fucntion below<br>        for _ in range(self.epochs):<br>            self.update_weights(X, y)<br>    <br><br>    #3rd function, updating weights and bias <br>    def update_weights(self, X, y):<br>        #getting samples from our dataset<br>        n_samples = X.shape[0]<br><br>        #Predict the values<br>        y_predicted = np.dot(X, self.weights) + self.bias<br><br>        #Compute gradients<br>        dw = (1 / n_samples) * np.dot(X.T, (y_predicted - y))<br>        db = (1 / n_samples) * np.sum(y_predicted - y)<br><br>        #Update weights and bias <br>        self.weights -= self.lr * dw<br>        self.bias -= self.lr * db<br><br><br>    #4th function, predicting new values<br>    def predict(self, X):<br>        y_predicted = np.dot(X, self.weights) + self.bias<br>        return y_predicted</pre><p>There we have it is a class we can call every time we want to predict using linear regression. Back to our toy and age dataset, let’s make use of our model.</p><p><strong>Step 1:</strong> Importing our data set</p><pre>import pandas as pd<br>data = pd.read_csv(&quot;simplelinearregression.csv&quot;)</pre><p><strong>Step 2:</strong> Separate data into x and y tain and Convert each to a Numpy array so that it is easier to perform operations on it.</p><pre> <br># Separate the data into features (X) and the target variable (y)<br>X = data.iloc[:, :-1].values  # X contains all columns except the last one<br>y = data.iloc[:, -1].values   # y contains the last column</pre><p><strong>Step 3:</strong> Train the data</p><pre>model = LinearRegression(lr=0.001) #calling our LinearRegression model<br><br># Step 3: Train the model<br>X = X.reshape(-1, 1)  # Reshape X to a 2D array for compatibility with the model<br>model.train(X, y)</pre><p><strong>Step 4:</strong> Make Predictions</p><pre># Step 4: Make predictions<br>y_pred = model.predict(X)<br>print(y_pred)<br>print(y)</pre><p><strong>Step 5:</strong> Calculating the accuracy of your model</p><pre>from sklearn.linear_model import LogisticRegression<br>from sklearn.metrics import accuracy_score<br><br><br># Calculate the accuracy of the model<br>accuracy = accuracy_score(y, y_pred)<br>print(&quot;Accuracy:&quot;, accuracy)</pre><p>If you are not satisfied with the accuracy of your model then you can change your learning rate until you find a value that maximises your model’s efficiency.</p><p>Good luck with your Machine learning endeavors!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f87c69968323" width="1" height="1" alt=""><hr><p><a href="https://medium.com/testimonys-data-journey/linear-regression-implementing-in-python-from-scratch-f87c69968323">Linear regression: Implementing in Python from Scratch</a> was originally published in <a href="https://medium.com/testimonys-data-journey">Testimony’s Data Journey</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Supervised Machine Learning: Learning with a Guide]]></title>
            <link>https://medium.com/testimonys-data-journey/supervised-machine-learning-learning-with-a-guide-26d7c44eb6d2?source=rss----2f75d6055779---4</link>
            <guid isPermaLink="false">https://medium.com/p/26d7c44eb6d2</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Adeyemi Testimony]]></dc:creator>
            <pubDate>Sat, 18 Nov 2023 02:08:24 GMT</pubDate>
            <atom:updated>2023-11-18T02:08:24.823Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*voKCdZgk6_GHcWwJolQbIA.jpeg" /></figure><p>Supervised machine learning is a type of machine learning where a model is trained using labeled data. Labeled data means that the data has been tagged with the correct answers. For example, a dataset of images of animals where each image has been labeled with the name of the animal it contains would be considered a labeled dataset.</p><p>A great way to understand supervised machine learning is to think about how a child learns. When a child is learning to identify objects, they are essentially being trained on a labeled dataset. The objects around them are the data, and the labels are the names of the objects. The child learns to associate the objects with their labels by observing and interacting with the world around them.</p><p>For example, a child might learn the name of a cat by seeing a cat and being told that it is a cat. They might then learn to identify other cats by recognizing the features of a cat, such as its fur, whiskers, and tail.</p><p>Supervised machine learning is often used in tasks such as classification, and regression.</p><p><strong>Classification</strong> tasks involve assigning a category to an input, such as classifying images of handwritten digits or predicting whether an email is spam or not spam.</p><p><strong>Regression</strong> tasks involve predicting a continuous numerical output, such as predicting the price of a house or the stock market.</p><h4>Use Cases of Supervised Machine Learning</h4><p>Supervised machine learning has a wide range of use cases, including:</p><ul><li><strong>Image recognition:</strong> Supervised machine learning can be used to recognize objects in images, such as faces, cars, and animals.</li><li><strong>Speech recognition: </strong>Supervised machine learning can be used to transcribe spoken language into text.</li><li><strong>Natural language processing (NLP):</strong> Supervised machine learning can be used to understand and generate human language.</li><li><strong>Recommendation systems:</strong> Supervised machine learning can be used to recommend products, movies, and other items to users.</li><li><strong>Fraud detection:</strong> Supervised machine learning can be used to detect fraudulent activity, such as credit card fraud and insurance fraud.</li></ul><h4>Algorithms used for Supervised Machine learning</h4><p>There are many different supervised machine learning algorithms, each with its own strengths and weaknesses. Some of the most common supervised machine learning algorithms include:</p><ul><li><strong>Linear regression:</strong> Linear regression is a statistical method that is used to predict a continuous numerical output based on one or more input variables.</li><li><strong>Logistic regression:</strong> Logistic regression is a statistical method that is used to predict a binary outcome (e.g., yes or no, spam or not spam) based on one or more input variables.</li><li><strong>Support vector machines (SVMs):</strong> SVMs are a type of machine learning algorithm that is used for both classification and regression tasks. SVMs are known for their ability to find optimal decision boundaries in high-dimensional spaces.</li><li><strong>K-nearest neighbors (KNN):</strong> KNN is a classification algorithm that classifies new data points based on their similarity to the nearest training points.</li><li><strong>Decision trees:</strong> Decision trees are a classification algorithm that builds a tree-like structure to represent the decision-making process.</li><li><strong>Neural networks: </strong>Neural networks are a type of machine learning algorithm that is inspired by the structure of the human brain. Neural networks are very powerful and can be used to solve a wide range of problems, including classification, regression, and prediction.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26d7c44eb6d2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/testimonys-data-journey/supervised-machine-learning-learning-with-a-guide-26d7c44eb6d2">Supervised Machine Learning: Learning with a Guide</a> was originally published in <a href="https://medium.com/testimonys-data-journey">Testimony’s Data Journey</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning Like a Child: The Inspiration Behind Machine Learning]]></title>
            <link>https://medium.com/testimonys-data-journey/learning-like-a-child-the-inspiration-behind-machine-learning-09e670597a88?source=rss----2f75d6055779---4</link>
            <guid isPermaLink="false">https://medium.com/p/09e670597a88</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Adeyemi Testimony]]></dc:creator>
            <pubDate>Sat, 18 Nov 2023 01:25:37 GMT</pubDate>
            <atom:updated>2023-11-18T01:25:37.121Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kQyfduq05177QFkjyw0mxA.jpeg" /></figure><p>Have you ever wondered how your favorite streaming service always seems to know what movies and shows you’ll like, or how your email app can filter out spam messages without you even having to lift a finger? The answer lies in machine learning.</p><p>Imagine a young child, wide-eyed and curious, exploring the world around them. They learn by observing and interacting with their surroundings, soaking up information like a sponge. They quickly grasp the nuances of language, recognizing patterns in words and their meanings. They also learn to avoid danger from experience, associating actions with consequences.</p><p>This process of learning, driven by exposure to data and the ability to extract meaning, forms the foundation of machine learning. Just as a child learns to talk by listening to the adults around them, machines can extract knowledge from data, identify patterns, and make predictions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*iPFEzWcE0NxB62P7gx8j5A.jpeg" /></figure><h3>Types of Machine learning techniques</h3><h4>1. Supervised Learning: Learning with a Guide</h4><p>In supervised learning, the machine learns by analyzing the labeled data and identifying patterns between the inputs and outputs. For instance, if you want to train a machine to classify images of different animals, you would provide it with a dataset of labeled images, each image clearly identified as a cat, dog, or bird. The machine would then analyze the features of each image and learn to associate those features with the corresponding animal label.</p><h4>2. Unsupervised Learning</h4><p>Unsupervised learning, on the other hand, is a type of machine learning that involves analyzing unlabeled data. This method is like letting a child loose in a new environment to explore and discover on their own. The machine is tasked with finding patterns and relationships within the data without the aid of predefined labels.</p><h4>3. Reinforcement Learning</h4><p>Reinforcement learning is a type of machine learning where the machine learns through trial and error. The machine interacts with an environment and receives rewards or penalties for its actions. The goal is to learn a policy that maximizes the rewards. Reinforcement learning is often used in tasks such as robotics, game playing, and self-driving cars.</p><h3>The Tools of Machine Learning: Building Intelligent Systems</h3><p>Machine learning relies on a powerful toolkit of tools, including:</p><ol><li><strong>Mathematics:</strong> Linear algebra, calculus, and probability theory are all essential for designing and optimizing machine learning algorithms.</li><li><strong>Statistics:</strong> Statistical methods, such as hypothesis testing and regression analysis, help machine learning algorithms make reliable predictions.</li><li><strong>Programming Languages:</strong> Python has become the go-to programming language for machine learning due to its extensive libraries and ease of use. Libraries like TensorFlow and Scikit-learn provide essential building blocks for machine learning applications.</li></ol><p>Machine learning is still in its early stages, but its potential is vast. As machine learning algorithms become more sophisticated and data becomes more readily available, we can expect to see even more transformative applications in the years to come.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09e670597a88" width="1" height="1" alt=""><hr><p><a href="https://medium.com/testimonys-data-journey/learning-like-a-child-the-inspiration-behind-machine-learning-09e670597a88">Learning Like a Child: The Inspiration Behind Machine Learning</a> was originally published in <a href="https://medium.com/testimonys-data-journey">Testimony’s Data Journey</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 data science?]]></title>
            <link>https://medium.com/testimonys-data-journey/what-is-data-science-cb8cd05440a4?source=rss----2f75d6055779---4</link>
            <guid isPermaLink="false">https://medium.com/p/cb8cd05440a4</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Adeyemi Testimony]]></dc:creator>
            <pubDate>Tue, 26 Sep 2023 14:06:20 GMT</pubDate>
            <atom:updated>2023-09-26T14:06:20.114Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3SnhCtTcV9tt6n6t" /><figcaption>Photo by UX Indonesia on Unsplash</figcaption></figure><p>Sometimes, my friends and I at my fellowship play a game where we try to guess the person at the door before they come in, so this day, someone was close on at the door, and we were trying to guess who it was.</p><p>I started to think hard. The time was 6:35pm and the fellowship starts at 6:30pm, I began to think of people in three categories, the early birds, the people who usually come in very late, and the people who arrive just in time, and I knew two people who typically come in on time or about 5–10 mins late.</p><p>It was David and James, but only one person was at the door, with only about half a second for the person to reveal himself I shouted “David”. Indeed it was David who came in through the door. But it was not random, David always arrives before James even though they come together, he has longer legs so he walks faster.</p><p>Did you see what I just did there? It was data science, sort of.</p><p>First I collected past data, I remembered my fellowship members, and when they typically show up. Then I cleaned the data, and eliminated people who were there already, then I transformed the data, I divided their arrival time into three periods, early, just in time, and late.</p><p>Then I tried to predict who was at the door based on the arrival period and that was how I got my answer.</p><p>In the real world, decisions have far more consequences than simply getting the answer wrong. For example, a doctor cannot afford to diagnose a patient wrongly, so they simply cannot place a wild guess, like I did, they must look at past data, analyze it, and use it to make the right diagnosis.</p><p>The same applies to literally any business, they need to look at past data analyze it, and use it to predict the future.</p><p>Let’s say a super market wants to know if they should add an extra row of Kellogg’s cornflakes on their shelf, they must look at their past data and see how well people buy Kellogg’s cornflakes, with that data they can also predict how well it will sell out that way they can decide how much packs of cornflakes they should add, they also don’t want to add too much that it expires on the shelf.</p><p>You should understand where I am heading by now. So to consolidate all my scenarios,</p><p>Data science is the extraction, cleaning, analysis and transformation) of data to predict the future and make informed decisions</p><p>Can you think of more scenarios where we use data science ? Drop them in the comments ✨</p><p>Next we will discuss the steps used in data science, don’t forget to clap, share and comment. See you in the next article 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb8cd05440a4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/testimonys-data-journey/what-is-data-science-cb8cd05440a4">What is data science?</a> was originally published in <a href="https://medium.com/testimonys-data-journey">Testimony’s Data Journey</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[COVID 19 Data Analysis (Africa)]]></title>
            <link>https://medium.com/testimonys-data-journey/covid-19-data-analysis-africa-601fea20e215?source=rss----2f75d6055779---4</link>
            <guid isPermaLink="false">https://medium.com/p/601fea20e215</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[covid19]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Adeyemi Testimony]]></dc:creator>
            <pubDate>Wed, 06 Sep 2023 07:44:34 GMT</pubDate>
            <atom:updated>2023-09-06T11:40:49.807Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p8p6QblmRSwn9spylt5t5Q.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@fusion_medical_animation?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Fusion Medical Animation</a> on <a href="https://unsplash.com/photos/rnr8D3FNUNY?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>It’s August 2023, and headlines and rumors are starting to fly around about a new wave of COVID-19. Being a data enthusiast, I wanted to see for myself. I decided to analyze the COVID-19 trends in Africa (where I live) and deduce if I have reasons to be concerned about a pandemic in the near future.</p><p><strong><em>Project Objective:</em></strong> Monitor COVID-19 trends from January 2023 to July 2023 in Africa.</p><p><strong><em>Data Source: </em></strong><a href="https://ourworldindata.org/covid-deaths">https://ourworldindata.org/covid-deaths</a></p><p><strong><em>Tools: </em></strong>SQL, Excel, Tableau</p><h3><strong>Data Exploration in SQL</strong></h3><p><strong>Questions to answer with SQL:</strong></p><ol><li><strong>Total cases from January to July in Africa:</strong> This query helped me analyze the COVID-19 trends in Africa during the specified time frame, allowing me to track the monthly total cases and draw meaningful insights from the data</li></ol><pre>--1. Total cases in Africa across January 2023 to August 2023<br><br>SELECT <br> CASE <br>        WHEN MONTH(date) = 1 THEN &#39;January&#39;<br>        WHEN MONTH(date) = 2 THEN &#39;February&#39;<br>        WHEN MONTH(date) = 3 THEN &#39;March&#39;<br>        WHEN MONTH(date) = 4 THEN &#39;April&#39;<br>        WHEN MONTH(date) = 5 THEN &#39;May&#39;<br>        WHEN MONTH(date) = 6 THEN &#39;June&#39;<br>        WHEN MONTH(date) = 7 THEN &#39;July&#39;<br>    END AS Month,<br> SUM(new_cases) AS new_cases<br>FROM PortfolioProject..Sheet1$<br>WHERE continent=&#39;Africa&#39; AND date BETWEEN &#39;2023-01-01&#39; AND &#39;2023-07-31&#39;<br>GROUP BY month(date)<br>ORDER BY month(date) ;</pre><p><strong>2. Total cases in each African country:</strong> This query provided me with the total cases for each African country during the specified time frame, enabling me to analyze how the pandemic has affected different countries in Africa. It’s a valuable piece of information for understanding the regional impact of COVID-19.</p><pre>--2. Total cases in each African country across Juanry 2023 to August 2023<br>SELECT Location, SUM(new_cases) AS new_cases_Jan2023_to_Aug2023<br>FROM PortfolioProject..Sheet1$<br>WHERE Continent=&#39;Africa&#39; AND date BETWEEN &#39;2023-01-01&#39; AND &#39;2023-08-28&#39;<br>GROUP BY location</pre><p><strong>3. Total deaths from January to July in Africa:</strong> This query allowed me to analyze the total COVID-19 deaths in Africa every month for the specified period, providing insights into the severity of the pandemic over these months. It’s essential data for understanding the impact of COVID-19 on mortality rates in the region.</p><pre>--3. Total deaths in Africa  across Janury to Augsut<br>SELECT <br> CASE <br>        WHEN MONTH(date) = 1 THEN &#39;January&#39;<br>        WHEN MONTH(date) = 2 THEN &#39;February&#39;<br>        WHEN MONTH(date) = 3 THEN &#39;March&#39;<br>        WHEN MONTH(date) = 4 THEN &#39;April&#39;<br>        WHEN MONTH(date) = 5 THEN &#39;May&#39;<br>        WHEN MONTH(date) = 6 THEN &#39;June&#39;<br>        WHEN MONTH(date) = 7 THEN &#39;July&#39;<br>    END AS Month,<br> SUM(new_deaths) AS new_deaths<br>FROM PortfolioProject..Sheet1$<br>WHERE continent=&#39;Africa&#39; AND date BETWEEN &#39;2023-01-01&#39; AND &#39;2023-07-31&#39;<br>GROUP BY month(date)<br>ORDER BY month(date) ;</pre><p><strong>4. Infection cases across the continents from January to August:</strong> This provided me with a summary of infection cases for each continent on a monthly basis, allowing me to analyze how the COVID-19 pandemic has evolved across different continents during the specified time period. This is good for perspective and understanding how severe or mild COVID-19 is in Africa compared with other continents.</p><pre>--4. Infection Cases across all continents<br>SELECT <br> continent, <br> SUM(CASE WHEN MONTH(date) = 1 THEN new_cases ELSE 0 END) AS january,<br> SUM( CASE WHEN MONTH(date) = 2 THEN new_cases ELSE 0 END) AS feburary,<br> SUM(CASE WHEN MONTH(date) = 3 THEN new_cases ELSE 0 END) AS march,<br> SUM(CASE WHEN MONTH(date) = 4 THEN new_cases ELSE 0 END) AS april,<br> SUM(CASE WHEN MONTH(date) =5 THEN new_cases ELSE 0 END) AS may,<br> SUM(CASE WHEN MONTH(date) =6 THEN new_cases ELSE 0 END) AS june,<br> SUM(CASE WHEN MONTH(date) =7 THEN new_cases ELSE 0 END) AS july<br><br><br>FROM PortfolioProject..Sheet1$<br>WHERE continent is not null AND date BETWEEN &#39;2023-01-01&#39; AND &#39;2023-07-31&#39;<br>GROUP BY continent</pre><h3><strong>Data Visualizations</strong></h3><p>I used Tableau to create data visualizations by exporting the results of my SQL queries and saving them as tables.</p><p>Tableau added interactivity to my dashboard, enhancing the user experience and enabling viewers to explore the data interactively. Click this link to view my interactive dashboard on Tableau: <a href="https://public.tableau.com/app/profile/testimony.adeyemi/viz/CovidDataAnalysisforAfrica/Dashboard1?publish=yes">Link to Tableau Dashboard.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*mT48Xe2ZHcB0xV6Aki5ihg.png" /></figure><p><strong>2. Total cases in each African country</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qsXIFYL1PFiDgRUK9L3W0g.png" /></figure><p><strong>3. Total deaths from January to July in Africa:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*86YUpwlhrRrIi661-D_VNw.png" /></figure><p><strong>4. Infection cases across the continents from January to August</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8LFG8Ix4Kejr6E-gJfOpZA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gnkknKwX4nEnEAioHfX-ZA.png" /></figure><h3><strong>Conclusions</strong></h3><p>Here are consolidated insights and conclusions drawn from the tables :</p><p><strong>1. Decreasing Trend:</strong> After January, there was a general decrease in the number of new cases each month, suggesting that measures taken to control the pandemic might have been effective or seasons affect the prevalence of the virus.</p><p><strong>2. Differential Impact: </strong>COVID-19 impacted African countries differently, with varying levels of infection rates. Factors such as population density, healthcare infrastructure, and public health measures likely played a role.</p><p><strong>3. Continental Variation:</strong> The data demonstrated significant variations in the number of COVID-19 cases across different continents. Asia consistently had the highest case numbers, followed by North America and Europe.</p><p>In conclusion, while there have been fluctuations in COVID-19 cases in Africa, the overall trend has been a decrease in cases since the beginning of 2023. While concerns should not be dismissed, the data suggests that Africa has made progress in managing the pandemic, which is a positive sign.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=601fea20e215" width="1" height="1" alt=""><hr><p><a href="https://medium.com/testimonys-data-journey/covid-19-data-analysis-africa-601fea20e215">COVID 19 Data Analysis (Africa)</a> was originally published in <a href="https://medium.com/testimonys-data-journey">Testimony’s Data Journey</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>