<?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 Abubakar Labaran Salisu on Medium]]></title>
        <description><![CDATA[Stories by Abubakar Labaran Salisu on Medium]]></description>
        <link>https://medium.com/@abubakarsalisulabaran?source=rss-4b17e482e83a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*va0RXvqrz01QaquBSYOfOA.jpeg</url>
            <title>Stories by Abubakar Labaran Salisu on Medium</title>
            <link>https://medium.com/@abubakarsalisulabaran?source=rss-4b17e482e83a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 12:57:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abubakarsalisulabaran/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[Harnessing the Potential of Time Series Analysis and Forecasting with Machine Learning]]></title>
            <link>https://medium.com/@abubakarsalisulabaran/harnessing-the-potential-of-time-series-analysis-and-forecasting-with-machine-learning-645d77943bbe?source=rss-4b17e482e83a------2</link>
            <guid isPermaLink="false">https://medium.com/p/645d77943bbe</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[time-series-data]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[time-series-forecasting]]></category>
            <category><![CDATA[time-series-analysis]]></category>
            <dc:creator><![CDATA[Abubakar Labaran Salisu]]></dc:creator>
            <pubDate>Tue, 18 Jul 2023 21:53:02 GMT</pubDate>
            <atom:updated>2023-07-18T21:53:02.561Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/153/1*tLgidVVc9fexN0xUOVukQg@2x.jpeg" /></figure><h3>Introduction</h3><p>Time series forecasting is a powerful tool in machine learning that helps businesses make predictions based on historical data. It is commonly used in various industries like finance, supply chain management, production, and inventory planning.</p><p>With time series forecasting, businesses can analyze past data and make informed predictions about future values. This technique uses machine learning algorithms to identify patterns and trends in the data, allowing businesses to anticipate changes and make strategic decisions.</p><p>By leveraging time series forecasting, businesses can better understand market dynamics, optimize their operations, and plan for future demand. It is a valuable technique for both beginners and secondary students learning about data science, as it provides a practical and applicable approach to analyzing data and making predictions.</p><h3>What is time series Analysis?</h3><p>Time series analysis plays a vital role in understanding data that is recorded at regular intervals over time. It has numerous applications in various fields, including stock market analysis, financial forecasting, inventory management, census analysis, yield prediction, and sales forecasting.</p><p>In time series analysis, different models are used to capture the patterns and relationships within the data. The Autoregressive (AR), Integrated (I), and Moving Average (MA) models are commonly used. Additionally, there are combined models like Autoregressive Moving Average (ARMA) and Autoregressive Integrated Moving Average (ARIMA).</p><p>These models recognize that measurements taken closer in time are more closely related than those taken further apart. By analyzing time series data using these models, we can uncover meaningful insights and make informed decisions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*p3jxdYp5xHpPpYQFtVmweQ@2x.jpeg" /></figure><h3>Components of the time series</h3><p><strong>Trends: </strong>to describe increasing or decreasing behavior of the time series frequently presented in linear modes</p><p><strong>Seasonality: t</strong>o highlight the repeating pattern of cycles of behavior over time.</p><p><strong>Irregularity/Noise: </strong>to regard the non-systematic aspect of time series deviating from the common model values.</p><p><strong>Cyclicity: </strong>to identify the repetitive changes in the time series and define their placement in the cycle.</p><h3>ARIMA&amp; SARIMA In Time Series</h3><p>ARIMA stands for Autoregressive Integrated Moving Average, which is a composite model that combines the Autoregressive (AR) and Moving Average (MA) approaches. This model is used in time series analysis to account for seasonality and trend. It includes parameters that capture the seasonal patterns, such as dummy variables for weekdays or other distinguishing factors. ARIMA models also incorporate autoregressive and moving average terms to handle the autocorrelation present in the data.</p><p>SARIMA, on the other hand, stands for Seasonal Autoregressive Integrated Moving Average. It extends the capabilities of ARIMA by incorporating a linear combination of past seasonal values and/or forecast errors. This model is particularly useful for capturing and predicting seasonal variations in time series data.</p><h3>Examples and field to analyze time series</h3><p><strong>Climate and weather: </strong>Tons of different weather data types are collected all around the world constantly. ML can help analyze the collected information to predict weather and climate changes.</p><p><strong>Economics</strong>: Gross Domestic Product (GDP), Consumer Price Index (CPI), and unemployment rates</p><p><strong>Social Sciences</strong>: Birth rates, population, migration data, political indicators</p><p><strong>Epidemiology</strong>: Disease rates, mortality rates, mosquito populations</p><p><strong>Medicine</strong>: Blood pressure tracking, weight tracking, cholesterol measurements, heart rate monitoring</p><p><strong>Physical sciences</strong>: Global temperatures, monthly sunspot observations, pollution levels</p><h3>Conclusion</h3><p>In conclusion, time series analysis and forecasting using machine learning techniques offer valuable insights and predictive capabilities for businesses across various industries.</p><p>The complexity of time series forecasting project implementation demands the highest quality of development, which our team experts can provide.</p><p>With the knowledge the company accumulated in similar project performance, we surely meet your project requirements in regards to thoroughly considering domain specifics and business goals of the particular time series prediction example.</p><p><strong>Abubakar lLbaran Salisu</strong></p><p>Arewa Data Science Academy</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=645d77943bbe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Overview of Reinforcement Learning]]></title>
            <link>https://medium.com/@abubakarsalisulabaran/the-overview-of-reinforcement-learning-703ecb753acb?source=rss-4b17e482e83a------2</link>
            <guid isPermaLink="false">https://medium.com/p/703ecb753acb</guid>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[natural-language-process]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Abubakar Labaran Salisu]]></dc:creator>
            <pubDate>Sun, 16 Jul 2023 13:21:54 GMT</pubDate>
            <atom:updated>2023-07-16T13:21:54.265Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/383/1*XkR5m_exwzEPY9l-Ch8vVg@2x.jpeg" /></figure><h3>Introduction</h3><p>In this article, we will explore the fascinating field of reinforcement learning, which plays a crucial role in machine learning. Reinforcement learning allows a computer agent to learn and develop behaviors through the feedback it receives for its previous actions. This feedback guides the agent in making better decisions and improving its performance over time. By understanding the fundamentals of reinforcement learning, we can delve into the exciting world of intelligent agents that can learn and adapt in dynamic environments. Let’s explore the key concepts and applications of reinforcement learning and its significance in the field of machine learning.</p><h3>What is Reinforcement learning</h3><p>Reinforcement learning is a machine learning technique that focuses on guiding software agents in making decisions and taking actions within an environment. It is a crucial part of deep learning and aims to maximize cumulative rewards.</p><p>There are three main approaches to implementing reinforcement learning algorithms:</p><p>1. Value-Based</p><p>2. Policy-Based</p><p>3. Model-Based</p><p>Each approach has its advantages and is suited for different types of problems. Value-based algorithms are effective for problems with large state or action spaces. Policy-based algorithms work well in situations with continuous action spaces. Model-based algorithms are useful when the environment dynamics are known or can be modeled accurately.</p><p>By utilizing these different approaches, reinforcement learning algorithms enable software agents to learn and adapt their behaviors in complex environments, leading to improved performance and decision-making capabilities.</p><h3>Types of Reinforcement learning</h3><p>There are two types of reinforcement learning methods:</p><blockquote>positive and negative reinforcement.</blockquote><h4>Positive reinforcement</h4><p>refers to events or rewards that occur as a result of specific behavior. It increases the strength and frequency of the behavior and has a positive impact on the actions taken by the agent. Positive reinforcement helps maximize performance and sustain positive changes over a longer period of time. However, it is important to note that excessive positive reinforcement can lead to over-optimization of the state, which may impact the overall results.</p><h4>Negative reinforcement</h4><p>involves strengthening behavior that occurs due to the presence of a negative condition that should be stopped or avoided. It helps define the minimum standard of performance or behavior. Negative reinforcement provides enough motivation to meet the minimum requirement, but it does not necessarily promote higher levels of performance.</p><p>Both positive and negative reinforcement play important roles in shaping the behavior of agents in reinforcement learning. They provide feedback and incentives for the agent to learn and adapt its actions based on the desired outcomes. By utilizing a combination of positive and negative reinforcement, agents can learn to optimize their behaviors and achieve desired goals in a given environment.</p><h3>Reinforcement vs supervised and unsupervised learning</h3><h4>Reinforcement Learning:</h4><p>It is neither based on supervised learning nor unsupervised learning. Moreover, here the algorithms learn to react to an environment on their own. It is rapidly growing and moreover producing a variety of learning algorithms. These algorithms are useful in the field of Robotics, Gaming etc.</p><p>For a learning agent, there is always a start state and an end state. However, to reach the end state, there might be a different path. In Reinforcement Learning Problem an agent tries to manipulate the environment. The agent travels from one state to another. The agent gets the reward(appreciation) on success but will not receive any reward or appreciation on failure. In this way, the agent learns from the environment.</p><h4>supervised Learning:</h4><p>Supervised learning is the types of machine learning in which machines are trained using well “labelled” training data, and on basis of that data, machines predict the output. The labelled data means some input data is already tagged with the correct output.</p><p>In supervised learning, the training data provided to the machines work as the supervisor that teaches the machines to predict the output correctly. It applies the same concept as a student learns in the supervision of the teacher.</p><h4>Unsupervised Learning:</h4><p>This learning algorithm is completely opposite to Supervised Learning. In short, there is no complete and clean labelled dataset in unsupervised learning. Unsupervised learning is self-organized learning. Its main aim is to explore the underlying patterns and predicts the output. Here we basically provide the machine with data and ask to look for hidden features and cluster the data in a way that makes sense.</p><h3>How Reinforcement learning works</h3><p>Imagine an AI agent placed inside a maze environment with the objective of finding a valuable diamond. This agent interacts with the maze by taking actions such as moving in different directions, turning, or exploring different paths. Each action results in a change of the agent’s state within the maze, and the agent receives feedback in the form of rewards or penalties.</p><p>Through this iterative process, the agent learns how its actions impact its progress in finding the diamond. When the agent takes actions that bring it closer to the diamond or uncover valuable information, it receives positive rewards, often in the form of points or a higher score. These rewards reinforce the agent’s behavior, encouraging it to continue taking similar actions to maximize its chances of finding the diamond.</p><p>Conversely, if the agent takes actions that lead to dead ends, repeated mistakes, or wasted time, it receives negative penalties, usually in the form of point deductions or a lower score. These penalties serve as discouragement for the agent to avoid such actions in the future and encourage it to explore more promising paths.</p><p>By experiencing the positive rewards and negative penalties, the agent gradually learns which actions are more likely to lead to success and which should be avoided. Over time, the agent’s decision-making process becomes more refined, and it develops a strategy for navigating the maze efficiently to reach its goal of finding the diamond.</p><h3>Q-learning</h3><p>Q learning is a value-based method of supplying information to inform which action an agent should take.</p><h3>Conclusion</h3><p>In conclusion, the concept of reinforcement in learning is based on the idea that consequences have a significant impact on behavior. When behaviors are followed by rewards or positive consequences, they are strengthened and more likely to be repeated. On the other hand, when behaviors result in punishment or negative consequences, they are weakened and less likely to occur in the future.</p><p>Reinforcement learning allows AI agents to navigate and explore environments, making decisions based on the feedback they receive. By understanding the relationship between their actions and the consequences that follow, these agents can optimize their behavior to achieve desired outcomes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=703ecb753acb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Sentiment Analysis]]></title>
            <link>https://medium.com/@abubakarsalisulabaran/understanding-sentiment-analysis-e3ccdb2002e6?source=rss-4b17e482e83a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3ccdb2002e6</guid>
            <category><![CDATA[machine-learning-tools]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[sentiment-analysis]]></category>
            <dc:creator><![CDATA[Abubakar Labaran Salisu]]></dc:creator>
            <pubDate>Sun, 25 Jun 2023 22:12:58 GMT</pubDate>
            <atom:updated>2023-06-25T22:12:58.775Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*cItpvbE4dC-oniVrVgKudg@2x.jpeg" /></figure><h3>What is Sentiment analysis?</h3><p>Sentiment analysis is a type of text research that helps us understand people’s opinions and emotions expressed in written text. It involves using a combination of statistics, natural language processing (NLP), and machine learning techniques to extract subjective information from text files. This information can include a reviewer’s feelings, thoughts, judgments, or assessments about a particular topic, event, company, or its activities.</p><p>You might also come across terms like opinion mining, sentiment classification, or extraction when discussing sentiment analysis. These all refer to the same idea of analyzing text to understand people’s sentiments. The main goal of sentiment analysis is to determine the opinions or attitudes of users or audiences toward a specific object or topic by analyzing a large amount of text from various sources.</p><p>Depending on your goals, sentiment analysis can be done at different levels of detail. For example, you could analyze a group of reviews to determine the overall emotional tone and find out what percentage of customers liked a new clothing collection. On the other hand, if you want to understand what visitors like or dislike about a particular garment, why they feel that way, or if they compare it with similar items from other brands, you would need to analyze each sentence of the reviews focusing on specific aspects and using specific keywords.</p><p>Let’s say, <em>sentiment analysis helps us gain insights into people’s opinions and emotions expressed in written text. By analyzing text at different levels of detail, we can understand the overall sentiment or delve into specific aspects to get a deeper understanding of people’s thoughts and preferences.</em></p><h3>Type of Sentiment Analysis</h3><p>When it comes to applying sentiment analysis, it’s important to understand the different types it can take. Here are the main types to know:</p><p>1. Fine-grained Sentiment Analysis: This type focuses on determining the polarity or sentiment of an opinion. It can be as simple as distinguishing between positive and negative sentiments or can be more detailed, such as categorizing sentiments as very positive, positive, neutral, negative, or very negative. An example of this is the star ratings on Amazon product reviews.</p><p>2. Emotion Detection: Emotion detection aims to identify specific emotional states expressed in text. It involves using a combination of lexicons (lists of words associated with emotions) and machine learning algorithms to determine the emotions conveyed in the text.</p><p>3. Aspect-based Sentiment Analysis: This type goes deeper by focusing on specific aspects or elements of a product or topic. For example, it can analyze opinions about the brightness of the flashlight in a smartphone. Aspect-based sentiment analysis is commonly used in product analytics to understand how customers perceive different aspects of a product and identify its strengths and weaknesses.</p><p>4. Intent Analysis: Intent analysis revolves around determining the intended action or purpose expressed in a message. It is often used in customer support systems to streamline workflows and understand what customers are trying to accomplish or what assistance they need.</p><p>By understanding these different types of sentiment analysis, you can gain insights into the polarity of opinions, detect emotions, analyze specific aspects of products, and identify intentions expressed in text.</p><h3>How sentiment Analysis work?</h3><p>Sentiment analysis relies on machine learning, statistics, and natural language processing (NLP) to uncover people’s thoughts and feelings expressed on digital platforms. One key approach used in sentiment analysis is rule-based sentiment analysis. Here’s how it works:</p><p>Rule-based sentiment analysis uses predefined rules to identify the sentiment or tone of a text. It looks for polarized words, which are words that indicate positive, negative, or neutral sentiment. By counting the number of positive and negative words in the text, the system can determine the overall sentiment. To create these rules, NLP techniques like lexicons are used. Lexicons are lists of words along with the emotions they convey.</p><p>For example, let’s consider a review:</p><p>“The food here was absolutely amazing! I had a great time with my family.”</p><p>In the rule-based approach, positive words like “amazing” and “great” would be identified, indicating a positive sentiment in this case.</p><p>By applying these predefined rules and using lexicons to recognize polarized words, rule-based sentiment analysis can determine the sentiment of a text. It provides a straightforward way to identify whether the expressed sentiment is positive, negative, or neutral.</p><p>This approach is just one of the techniques used in sentiment analysis and can be helpful in analyzing sentiments across various digital platforms.</p><h3>Benefits of sentiment Analysis</h3><p>Sentiment analysis allows customer support agents to easily find and track previous messages from customers and understand the issues they are facing, helping agents resolve customer queries quickly and efficiently.</p><h3>Conclusion</h3><p>In conclusion, sentiment analysis is a powerful tool that allows us to uncover and understand the thoughts and feelings expressed by people on digital platforms. By leveraging machine learning, statistics, and natural language processing (NLP), sentiment analysis helps us analyze text and determine the overall sentiment or tone.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3ccdb2002e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Power of Natural Language Processing]]></title>
            <link>https://medium.com/@abubakarsalisulabaran/the-power-of-natural-language-processing-43c07d4365d0?source=rss-4b17e482e83a------2</link>
            <guid isPermaLink="false">https://medium.com/p/43c07d4365d0</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[machine-learning-ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-lear]]></category>
            <dc:creator><![CDATA[Abubakar Labaran Salisu]]></dc:creator>
            <pubDate>Sun, 25 Jun 2023 21:11:48 GMT</pubDate>
            <atom:updated>2023-06-25T21:11:48.865Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*3sUSYXA9tWZJQJhNbQ9B0g@2x.jpeg" /><figcaption>Natural language processing (NLP)</figcaption></figure><h3>The Basics and Applications of NLP</h3><p>Artificial intelligence (AI) is everywhere and it’s revolutionizing the way we see the world. However, the rise of AI and data analysis tools has resulted in a massive influx of data. To make sense of this enormous amount of raw data, we need something called Natural Language Processing (NLP). In simple terms, NLP is a type of AI that focuses on understanding and analyzing human language. It helps computers comprehend, interpret, and manipulate human language, enabling them to perform tasks such as automatic translation, sentence completion, fraud detection, and chatbot interactions. The main goal of NLP applications is to enable humans to communicate with computers as if they were communicating with another person.</p><h3>Types</h3><p>NLP can be divided into two main categories: Natural Language Understanding and Natural Language Generation. Natural Language Understanding is the analytical side of NLP, which involves analyzing the content of text and extracting insights from it. On the other hand, Natural Language Generation is the practical side of NLP, aimed at enhancing the computer’s ability to generate text. This includes converting data into written language, translating speech into text, and converting text into audible speech.</p><h3>Challenges</h3><p>Most NLP applications involve four essential steps: sentence segmentation, word tokenization, part-of-speech tagging, and syntactic or dependency parsing. However, there are challenges that can hinder the effectiveness of NLP software. These challenges arise from the irregularity and ambiguity of natural language. Human language consists of numerous words with multiple meanings, dialects, and other complexities. While humans can express and interpret nuanced meanings, machines require clear and well-defined algorithms to follow. Another challenge is the flexible nature of language structures, which can make it difficult to disambiguate sentence boundaries and determine phrase types from the same set of words.</p><h3>Applications</h3><p>NLP has a wide range of applications that demonstrate its versatility. Here are a few examples:</p><p>1. Social Media Monitoring: NLP-based tools like Buffer can help businesses monitor social media channels for brand mentions and notify them when consumers discuss their brand.</p><p>2. Text Classification: This application involves categorizing text inputs by topic or tonality. It can be used to filter spam emails, identify languages, analyze sentiment in product reviews, and categorize books, movies, and artworks.</p><p>3. Sentiment Analysis: NLP tools can measure customer opinions, monitor a company’s reputation, and determine whether customers have positive, negative, or neutral views about a brand.</p><p>4. Targeted Advertising: This type of online advertising shows ads to users based on their online activity. NLP aids in targeted advertising through keyword matching, ensuring relevant ads are shown to potential customers.</p><p>5. Email Categorization: Gmail utilizes NLP to group incoming emails into different tabs, such as Primary, Social, and Promotions. NLP helps evaluate the content of each email and accurately categorize them.</p><p>6. Automatic Summarization: NLP can summarize lengthy documents into concise and accurate summaries. It is particularly useful for extracting keywords from text.</p><p>7. Early Disease Prediction: NLP enables the recognition and prediction of diseases based on electronic health records and patient speech. This capability is being explored in various health conditions, from cardiovascular diseases to depression and schizophrenia.</p><h3>Conclusion</h3><p>In conclusion, Natural Language Processing (NLP) is a powerful tool that helps computers understand and interact with human language. It has a wide range of applications that make our lives easier and more efficient.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43c07d4365d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Clustering in Machine Learning]]></title>
            <link>https://medium.com/@abubakarsalisulabaran/clustering-in-machine-learning-e12764157777?source=rss-4b17e482e83a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e12764157777</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[cluster-analysis]]></category>
            <dc:creator><![CDATA[Abubakar Labaran Salisu]]></dc:creator>
            <pubDate>Fri, 09 Jun 2023 23:20:10 GMT</pubDate>
            <atom:updated>2023-06-27T17:06:17.973Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*rtINdFJQA-VH9Dgy0683TQ@2x.jpeg" /></figure><h3>Introduction</h3><p>Clustering is an unsupervised machine learning technique that finds extensive applications in various domains, such as pattern recognition, image analysis, customer analytics, market segmentation, and social network analysis, among others. Clustering is widely adopted across industries, including airlines, healthcare, and beyond.</p><p>Unlike supervised learning methods like classification, clustering does not require labeled data. This characteristic makes clustering highly advantageous, as it can uncover patterns and groupings in unlabeled datasets. In this tutorial on clustering, you will gain insights into the following topics:</p><h3>Types of Clustering Algorithms</h3><h3>K-means</h3><p>With k being a user-defined value, k means algorithm is a well-known partitional clustering algorithm. K-Means divides data points into k cluster centers. The method involves an iterative process minimizing the sum of squared distances between each data point and the cluster centroid that it is assigned. Once the method converges or a maximum number of iterations is reached, K-Means iterative algorithm updates the cluster centroids in each iteration. K-Means Clustering Algorithm is one of the top clustering algorithms when it comes to popularity.</p><h3>How K-Means Clustering Algorithm Works?</h3><p>The steps of the K-means cluster analysis procedure are as follows:</p><p>Set the centroids of the k clusters at random.</p><p>Each data point should be put into the cluster with the closest centroid.</p><p>Calculate each cluster’s centroids again using the mean of the data points that were allocated to it.</p><p>Till the centroids converge or a maximum number of iterations is reached, repeat steps 2–3.</p><p>In step 2, a distance metric, often Euclidean distance, is used to measure the average distance between data points and cluster centroids. Each data point is categorized into a cluster center, based on the cluster centroids’ ultimate positions once the algorithm converges a well-defined cluster center and model.</p><h3>Advantages and Disadvantages of K-Means Clustering Algorithm</h3><p>Let us discuss a few pros and cons of the K-means clustering algorithm.</p><h3>Advantages:</h3><p>K-Means is straightforward to use.</p><p>K-Means is capable of handling big datasets and is computationally efficient.</p><p>High-dimensional data may be handled with K-Means.</p><p>Scalable and applicable for clustering in real-time applications is K-Means.</p><h3>Disadvantages:</h3><p>K-Means assumes that clusters are spherical and uniform in size, which isn’t necessarily true.</p><p>The number of clusters must be given for K-Means, which may not always be known in advance.</p><p>Suboptimal clusters might develop if K-Means converge to a local minimum rather than a global minimum.</p><p>Outliers can significantly alter the final clusters since K-Means is sensitive to them.</p><p>Real-World Applications of K-Means Clustering</p><p>There are several uses for the K-Means density-based clustering algorithm, including:</p><p>Image Segmentation: K-Means is used to split photos into several sections according to their hue or texture.</p><p>Marketing: K-Means is used to divide clients into groups according to their demographics and purchase habits.</p><p>Genetics: K-Means is used to group genes according to how much they are expressed.</p><p>Anomaly Detection: K-Means is a technique for detecting aberrant behavior/ anomaly detection, such as that in network traffic or financial transactions.</p><p>Recommendation System: K-Means is used in recommendation systems to group individuals or goods that are similar together.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e12764157777" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Classification in Machine Learning]]></title>
            <link>https://medium.com/@abubakarsalisulabaran/classification-in-machine-learning-35f20eb764f5?source=rss-4b17e482e83a------2</link>
            <guid isPermaLink="false">https://medium.com/p/35f20eb764f5</guid>
            <category><![CDATA[classification]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Abubakar Labaran Salisu]]></dc:creator>
            <pubDate>Wed, 07 Jun 2023 21:52:53 GMT</pubDate>
            <atom:updated>2023-06-07T21:56:14.127Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*k0LHtbu_IB93YT-3FO1Tqw.jpeg" /></figure><h3><strong>Introduction</strong></h3><p>Classification is the process of predicting the class of given data points. Classes are sometimes called targets, labels or categories. Classification predictive modeling is the task of approximating a mapping function (F) from input variables (X) to discrete output variables (Y)</p><h3><strong>What is Classification?</strong></h3><p>In machine Learning, Classification refers to training a model on a labeled dataset to assign data points to classes or to classify new data points.</p><p>The task of classification and the most common are:</p><p>Binary, multi-class, Multi-label and imbalanced classification.</p><h3><strong>Types of Classification</strong></h3><p>There are a lot more types of classification algorithms not covered in this Article. Here are few:</p><p>o K-Nearest Neighbors</p><p>o Logistics Regression</p><p>o Decision Tree</p><p>o Random Forest</p><p>o Support Vector Classification</p><h3><strong>Decision Tree</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/254/1*uIdKWn_KPP44v6lGAoQTaA.jpeg" /><figcaption>decision tree</figcaption></figure><p>The decision tree classification is based on the decision tree algorithm. Decision tree are predictive models that use simple binary rules to predict the value of a target variables. One good thing is Decision tree can be used for both classification and regression. They are models containing branches, nodes and leaves. They split a dataset into smaller parts containing similar elements. Decision tree fit a sine curve to the data to define the rules of the classification or regression.</p><p>Some decision trees classification algorithms are:</p><pre>DecisionTreeClassifier in sklearn.tree</pre><h3>Four steps of Decision Tree</h3><p>The steps in decision tree with consist of:</p><p>1. Define the problem area for which decision making is necessary</p><p>2. Draw a decision tree with all possible solutions and their consequences.</p><p>3. Input relevant variables with their respective probability values</p><p>4. Determine and allocate payoffs for each possible outcome</p><h3><strong>Conclusion</strong></h3><p>We have seen an overview of machine learning classification and covered the basic classification algorithms.</p><p>Happy Learning!</p><p>Abubakar Labaran Salisu</p><p>#ArewaDataScienceAcademy</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35f20eb764f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Predictive Precision: Exploring Regression Analysis II by Abubakar Labaran Salisu]]></title>
            <link>https://medium.com/@abubakarsalisulabaran/predictive-precision-exploring-regression-analysis-for-data-analysis-ii-by-abubakar-labaran-salisu-517f71ff1e0a?source=rss-4b17e482e83a------2</link>
            <guid isPermaLink="false">https://medium.com/p/517f71ff1e0a</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[linear-regression]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Abubakar Labaran Salisu]]></dc:creator>
            <pubDate>Thu, 01 Jun 2023 17:39:53 GMT</pubDate>
            <atom:updated>2023-06-01T17:47:48.542Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/292/1*ghx41HcNARC0nrCnjNK1vg.jpeg" /><figcaption>Regression Analysis</figcaption></figure><h3><strong>Introduction</strong></h3><p>Regression problems are prevalent in machine learning, and regression analysis is the most often used technique for solving them. It based on data modeling and entails determining the best fit line that passes through all data points with the shortest distance possible between the line and each data point. There is techniques for regression analysis which we will discuss, Linear regression and Logistic regression these are the most widely used. Let us learn more about regression analysis.</p><h3><strong>What is Regression Analysis</strong></h3><p>A regression analysis makes it possible to infer or predict a variable on the basis of one or more other variables. Let say you want find out what influence’s the salary of person, for example you can take the highest level of Education the weekly working hours and the age of the person, now you can investigate whether this three variables have influence on salary, if you can do so you can predict the person salary by taking the highest educational level the weekly working hours and person’s age. Note that the variable you want to predict (salary) is called Dependent variables, The variables you used for prediction (highest educational level, weekly working hours, age) are called Independent variables or predictors. Regression analysis is used to achieved two goals;</p><p>· Measurement of the influence of one or more variables on another variable.</p><p>· Prediction of a variable by one or more other variables.</p><p>Let’s go on.</p><h3><strong>Types of Regression</strong></h3><p>There are numerous regression analysis approaches available for making predictions</p><p><strong>I.</strong> <strong>Liner Regression</strong></p><p>The most extensively used modeling technique is liner regression, which assumes a liner connection between a dependent variable (Y) and an independent variable (X). it employs a regression line, also known as a best-fit line. The linear connection is defined as Y=c+m*X+e, where ‘c’ denotes the intercept, ‘m’ denotes the slope of the line, and ‘e’ is the error term.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/247/1*D5omORcfbjp8mivfs3qSTQ.jpeg" /><figcaption>linear regression</figcaption></figure><p><strong>II.</strong> <strong>Polynomial Regression</strong></p><p>The technique of polynomial regression analysis is used to represent a non-linear relationship between dependent and independent variables. It is variant of the multiple linear regression models, except that the best fit line is curved rather than straight.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/291/1*TxNhXk5viOSW_-tqHwly5A.jpeg" /><figcaption>polynomial regression</figcaption></figure><p><strong>III.</strong> <strong>Logistic Regression</strong></p><p>When the dependent variable is discrete, the logistics regression technique is capable. In other words, this technique is used to compute the probability of mutually exclusive occurrences such as pass/fail, true/false, 0/1, yes/no, and so forth. Thus, the target variable can take on only one of two values, and a sigmoid curve represents its connection to the independent variable, and probability has a value between 0 and 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/230/1*FOisWuDDXj4Hg8orY7qCrQ.jpeg" /><figcaption>logistic regression</figcaption></figure><p><strong>How to Build a Linear Regression Model Using Python:</strong></p><p>Now, you will learn how to build a Linear Regression Model Using Python.</p><h3><strong>Instructions</strong></h3><p>Take a look at the Linnerud dataset ‘It consists of three exercise (data) and three physiological (target) variables collected from twenty middle-aged men in a fitness club’.</p><p>In your own words, describe how to create a Regression model that would plot the relationship between the waistline and how many situps are accomplished.</p><p><strong>Let’s Start</strong></p><p>To create a regression model that plots the relationship between the waistline and the number of situps accomplished using the Linnerud dataset in Scikit-learn, you can follow these steps:</p><ol><li>Import the necessary libraries: Start by importing the required libraries, including Scikit-learn, NumPy, and Matplotlib. These libraries will provide the tools and functions needed for data manipulation, regression modeling, and visualization.</li></ol><pre>import matplotlib.pyplot as plt<br>import pandas as pd<br>import numpy as np<br>from sklearn import datasets, linear_model, model_selection<br>from sklearn.metrics import mean_squared_error</pre><p>2. Load the Linnerud dataset: Use the <strong>load_linnerud()</strong> function from Scikit-learn to load the Linnerud dataset.</p><pre>x, y = datasets.load_linnerud(return_X_y=True)</pre><p>3. Extract the relevant data: Since we are interested in the relationship between the waistline and situps, extract the ‘waist’ column as the independent variable and the ‘situps’ column as the dependent variable.</p><pre>x = x[:, np.newaxis, 1]<br>y = y[:, np.newaxis, 1]</pre><p>4. Split the data into training and testing sets: Divide the data into two sets: a training set and a testing set. The training set will be used to train the regression model, while the testing set will be used to evaluate its performance.</p><pre>x_train, x_test, y_train, y_test = model_selection.train_test_split(x, y, test_size=0.3)</pre><p>5. Create and train the regression model: Choose a regression algorithm suitable for your task, such as linear regression, and create an instance of that model. Fit the model to the training data using the <strong>fit()</strong> function, which will allow the model to learn the relationship between waistline and situps.</p><pre>model = linear_model.LinearRegression()<br>model.fit(x_train, y_train)</pre><p>6. Make predictions: Once the model is trained, use it to make predictions on the testing set. Use the <strong>predict()</strong> function to obtain the predicted situps values based on the waistline input.</p><pre>y_pred = model.predict(x_test)<br></pre><p>7. Evaluate the model: Compare the predicted situps values with the actual situps values from the testing set. You can use various metrics, such as mean squared error (MSE) or R-squared, to evaluate the performance of the model. These metrics will give you an idea of how well the model captures the relationship between waistline and situps.</p><pre>mse = mean_squared_error(y_test, y_pred)<br>r2 = model.score(x_test, y_test)<br>mse = np.sqrt(mean_squared_error(y_test,y_pred))<br>print(f&#39;Mean error: {mse:3.3} ({mse/np.mean(y_pred)*100:3.3}%)&#39;)</pre><p>OUTPUT:</p><p><em>mean_squared_error 4.052352837740671</em></p><p><em>R-squared -0.38937811579680126</em></p><p><em>Mean error: 2.01 (5.73%)</em></p><p>8. Visualize the results: To plot the relationship between waistline and situps, you can create a scatter plot using Matplotlib. On the x-axis, plot the waistline values, and on the y-axis, plot the actual situps values from the testing set. Additionally, plot the predicted situps values as a line or scatter points to visualize how well the model fits the data.</p><pre>plt.scatter(x_test, y_test, color= &#39;black&#39;)<br>plt.plot(x_test, y_pred, color=&#39;blue&#39;, linewidth=2)<br>plt.xlabel(&#39;Waistline&#39;)<br>plt.ylabel(&#39;Situps&#39;)<br>plt.title(&#39;Relationship between waistline and situps&#39;)<br>plt.grid(True)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*4qghAuMCnZcNZ6o5NhLq5g.png" /><figcaption>Visualization</figcaption></figure><p>The relationship being explored in this work helps you understand the association between waistline and situps and provides insights into how these variables interact in the dataset of middle-aged men in a fitness club.</p><h3>CONCLUSION</h3><p>In this blog we learn about regression analysis and equips us with a powerful tool for understanding relationship, making prediction, and drawing meaningful conclusion from data.</p><p>Thanks for reading</p><h4>ABUBAKAR LABARAN SALISU</h4><h4>AREWA DATA SCIENCE ACADEMY</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=517f71ff1e0a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DATA PREPARETION FOR MACHINE LEARNING || By Abubakar Labaran Salisu]]></title>
            <link>https://medium.com/@abubakarsalisulabaran/data-preparetion-for-machine-learning-by-abubakar-labaran-salisu-ab1de7c7ca9a?source=rss-4b17e482e83a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab1de7c7ca9a</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-preparation]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Abubakar Labaran Salisu]]></dc:creator>
            <pubDate>Thu, 25 May 2023 19:32:44 GMT</pubDate>
            <atom:updated>2023-05-25T19:32:44.895Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7j_xpfCXrwt46B1hPUmp6A.jpeg" /><figcaption>Data preparation</figcaption></figure><h3>INTRODUCTION</h3><p>Starting your journey in machine learning but don’t know how to prepare dataset? Check out this article to learn about data preparation for machine learning.</p><h3>WHAT IS DATA PREPARETION IN MACHINE LEARNING</h3><p>Data preparation is usually the first step when one tries to solve real-world problem using machine learning. This is raw data usually has various inconsistencies that must be resolved before the dataset can be fed to machine learning algorithms. Here is the list involved in data preparation.</p><p>I like to define the process using the four high-level steps:</p><p>1. <strong>Define the problem</strong></p><p><strong>2. Prepare data</strong></p><p><strong>3. Evaluate models</strong></p><p><strong>4. Finalize model</strong></p><p>Let’s take a closer look at each of these steps.</p><h3>DEFINE THE PROBLEM</h3><p>This step is concerned with learning enough about the project to select framing or framings of the prediction task. For example is it classification or regression, or some other higher-order problem type. This step also involves taking a close look at the data, as well as perhaps exploring the data using summary statistics and data visualization.</p><h3>PREPARE DATA</h3><p>In data prepare we can transform the raw data that was collected into a form that can be used in modeling. Data pre-processing techniques generally refers to the addition, deletion, or transformation of training dataset.</p><h3>EVALUATE MODELS</h3><p>This step is concerned with evaluating machine learning models on your dataset. It requires that you design a robust test harness used to evaluate your models so that the results you get can be trusted and used to select among the models that you have evaluated. This step also involves tasks for getting the most out of well-performing models such as hyper-parameter turning models.</p><h3>FINALIZE MODEL</h3><p>This step is concerned with selecting and using a final model. Once a suite of models has been evaluated, you must choose a model that represents the solution to the project. This is called model selection and may involve further evaluation of candidate models on a hold out validation dataset, or selecting via project-specific criteria such as model complexity.</p><h3>CONCLUSION</h3><p>In this article, you discovered how to consider data preparation as a step in a broader predictive modeling machine learning project.</p><p><strong>Abubakar Labaran Salisu</strong></p><p><strong>Arewa Data Science Academy</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab1de7c7ca9a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MACHINE LEARNING: A Historical Overview Of Machine Intelligence || By Abubakar Labaran Salisu]]></title>
            <link>https://medium.com/@abubakarsalisulabaran/machine-learning-a-historical-overview-of-machine-intelligence-by-abubakar-labaran-salisu-2e51ea829b61?source=rss-4b17e482e83a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e51ea829b61</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Abubakar Labaran Salisu]]></dc:creator>
            <pubDate>Thu, 25 May 2023 19:24:40 GMT</pubDate>
            <atom:updated>2023-05-25T19:24:40.529Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/384/1*EYXs2mGV9vulCikxbN_g5g.jpeg" /></figure><h3>INTRODUCTION</h3><p>Machine learning is a subfield of Artificial Intelligence (AI). The goal of machine learning generally is to understand the structure of data and fit data into models that can be understood and utilized by people.</p><p>Machine learning Algorithms instead allow for computers to train on data inputs and use statistical analysis in order to output values that fall within specific range. Because of this, machine learning facilitates computers in building models from sample data in order to automate decision-making processes based on data inputs.</p><p>Machine learning is a continuously developing field. Because of this, there are some considerations to keep in mind as you work with machine learning methodologies, or analyze the impact of machine learning processes. In this article we are going to know more about the basics of Machine learning.</p><h3>WHAT IS MACHINE LEARNING</h3><p>Machine learning (ML) is a discipline of artificial intelligence (AI) that provides machines with the ability to automatically learn from data and past experiences while identifying the patterns to make predictions with minimal human intervention.</p><h3>HISTORY OF MACHINE LEARNING</h3><p>Before some years (about 40–50 years) machine learning was a scientific fiction, but today it is part of our daily life. Machine learning is making our day to day life easier. However, the idea behind machine learning is so old and has a long history. We will walk through the major milestones in the history of machine learning and artificial intelligence.</p><p><strong>1950: MACHINE THAT THINK</strong></p><p>Alan Turing is credited as helping to lay the foundation of the concept of a machine than can think. The Turing test, originally called the imitation game by Alan Turing in 1950, is a test of a machine’s ability to exhibit intelligent behaviors equivalent to, or indistinguishable from, that of human.</p><p><strong>1956–1974 THE GOLDEN YEAR</strong></p><p>From 1950 to the mid of 70’s, optimism ran high in the hope that artificial intelligence (AI) could solve many problems. The first programming language optimized for artificial intelligence. This era was marked by the creation of the first Chabot, ELIZA, BLOCK WORLDS and SHAKEY, the first robot to move around on its own.</p><p><strong>1974–1980 AI WINTER</strong></p><p>By the mid of 1970’s it has been clear that the understanding of machine learning is rate too low (Understated). In the history of AI an AI winter is a period of reduced funding and interest in AI researches, No available compute power and confidence in the field.</p><p>Some issues that impacted confidence included:</p><p>1. Limitation: Compute power was too low.</p><p>2. Paucity of data.</p><p><strong>1980’s EXPERT SYSTEM</strong></p><p>A time the AI field grew, its benefit to business became clearer in 1980 the rapid increase of experts system blow. Experts systems were among the first truly successful form of artificial intelligence (AI) software. This era also saw increasing attention paid to neural networks.</p><p><strong>1993–2011</strong></p><p>This epoch saw a new era for ML and AI to be able to solve some of the problems that had been caused earlier by the lack of data and compute power. The amount of data began to rapidly increase and become more widely available, for better and for worse, especially with the advent of the smartphone around 2007. Compute power expanded exponentially, and algorithms evolved alongside.</p><h3>NOW</h3><p>Today machine learning and AI touch almost every part of our lives. This era calls for careful understanding of the risks and potentials effects of these algorithms on human lives. As Microsoft’s Brad Smith has stated, “Information technology raises issues that go to the heart of fundamental human-rights protections like privacy and freedom of expression. These issues heighten responsibility for tech companies that create these products. In our view, they also call for thoughtful government regulation and for the development of norms around acceptable uses” (<a href="https://www.technologyreview.com/2019/12/18/102365/the-future-of-ais-impact-on-society/">source</a>).</p><h3>MACHINE LEARNING FAIRNESS</h3><p>Machine Learning fairness is the process of correcting and eliminating algorithmic bias (of race and ethnicity, gender, sexual orientation, disability, and class) from machine learning model.</p><h3>TECHNIQUES OF MACHINE LEARNING</h3><p>Machine learning uses two types of techniques with is supervised and unsupervised, in supervised learning with trains a model on known input and output data so it can predicts future output while the unsupervised learning which finds hidden patterns structure in input data.</p><h3>CONCLUSION</h3><p>This article reviewed some of the use cases of machine learning, common methods and popular approaches in the field. Thanks for learning.</p><p><strong>Abubakar Labaran Salisu</strong></p><p><strong>Arewa Data Science Academy</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e51ea829b61" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Visualization in Python || by Abubakar Labaran Salisu]]></title>
            <link>https://medium.com/@abubakarsalisulabaran/data-visualization-in-python-by-abubakar-labaran-salisu-580c695e790a?source=rss-4b17e482e83a------2</link>
            <guid isPermaLink="false">https://medium.com/p/580c695e790a</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Abubakar Labaran Salisu]]></dc:creator>
            <pubDate>Mon, 15 May 2023 21:55:30 GMT</pubDate>
            <atom:updated>2023-05-15T21:56:50.267Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/308/1*GLk3RNdSuh2NG5Dmjemv9g.jpeg" /><figcaption>Data Visualization</figcaption></figure><h3><strong>What is data visualization?</strong></h3><p>Data visualization is a field in data analysis that deal with visual representation of data or information in the form of a chart, diagram, graph etc. The main goal of data visualization is to make it easier to identify the patterns, trends and outliers in large data sets.</p><p>Data visualization is important for almost every career. It can be used by teachers to display student results, by computer scientists exploring advancement in Artificial Intelligence (AI).</p><h3><strong>Why data visualization is important?</strong></h3><p>No matter what business or career you’ve chosen, data visualization can help by delivering data in the most efficient way possible. As one of the essential steps in the business intelligence process. Let’s go through.</p><h3><strong>Data visualization in python</strong></h3><p>Data visualization with python offer the most well-known data visualization libraries namely Matplotlib, Seaborn and many other such data visualization packages with different features for creating informative and customized to present data in the most simple and effective way. Let’s talk about the most powerful libraries which is Matplotlib and Seaborn.</p><h3><strong>Matplotlib vs Seaborn</strong></h3><h3>Matplotlib</h3><p>Matplotlib is a library in python that enables users generate visualization like histograms, scatter plot, bar chart, pie chart and much more.</p><h3>Seaborn</h3><p>Seaborn is a visualization library that is built on top of Matplotlib. It provides data visualization that are more aesthetic and statistically sophisticated.</p><h3><strong>Line chart</strong></h3><p>Line chart display the evolution of one or numeric variables. Data points are connected by a straight line segment. Like scatter plot except that the measurements points are ordered (typically by their x-axis value) and joined with straight line segment.</p><p>In this short guide, you’ll see how to plot a line chart in python using matplotlib.</p><h3>Step 1: install the matplotlib package</h3><p>There is different ways for installing package; you can use pip or conda to install libraries.</p><p>For pip:</p><pre>Pip install matplotlib</pre><p>For Conda:</p><pre>Conda install matplotlib</pre><h3>Step 2: getting data for the line chart</h3><p>After install the package the next, gather the data for your line chart.</p><p>For example, let’s use the following data about two variables: Year and Unemployment_rate.</p><p>Here is the complete data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*IIX7hyWyg085XPUZiqhFUQ.jpeg" /><figcaption>Dataset</figcaption></figure><p>The ultimate goal is to depict the above data using a Line chart.</p><h3>Step 3: Capture the data in python</h3><p>You can capture the above data using the following two list.</p><pre>year = [1920, 1930, 1940, 1950, 1960, 1970, 1980, 1990, 2000, 2010]<br>unemployment_rate = [9.8, 12, 8, 7.2, 6.9, 7, 6.5, 6.2, 5.5, 6.3]</pre><h3>step 4: plot a line chart in python using matplotlib</h3><p>for the final step, you may use the following codes below in order to plot the line chart in python.</p><pre>import matplotlib.pyplot as plt<br><br>year = [1920, 1930, 1940, 1950, 1960, 1970, 1980, 1990, 2000, 2010]<br>unemployment_rate = [9.8, 12, 8, 7.2, 6.9, 7, 6.5, 6.2, 5.5, 6.3]<br><br>plt.plot(year, unemployment_rate)<br>plt.xlabel(&#39;Year&#39;)<br>plt.ylabel(&#39;Unemployment Rate&#39;)<br>plt.title(&#39;Unemployment Rate over Time&#39;)<br>plt.grid(True)<br>plt.show()</pre><p>run the above code in python and you’ll get this line chart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*SnzsSX2ni8f8rwz1K2bhEw.png" /><figcaption>Line chart</figcaption></figure><p>So far, you have seen how to create your line chart, let’s move on.</p><h3><strong>Bar chart</strong></h3><p>When you have categorical data, you can represent it with Bar graph. A bar graph or bar chart plots data with the help of bars. Which represent value on the y-axis and category on the x-axis. Bar chart use bars with varying heights to show the data which belongs to a specific category.</p><p>Again, you’ll see how to plot a Bar chart in python using matplotlib.</p><h3>Step 1: install the matplotlib package</h3><p>For pip:</p><pre>pip install matplotlib</pre><p>For conda:</p><pre>Conda install matplotlib</pre><h3>Step 2: getting data for the Bar chart</h3><p>In this data we have three variables: Years, Apples</p><p>and Oranges</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*PYjmQo_EWvblXFZGALLfHA.jpeg" /><figcaption>Dataset</figcaption></figure><p>The ultimate goal is to depict the above data using a Bar chart.</p><h3>Step 3: Capture the data in python</h3><p>After we import the library using</p><pre>import matplotlib.pyplot as plt</pre><p>Then capture the above data set in python. You can capture this dataset using lists.</p><pre>years = range(2000, 2006)<br>apples = [0.35, 0.6, 0.9, 0.8, 0.65, 0.8]<br>oranges = [0.4, 0.8, 0.9, 0.7, 0.6, 0.8]</pre><h3>Step 4: Create the bar chart in python using matplotlib</h3><pre>years = range(2000, 2006)<br>apples = [0.35, 0.6, 0.9, 0.8, 0.65, 0.8]<br>oranges = [0.4, 0.8, 0.9, 0.7, 0.6, 0.8]<br><br>plt.bar(years, oranges)<br>plt.xlabel(&#39;year&#39;)<br>plt.ylabel(&#39;Yield (tons per hectare)&#39;)<br>plt.title(&#39;Crop yeild in kano state&#39;)<br>plt.grid(True)</pre><p>This is our output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*h6z3XTyRTutMBRNzx46oBA.png" /><figcaption>Bar Chart</figcaption></figure><p>We can also stack bars on top of each other. Let’s plot the data for Apples and Oranges.</p><pre>years = range(2000, 2006)<br>apples = [0.35, 0.6, 0.9, 0.8, 0.65, 0.8]<br>oranges = [0.4, 0.8, 0.9, 0.7, 0.6, 0.8]<br><br>plt.bar(years, oranges)<br>plt.xlabel(&#39;year&#39;)<br>plt.ylabel(&#39;Yield (tons per hectare)&#39;)<br>plt.title(&#39;Crop yeild in kano state&#39;)<br>plt.grid(True)<br><br>plt.bar(years, apples)<br>plt.bar(years, oranges, bottom=apples)</pre><p>The result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*1sVoVRLkfiujGjfEK0liNQ.png" /><figcaption>Bar Chart</figcaption></figure><p>This is what we get. Let’s move to the last example.</p><h3><strong>Scatter plot</strong></h3><p>Scatter plots are used when we have to plot two or more variables present at different coordinates. The data is scattered all over the graph and is not confined to a range. Two or more variables are plotted in a Scatter plot, with each variable being represented by a different color. Let’s use below dataset to plot a Scatter plot.</p><h3>Step 1: install the matplotlib package</h3><p>For pip:</p><pre>Pip install matplotlib</pre><p>For Conda:</p><pre>Conda install matplotlib</pre><h3>Step 2: getting data for the Scatter plot</h3><p>After install the package the next, gather the data for your Scatter plot.</p><p>For example, let’s use the following data about two variables: unemployment_rate and index_price.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*CvXpf1F9Yeyax56HPyy1ew.jpeg" /><figcaption>Dataset</figcaption></figure><p>Our goal is to depict the relationship between the unemployment_rate and the index_price.</p><h3>Step 3: Capture the data in python</h3><p>After we import the library using</p><pre>import matplotlib.pyplot as plt</pre><p>Then capture the above data set in python. You can capture this dataset using lists.</p><pre>unemployment_rate = [6.1, 5.8, 5.7, 5.7, 5.8, 5.6, 5.5, 5.3, 5.2]<br>index_price = [1500, 1520, 1525, 1523, 1515, 1540, 1545, 1560, 1555]</pre><h3>Step 4: Create the Scatter plot in python using matplotlib.</h3><pre>unemployment_rate = [6.1, 5.8, 5.7, 5.7, 5.8, 5.6, 5.5, 5.3, 5.2]<br>index_price = [1500, 1520, 1525, 1523, 1515, 1540, 1545, 1560, 1555]<br><br>plt.scatter(unemployment_rate, index_price)<br>plt.title(&#39;unemployment rate Vs index price in kano&#39;)<br>plt.xlabel(&#39;unemployment rate&#39;)<br>plt.ylabel(&#39;index price&#39;)<br>plt.show()</pre><p>Well output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*k1-rXXV2uJZe33Hj93jqLw.png" /><figcaption>Scatter plot</figcaption></figure><p>So this is our Scatter plot, you can put Grid lines for better understanding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*A7kwYw65DghdiviH6ecMlw.png" /><figcaption>Scatter plot with grid lines</figcaption></figure><h3><strong>Conclusion</strong></h3><p>In this article, Data Visualization in Python, we gave an overview of data visualization in python and discussed how to create Line chart, Bar chart and Scatter plot using Matplotlib.</p><p>If you need any further clarification or want to learn more about data visualization in python and want to understand how to perform data visualization, share your queries with us by mentioning them in this page’s comment section or send direct mail to <a href="/service/mailto:abubakarsalisulabaran@gmail.com">abubakarsalisulabaran@gmail.com</a>.</p><p><strong>Abubakar Labaran Salisu</strong></p><p>Arewa Data Science Academy</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=580c695e790a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>