<?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 Faridah Yusuf on Medium]]></title>
        <description><![CDATA[Stories by Faridah Yusuf on Medium]]></description>
        <link>https://medium.com/@waziriphareeyda?source=rss-ed9daf51a93d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*sQarjLyUaHOhwpsJMKig4g.jpeg</url>
            <title>Stories by Faridah Yusuf on Medium</title>
            <link>https://medium.com/@waziriphareeyda?source=rss-ed9daf51a93d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 12:53:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@waziriphareeyda/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[Reinforcement Learning: The Key to Solving Complex Problems]]></title>
            <link>https://medium.com/@waziriphareeyda/reinforcement-learning-the-key-to-solving-complex-problems-a8efda2228e4?source=rss-ed9daf51a93d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a8efda2228e4</guid>
            <dc:creator><![CDATA[Faridah Yusuf]]></dc:creator>
            <pubDate>Sun, 16 Jul 2023 23:36:14 GMT</pubDate>
            <atom:updated>2023-07-16T23:36:14.886Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/323/0*_X3cZPAJEo1DzEuK" /></figure><p><em>In this blog post, we will explore the basics of reinforcement learning and see how it can be used to solve complex problems. We will also discuss some of the challenges of reinforcement learning and how they can be overcome.</em></p><h4><strong>What is Reinforcement Learning?</strong></h4><p>Reinforcement learning is a type of machine learning that is based on the principle of trial and error. The agent is given a reward for taking actions that lead to a desired outcome, and a penalty for taking actions that lead to an undesired outcome. The agent learns to take actions that maximize the reward over time. This makes it a powerful tool for solving complex problems, such as Self-driving cars, Robotics, Finance.</p><p>For example, a self-driving car might be rewarded for staying in its lane, avoiding collisions, and arriving at its destination on time. The car learns to take these actions by trial and error. It starts by taking random actions, and it gradually learns which actions lead to the best rewards.</p><h4><strong>How Does Reinforcement Learning Work?</strong></h4><p>Reinforcement learning works by following a simple loop:</p><ol><li>The agent takes an action.</li><li>The environment responds to the action.</li><li>The agent receives a reward or penalty.</li><li>The agent updates its policy based on the reward or penalty.</li></ol><p>The policy is a set of rules that the agent uses to decide which action to take in a given situation. The policy is updated over time as the agent learns which actions lead to the best rewards.</p><h4>Reinforcement Learning for Complex Problems</h4><p>Reinforcement learning is a powerful tool for solving complex problems because it allows the agent to learn from its own experience. This is in contrast to supervised learning, where the agent is given a set of labeled data to learn from.</p><p>In supervised learning, the agent is only able to learn from the data that it is given. This can be a limitation for complex problems, where the agent may not be able to learn from the data that is available.</p><p>Reinforcement learning, on the other hand, allows the agent to learn from any experience that it has. This means that the agent can learn from its own mistakes and successes. This makes reinforcement learning a powerful tool for solving complex problems.</p><h4><strong>What are the challenges of reinforcement learning?</strong></h4><p>Reinforcement learning also has some challenges, such as:</p><ol><li>The need for a large amount of data</li></ol><p>Reinforcement learning requires a large amount of data to learn from. This can be a challenge for problems where it is difficult to collect data.</p><p>2. The difficulty of designing the reward function</p><p>The reward function is a critical component of reinforcement learning. It determines which actions the agent will be rewarded for taking. Designing a good reward function can be a challenging task.</p><p>3. The possibility of getting stuck in local minima</p><p>Reinforcement learning can get stuck in local minima, where the agent keeps taking the same actions even though they are not leading to the best rewards. This can be a challenge to overcome.</p><h4><strong>What are the benefits of reinforcement learning?</strong></h4><p>Reinforcement learning also has some challenges, such as:</p><ol><li>The ability to learn from experience.</li></ol><p>Reinforcement learning allows the agent to learn from its own experience, without the need for human intervention. This makes it a powerful tool for solving problems that are too complex or difficult to be solved with traditional machine learning techniques.</p><p>2. The ability to adapt to changing environments</p><p>Reinforcement learning allows the agent to adapt to changes in the environment. This is important for problems that are dynamic and unpredictable.</p><p>3. The ability to make decisions in real time</p><p>Reinforcement learning allows the agent to make decisions in real time. This is essential for problems that require the agent to react quickly to changes in the environment.</p><h4><strong>Conclusion</strong></h4><p>Despite the challenges, reinforcement learning is a powerful tool that has the potential to solve complex problems. As research in reinforcement learning continues, we can expect to see this technology being used to solve even more challenging problems in the future. So, what are you waiting for? Start learning about reinforcement learning today and see how it can help you solve your complex problems.</p><p><em>Thanks for reading and happy learning.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8efda2228e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Time Series: The Next Big Thing in Data Science]]></title>
            <link>https://medium.com/@waziriphareeyda/time-series-the-next-big-thing-in-data-science-2d9354f0935c?source=rss-ed9daf51a93d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d9354f0935c</guid>
            <dc:creator><![CDATA[Faridah Yusuf]]></dc:creator>
            <pubDate>Thu, 06 Jul 2023 14:47:21 GMT</pubDate>
            <atom:updated>2023-07-06T14:47:21.367Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/474/0*QzG8OcMXIt_TZ7HR" /></figure><p>Time series analysis is a field of statistics that deals with the analysis of data that is collected over time, such as trends, patterns, anomalies, seasonality, cycles, and forecasting. it can help us understand the past behavior and future outcomes of a system, and make informed decisions based on data. In recent years, time series analysis has become increasingly important in data science, as more and more data are being collected and stored.</p><p>Time series analysis is not a new field, but it has gained a lot of popularity and importance in recent years, thanks to the availability of large-scale and high-frequency data, the advances in computational power and algorithms, and the increasing demand for data-driven solutions in various domains.</p><p>There are a number of reasons why time series analysis is becoming the next big thing in data science. First, the amount of time series data that is being collected is growing exponentially. This is due to the increasing availability of sensors and other devices that can collect data in real time. Second, the development of new machine learning algorithms has made it possible to analyze time series data more effectively. These algorithms can identify patterns and trends in data that would be difficult to see with traditional statistical methods.</p><p>As a result of these factors, time series analysis is being used in a wide range of applications, including:</p><h4><strong>Finance</strong></h4><p>Time series analysis can help investors and traders to analyze the performance and risk of financial assets, such as stocks, bonds, currencies, commodities, and derivatives. It can also help to identify arbitrage opportunities, optimize portfolio allocation, and forecast market movements.</p><h4><strong>Healthcare</strong></h4><p>Time series analysis can help healthcare professionals and researchers to monitor and diagnose the health status of patients, such as blood pressure, glucose level, heart rate variability, EEG signals, and ECG signals. It can also help to predict the onset and progression of diseases, such as COVID-19, diabetes, cancer, and Alzheimer’s.</p><h4>Economics</h4><p>Time series analysis can help economists and policymakers to monitor and forecast macroeconomic indicators, such as GDP, inflation, unemployment, interest rates, exchange rates, and trade balance. It can also help to evaluate the impact of fiscal and monetary policies, and test economic theories and hypotheses.</p><h4><strong>Engineering</strong></h4><p>Time series analysis can help engineers and scientists to design and control complex systems, such as power grids, communication networks, transportation systems, robots, satellites, and rockets. It can also help to detect and prevent faults, failures, and anomalies in these systems.</p><h4><strong>Environment</strong></h4><p>Time series analysis can help environmentalists and climatologists to study and forecast the changes in the natural phenomena, such as temperature, precipitation, sea level, air quality, solar radiation, and greenhouse gas emissions. It can also help to assess the impact of human activities on the environment.</p><h4><strong>Business</strong></h4><p>Time series analysis can help businesses to optimize their operations and strategies, such as inventory management, demand forecasting, pricing, marketing, customer segmentation, churn prediction, and revenue optimization.</p><h4><strong>Weather forecasting</strong></h4><p>Time series analysis is used to predict weather patterns, such as temperature, precipitation, and wind speed.</p><h4><strong>Traffic forecasting</strong></h4><p>Time series analysis is used to predict traffic patterns, such as congestion levels and travel times.</p><h4><strong>Demand forecasting</strong></h4><p>Time series analysis is used to predict demand for products and services.</p><h4><strong>Fraud detection</strong></h4><p>Time series analysis can be used to detect fraudulent activity, such as credit card fraud and insurance fraud.</p><h4><strong>Risk assessment</strong></h4><p>Time series analysis can be used to assess risk, such as the risk of a company going bankrupt or the risk of a natural disaster.</p><h4><strong>Conclusion</strong></h4><p>Time series analysis is the next big thing in data science. With the ever-growing amount of time series data being collected, and the development of new machine learning algorithms, time series analysis is becoming increasingly important for businesses and organizations of all sizes. If you are interested in data science, then time series analysis is a skill that you should definitely learn. It is a powerful tool that can be used to make predictions, improve decision-making, and solve a variety of problems.</p><p><em>Thanks for reading.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d9354f0935c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 USes of NLTK in Sentiment Analysis
What is NLTK]]></title>
            <link>https://medium.com/@waziriphareeyda/10-uses-of-nltk-in-sentiment-analysis-what-is-nltk-7f292a621aef?source=rss-ed9daf51a93d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f292a621aef</guid>
            <dc:creator><![CDATA[Faridah Yusuf]]></dc:creator>
            <pubDate>Sun, 25 Jun 2023 19:26:01 GMT</pubDate>
            <atom:updated>2023-06-25T19:26:01.848Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/311/1*5oo32nF786pmqw0jvxAh7Q.jpeg" /></figure><p>NLTK stands for Natural Language Toolkit. It is a free, open-source, Python library for natural language processing (NLP). NLTK provides a wide range of NLP-related libraries and resources, including tools for sentiment analysis.</p><h4><strong>What is Sentiment Analysis</strong></h4><p>Sentiment analysis is the task of determining the emotional state of a speaker or writer. It is a valuable tool for a variety of applications, such as customer service, social media monitoring, and product development.</p><h4>Uses of NLTK</h4><h4>1. Tokenization</h4><p>This is the process of breaking text down into smaller units, such as words, phrases, or sentences. This is a necessary first step for any sentiment analysis task, as it allows the computer to understand the structure of the text.</p><h4>2. Part-of-speech tagging</h4><p>This is the process of assigning a part-of-speech tag to each token in a text. This helps the computer to understand the grammatical relationships between words.</p><h4>3. Stemming</h4><p>This is the process of reducing inflected words to their root form. This helps to improve the accuracy of sentiment analysis, as it can be difficult to distinguish between words with different meanings that have the same stem.</p><p>4. Lemmatization<br> This is a more sophisticated form of stemming that takes into account the context of a word. This can further improve the accuracy of sentiment analysis.</p><h4>5. Named entity recognition</h4><p>This is the process of identifying named entities in a text, such as people, organizations, and places. This can be useful for sentiment analysis, as it can help to identify the target of the sentiment.</p><h4>6. Sentiment lexicons</h4><p>These are lists of words that have been associated with positive, negative, or neutral sentiment. These can be used to automatically determine the sentiment of a text.</p><h4>7. Machine learning</h4><p>This can be used to train a model to automatically determine the sentiment of a text. This is often more accurate than using sentiment lexicons alone.</p><h4>8. Rule-based systems</h4><p>These are systems that use a set of rules to determine the sentiment of a text. These can be less accurate than machine learning systems, but they are often faster and easier to implement.</p><h4>9. Real-time sentiment analysis</h4><p>This is the ability to analyze sentiment in real time, as new text is being produced. This is useful for applications such as social media monitoring and customer service.</p><h4>10. Multilingual sentiment analysis</h4><p>This is the ability to analyze sentiment in multiple languages. This is becoming increasingly important as the amount of online text in non-English language grows.</p><h4>Conclusion</h4><p>NLTK is a versatile tool that can be used for a variety of sentiment analysis tasks. Whether you’re interested in identifying positive, negative, or neutral sentiment, measuring the intensity of sentiment, or identifying sentiment-bearing words and phrases, NLTK can help. With NLTK, you can also develop sentiment analysis applications that can be used to track sentiment over time, compare sentiment across different groups of people, and identify sentiment in social media data.</p><p><em>Thanks for reading</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f292a621aef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Experience Trying to Confuse a Bot]]></title>
            <link>https://medium.com/@waziriphareeyda/my-experience-trying-to-confuse-a-bot-8d27b82c603e?source=rss-ed9daf51a93d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d27b82c603e</guid>
            <dc:creator><![CDATA[Faridah Yusuf]]></dc:creator>
            <pubDate>Thu, 15 Jun 2023 19:54:21 GMT</pubDate>
            <atom:updated>2023-06-15T19:54:21.784Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KlqYYoxIUrVaTiBP" /><figcaption>Photo by <a href="https://unsplash.com/@neonbrand?utm_source=medium&amp;utm_medium=referral">Kenny Eliason</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In this blog post, I will share my experience trying to confuse a bot.</p><p>Bots are everywhere these days. They can be found on websites, in banking applications, and even on the phone. As artificial intelligence (AI) continues to develop, bots are becoming more and more sophisticated. But even the most advanced bots can be confused.</p><h4><strong>Adopting a bot</strong></h4><p>I decided to adopt a bot from the website of a Bank. The bot’s name was “Ziva,” and it was designed to help customers with a variety of tasks, such as checking account balances, transferring money, and setting up bill pay.</p><p>I started by asking Ziva a few simple questions about my account. It was able to answer these questions correctly, and it even offered to help me with some more complex tasks. For example, I asked Ziva to check my account number and my balance. Ziva was able to do this without any problems.</p><h4><strong>Trying to confuse the bot.</strong></h4><p>After I was satisfied that Ziva was working properly, I decided to try to confuse it. I started by asking it questions that were outside of its normal range of expertise. For example, I asked Ziva what it thought about the latest political news. Ziva was unable to answer this question, and it simply told me that it was not programmed to discuss politics.</p><p>then i tried to confuse Ziva by asking it open-ended or hypothetical questions. For example, I asked what it would do if it could swim. Ziva was unable to answer this question, and it simply told me that it was not programmed to think about hypothetical situations.</p><h4><strong>Why I was able to confuse the bot.</strong></h4><p>I was able to confuse Ziva because it is a large language model, not a human being. Large language models are trained on massive datasets of text and code, but they do not have the same understanding of the world as humans do. They can only answer questions that they have been explicitly programmed to answer, and they cannot think about hypothetical situations.</p><h4><strong>Conclusion</strong></h4><p>My experience of adopting a bot and trying to confuse it taught me a few things about large language models:</p><ol><li>they are very powerful tools that can be used to automate a variety of tasks.</li><li>they are not perfect, and they can be confused by questions that are outside of their normal range of expertise.</li><li>they are still under development, and they are likely to become more sophisticated and capable in the future.</li></ol><p><em>Thanks for reading.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d27b82c603e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Difference between K means and Hierarchical Clustering]]></title>
            <link>https://medium.com/@waziriphareeyda/difference-between-k-means-and-hierarchical-clustering-edfec55a34f8?source=rss-ed9daf51a93d------2</link>
            <guid isPermaLink="false">https://medium.com/p/edfec55a34f8</guid>
            <dc:creator><![CDATA[Faridah Yusuf]]></dc:creator>
            <pubDate>Thu, 01 Jun 2023 13:57:15 GMT</pubDate>
            <atom:updated>2023-06-01T13:57:15.442Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/638/0*G1N4dzkweANLGh66.png" /></figure><blockquote>In this article we are going to be looking at the differences between k-means clustering and hierarchical clustering.</blockquote><h3><strong>What is K-means Clustering?</strong></h3><p><em>K-means clustering is a simple and widely used unsupervised machine learning algorithm that iteratively groups a collection of data points into a fixed number of clusters (k) according to their similarity. The algorithm aims to reduce the distance between each data point and its corresponding cluster center, also called the centroid. The algorithm terminates when either the centroids remain stable, or a maximum number of iterations is achieved. K-means clustering has various applications, such as data analysis, image segmentation, anomaly detection, etc.</em></p><h3><strong>What is Hierarchical Clustering?</strong></h3><p><em>Hierarchical clustering is a type of unsupervised machine learning algorithm that organizes data points into a hierarchy of clusters based on their similarity or distance. It is also called hierarchical cluster analysis or HCA. Hierarchical clustering has two variants: agglomerative and divisive.</em></p><p><strong><em>Agglomerative clustering:</em></strong><em> begins with each data point as a separate cluster and then combines the nearest clusters until there is only one cluster left.</em></p><p><strong><em>Divisive clustering: </em></strong><em>begins with all data points in a single cluster and then divides the cluster repeatedly until each data point has its own cluster.</em></p><p><em>Hierarchical clustering can be represented by a dendrogram, which is a graph that illustrates the nested arrangement of clusters and their distances. Hierarchical clustering has various uses, such as finding patterns, discovering hierarchies, or detecting outliers in data.</em></p><h3><strong>Differences Between K-Means Clustering and Hierarchical Clustering.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2EvKLztx03IB-y8oWXbMLw.jpeg" /></figure><p><strong><em>Conclusion</em></strong></p><p><em>In this blog post, we have explored the difference between k-means clustering and hierarchical clustering, two popular methods for finding groups of similar data points. We have seen that k-means clustering is faster and simpler, but requires choosing the number of clusters beforehand and may not capture complex structures. On the other hand, hierarchical clustering is more flexible and intuitive, but can be computationally expensive and sensitive to outliers. Depending on your data and your goals, you may prefer one method over the other, or even combine them in a hybrid approach. The choice is yours! I hope you enjoyed this blog post and learned something new.</em></p><p><em>Thanks for reading.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=edfec55a34f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Classification Algorithms in machine learning.]]></title>
            <link>https://medium.com/@waziriphareeyda/classification-algorithms-in-machine-learning-4e37bef1c1cd?source=rss-ed9daf51a93d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e37bef1c1cd</guid>
            <dc:creator><![CDATA[Faridah Yusuf]]></dc:creator>
            <pubDate>Sat, 27 May 2023 21:22:25 GMT</pubDate>
            <atom:updated>2023-05-27T21:24:51.776Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R0GtIkvPCuNDkyMwX5VMEg.png" /></figure><p>The goal of classification algorithms in machine learning is to use labeled data to train a model that can assign a category to new data based on its features. There is a variety of algorithms that can perform classification, such as logistic regression, decision tree, random forest, support vector clustering, k nearest Neighbour, and naive bayes. Depending on the problem and the data set, some algorithms may be more suitable than others.</p><h3>Types of Classification Algorithms</h3><h3>1. <strong>Logistic regression:</strong></h3><p>Logistic regression is a supervised learning technique used to predict the probability of a binary outcome. It can be used to classify data into one of two categories, such as success or failure, represented by 1 or 0 respectively. This technique is most effective when predicting a dependent variable that is categorical in nature. For example, it can be used to determine if an email is spam or not.</p><h4><strong>How It Performs Classification</strong></h4><p>logistic regression is a statistical method that models the probability of a binary outcome by transforming the linear regression function’s continuous value output into a categorical value output using a sigmoid function. The logistic regression model computes a weighted sum of the input features and calculates the logistic of the result. The weights, or coefficients, in this model are commonly estimated via maximum likelihood estimation (MLE). Once the optimal coefficients are found, the conditional probabilities for each observation can be calculated to yield a predicted probability. For binary classification, a probability less than 0.5 will predict 0 while a probability greater than 0.5 will predict 1.</p><h4><strong>Advantages</strong></h4><p>. It is simple, efficient and versatile.</p><p>. Easy to implement and does not require a lot of computation or training time.</p><p>. It can handle missing data well and is fast and scalable, making it suitable for real time predictions.</p><h4><strong>Disadvantages</strong></h4><p>. It may lead to overfitting if the number of observations is lesser than the number of features.</p><p>. It requires average or no multicollinearity between independent variables.</p><h4><strong>Common Applications</strong></h4><p>. It can be used to identify data anomalies that are predictive of fraud.</p><p>. In medicine this analytics approach can be used to predict the likelihood of disease or illness for a given population.</p><p>. It can also be used for churn prediction.</p><h3><strong>2. Naive Bayes:</strong></h3><p>Naive Bayes classifiers are a group of classification algorithms that are based on Bayes’ Theorem. They are not a single algorithm, but rather a family of algorithms that share the common principle that every pair of features being classified is independent of each other. This means that the presence of one feature in a class does not affect the presence of any other feature. Naive Bayes classifiers are commonly used for text classification tasks.</p><h4><strong>How it performs classification</strong></h4><p>Naive Bayes performs classification by separating data into different classes according to Bayes Theorem, along with the assumption that all the predictors are independent of one another. For example, let’s say we want to classify a fruit as an orange. We might consider features such as shape, color, and size. A Naive Bayes classifier would calculate the probability of the fruit being an orange based on each of these features independently. if the probabilities calculated for each feature suggest that the fruit is an orange, then the classifier would classify it as such.</p><h4><strong>Advantages</strong></h4><p>. It fast and efficient, making it suitable for real-time predictions.</p><p>. It can be used to determine whether an email is spam or not.</p><p>. Its effectiveness in solving multi-class problems hence making it perfect for performing sentiment analysis.</p><p>. It can be used for credit scoring and medical data classification.</p><h4><strong>Disadvantages</strong></h4><p>. Has difficulty handling missing data.</p><p>. It ignores the possible correlation between features. It implies that the occurrence of one feature in a class does not influence the occurrence of any other feature.</p><h4><strong>Common applications</strong></h4><ul><li>Spam filtering: it can be used to identify whether an email is spam or not based on the words and other features in the email.</li><li>Sentiment analysis: it can be used to determine the sentiment or emotion of a text, such as a review or a tweet, based on the words and other features in the text.</li><li>Document classification: it can be used to categorize documents into different topics or genres based on the words and other features in the documents.</li><li>Image recognition: it can be used to recognize objects or faces in images based on the pixels and other features in the images.</li></ul><h3><strong>3. K-Nearest Neighbor (KNN):</strong></h3><p>The k-nearest neighbors or k-NN is a type of supervised learning algorithm that does not rely on any parameters, but rather on the distance between data points to classify or predict their labels. It can handle both regression and classification problems. It is mainly used as a classification algorithm, based on the idea that similar points tend to be close to each other. It has various applications such as recommending items, recognizing patterns, mining data, forecasting financial markets, detecting intrusions, and more.</p><h4><strong>How it performs classification?</strong></h4><p>KNN performs classification by comparing a new data entry to the values in a given dataset with different classes or categories. Based on its closeness or similarities in a given range (K) of neighbors, the algorithm assigns the new data to a class or category in the dataset. The algorithm can be considered a voting system, where the majority class label determines the class label of a new data point among its nearest ‘k’ (where k is an integer) neighbors in the feature space.</p><p>Let’s break that down into steps:</p><ol><li>Assign a value to K.</li><li>Calculate the distance between the new data entry and all other existing data entries.</li><li>Find the K nearest neighbors to the new entry based on the calculated distances.</li><li>Assign the new data entry to the majority class in the nearest neighbors.</li></ol><h4><strong>Advantages</strong></h4><p>. There is no training period required.</p><p>. New data can be added seamlessly without impacting the accuracy of the algorithm.</p><p>. it is also very easy to implement, with only two parameters required: the value of K and the distance function.</p><h4><strong>Disadvantages</strong></h4><p>. It does not work well with large datasets, as the cost of calculating the distance between the new point and each existing point becomes huge, degrading the performance of the algorithm.</p><p>. It also does not work well with high dimensions, as it becomes difficult for the algorithm to calculate the distance in each dimension.</p><p>. Feature scaling is required before applying KNN to any dataset, otherwise it may generate wrong predictions.</p><p>. KNN is also sensitive to noise in the dataset.</p><h4><strong>Common Applications</strong></h4><p>. It is popular in many fields, including computer vision, where it performs classification tasks and handles image data well.</p><p>. It is also great for content recommendation and is used in many recommendation system engines.</p><p>. KNN can be used for text mining, agriculture, finance and medical data classification.</p><h3><strong>4. Decision Tree:</strong></h3><p>A Decision Tree Classifier is a non-parametric supervised learning method used for classification. It creates a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. One popular implementation of this algorithm is available in the scikit-learn library as sklearn.tree.DecisionTreeClassifier.</p><h4><strong>How it performs classification</strong></h4><p>A decision tree classifier works like a flowchart. It starts at the root node with a specific question of data, that leads to branches that hold potential answers. The branches then lead to decision (internal) nodes, which ask more questions that lead to more outcomes. This goes on until the data reaches what’s called a terminal (or “leaf”) node and ends.</p><h4><strong>Advantages</strong></h4><ul><li>They are easy to understand and interpret.</li><li>They can handle both numerical and categorical data, and do not require much preprocessing or scaling.</li><li>They can capture non-linear relationships and interactions among the features and perform well on both large and small datasets.</li></ul><h4><strong>Disadvantages</strong></h4><ul><li>They can create over-complex trees that do not generalize the data well. This is called overfitting.</li><li>They can be unstable because small variations in the data might result in a completely different tree being generated.</li><li>Predictions of decision trees are neither smooth nor continuous, but piecewise constant approximations.</li></ul><h3><strong>5. Random Forest</strong></h3><p>Random Forest is a type of ensemble learning algorithm that uses many decision trees to train and predict. For classification problems, the random forest chooses the class that most trees agree on. It is a popular machine learning algorithm that can handle both classification and regression problems. It is easy to use and flexible, as it can deal with different types of data.</p><h4><strong>How it performs classification</strong></h4><p>When using Random Forest for classification, each tree gives a classification or a vote. The forest chooses the classification with the majority of the votes. A random forest — as the name suggests — consists of multiple decision trees each of which outputs a prediction. When performing a classification task, each decision tree in the random forest votes for one of the classes to which the input belongs.</p><h4><strong>Advantages</strong></h4><p><strong>. It</strong> works well with both categorical and numerical data.<br>• No scaling or transformation of variables is usually necessary.<br>• It reduces overfitting in decision trees and helps to improve the accuracy.<br>• It is a robust algorithm that can handle noisy data and outliers.</p><h4><strong>Disadvantages</strong></h4><ul><li>It can be computationally expensive and slow to train on large datasets.</li><li>It may not perform as well on high-dimensional sparse data, such as text data.</li><li>The model can be difficult to interpret compared to a single decision tree.</li></ul><h4><strong>Common Applications</strong></h4><p>. It can be applied to any data set with multi-dimensions, so it is a popular choice when it comes to identifying customer loyalty in Retail.</p><p>. It is used in predicting stock prices in Finance.</p><p>. Used in recommending products to customers.</p><h3><strong>6. Support Vector Machine</strong></h3><p>Support Vector Machine (SVM) is a type of supervised learning algorithm that can perform both classification and regression tasks. It is a machine learning model that uses learning algorithms to analyze data and find patterns for classification and regression problems.</p><h4><strong>How it performs classification</strong></h4><p>A Support Vector Machine (SVM) works by finding an optimal boundary, or hyperplane, between data points in a given dataset and different classes. It uses the input data points or features called support vectors to maximize the decision boundaries i.e., the space around the hyperplane.</p><h4><strong>Advantages</strong></h4><ul><li>They handle high dimensional data well.</li><li>They are effective in cases where the number of dimensions is greater than the number of samples.</li></ul><h4><strong>Disadvantages</strong></h4><ul><li>They can be sensitive to the choice of kernel function and its parameters.</li><li>They do not directly provide probability estimates.</li><li>They can be computationally expensive for large datasets.</li></ul><h4><strong>Common Applications</strong></h4><p>• Face detection: SVMs classify parts of the image as a face and non-face and create a square boundary around the face.<br>• Text and hypertext categorization: SVMs allow Text and hypertext categorization for both inductive and transudative models. They use training data to classify documents into different categories.</p><h3><strong>conclusion</strong></h3><p>classification is a powerful technique that allows machines to learn from data and make predictions based on patterns and features. Classification algorithms can be used for various applications, such as spam detection, sentiment analysis, image recognition, and more. In this blog post, we have introduced some of the most common types of classification algorithms, such as logistic regression, k-nearest neighbors, decision trees, support vector machines, and random forest. We have also discussed their advantages and disadvantages, and how to choose the best algorithm for a given problem. We hope this blog post has given you a better understanding of classification algorithm in machine learning and inspired you to explore more of this fascinating topic.</p><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e37bef1c1cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring the Use of Regression Models in Machine Learning”]]></title>
            <link>https://medium.com/@waziriphareeyda/exploring-the-use-of-regression-models-in-machine-learning-f05b3d06d7ca?source=rss-ed9daf51a93d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f05b3d06d7ca</guid>
            <dc:creator><![CDATA[Faridah Yusuf]]></dc:creator>
            <pubDate>Sun, 21 May 2023 21:58:07 GMT</pubDate>
            <atom:updated>2023-05-21T21:58:07.204Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*109ZwtNYnWPxKu7S" /><figcaption>Photo by <a href="https://unsplash.com/es/@markusspiske?utm_source=medium&amp;utm_medium=referral">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Machine learning is a powerful tool that allows us to make predictions and decisions based on data. One of the key techniques used in machine learning is regression modelling. In this post, we’ll explore the use of regression models in machine learning and how they can help us make better predictions.</p><h3><strong>What is regression?</strong></h3><p>Regression is a statistical method that allows us to model the relationship between a dependent variable and one or more independent variables. it is also used to identify patterns and relationships within a dataset, which can then be applied to new and unseen data. This makes regression a key element of machine learning in finance and is often leveraged to help forecast portfolio performance or stock costs and trends. Models can be trained to understand the relationship between a variety of diverse features and a desired outcome. In machine learning, we often use regression models to predict a continuous outcome, such as the price of a house or the likelihood of a customer making a purchase.</p><p>There are many different types of regression models, including linear regression, logistic regression, and polynomial regression. Each type of model has its own strengths and weaknesses, and the choice of model will depend on the specific problem at hand.</p><p>One of the key benefits of using regression models in machine learning is their interpretability. Unlike some other machine learning techniques, such as neural networks, regression models are relatively easy to understand and interpret. This makes them a popular choice for applications where it’s important to be able to explain how a prediction was made.</p><p>In practice, a model will be trained on labelled data to understand the relationship between data features and the dependent variable. By estimating this relationship, the model can predict the outcome of new and unseen data. This could be used to predict missing historic data and estimate future outcomes too. In a sales environment, an organization could use regression machine learning to predict the next month’s sales from a number of factors. In a medical environment, an organization could forecast health trends in the general population over a period of time.</p><h3>What are the types of regression?</h3><p>Machine learning regression can be achieved using a variety of popular algorithms and techniques. These methods may vary in the number of independent variables they use or the type of data they process. Additionally, different regression models may assume different relationships between the independent and dependent variables. For instance, linear regression assumes a linear relationship between the variables and may not be effective for datasets with non-linear relationships.”</p><p>Some of the most common regression techniques in machine learning can be grouped into the following types of regression analysis:</p><ul><li>Simple Linear Regression</li><li>Multiple linear regression</li><li>Logistic regression</li></ul><h3>What is simple linear regression?</h3><p>Simple linear regression is used to estimate the relationship between two quantitative variables. it is a type of regression where we have only on independent variable to predict the dependent variable. The relationship is assumed to be linear in this case. It is one of the most simple and basic types of machine learning regression. outliers may be a common occurrence in simple linear regression because of the straight line of best fit.</p><h3><strong>Some common applications of simple linear regression include:</strong></h3><ul><li>Estimating the strength of the relationship between two variables, such as the relationship between rainfall and soil erosion</li><li>Predicting the value of the dependent variable at a certain value of the independent variable, such as the amount of soil erosion at a certain level of rainfall</li><li>Analyzing dataset to establish the relationships between variables and output.</li></ul><h3>What is multiple linear regression?</h3><p>Multiple linear regression is used to estimate the relationship between two or more independent variables and one dependent variable. it is an extension of simple linear regression that allows us to model the relationship between multiple predictor variables and a response variable. It achieves a better fit in the comparison to simple linear regression when multiple independent variables are involved. The result when plotted on two dimensions would be a curved line fitted to the data points.</p><h3><strong>Some common applications of multiple linear regression include:</strong></h3><ul><li>Estimating the strength of the relationship between two or more independent variables and one dependent variable, such as how rainfall, temperature, and amount of fertilizer added affect crop growth.</li><li>Predicting the value of the dependent variable at a certain value of the independent variables, such as the expected yield of crop at certain levels of rainfall, temperature, and fertilizer addition</li></ul><h3>What is logistic regression?</h3><p>Logistic regression is a statistical method used to model the probability of a binary dependent variable. it is used when the response variable is categorical with two categories. A sigmoid curve can be used to map the relationship between the dependent variable and independent variables.</p><h3><strong>Some common applications of logistic regression include:</strong></h3><ul><li>Fraud detection: logistic regression models can help teams identify data anomalies, which are predictive of fraud.</li><li>Disease prediction: in medicine, it is used to predict the likelihood of disease or illness for a given population.</li><li>Binary classification problems: such as predicting whether an event will occur or not.</li></ul><h3><strong>What is polynomial regression.</strong></h3><p>Polynomial regression is used when the relationship between the predictor variables and the response variable is non-linear.</p><p>In simple linear regression, we assume that the relationship between the predictor and response variable is linear. However, in practice, the relationship between the two variables can actually be non-linear and attempting to use linear regression can result in a poorly fit model.</p><p>polynomial regression allows us to account for non-linear relationship between the predictor and response variable by including higher-degree terms in the model.</p><p>There are several ways to detect a non-linear relationship between the predictor and response variable. One way is to create a scatterplot of the response vs. predictor variable. if the scatterplot shows a non-linear pattern, then polynomial regression might be a good idea. Another way is to create a residual vs. fitted plot after fitting a simple linear regression model to the data. If the residuals display a non-linear pattern in the plot, then this is a sign that the relationship between the predictor and response is likely non-linear.</p><h3><strong>Application of regression in machine learning</strong></h3><p>There are many common applications of regression in machine learning. Some of these include:</p><ul><li>Forecasting continuous outcomes like house prices, stock prices, or sales</li><li>Predicting the success of future retail sales or marketing campaigns to ensure resources are used effectively.</li><li>Analyzing datasets to establish the relationship between variables and an output.</li><li>Predicting customer or user trends, such as on streaming services or e-commerce websites.</li><li>Creating time series visualizations.</li></ul><p>In conclusion, regression models are a powerful tool for making predictions in machine learning. By exploring the use of these models, we can gain a better understanding of the relationships between our data and make more accurate predictions.</p><p>Thanks for reading.</p><p>Reference</p><p><a href="https://www.seldon.io/machine-learning-regression-explained">Machine Learning Regression Explained — Seldon</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f05b3d06d7ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Proportion Matters: How to Use pie chart for visualization.]]></title>
            <link>https://medium.com/@waziriphareeyda/proportion-matters-how-to-use-pie-chart-for-visualization-621424c7ab00?source=rss-ed9daf51a93d------2</link>
            <guid isPermaLink="false">https://medium.com/p/621424c7ab00</guid>
            <dc:creator><![CDATA[Faridah Yusuf]]></dc:creator>
            <pubDate>Thu, 11 May 2023 21:22:21 GMT</pubDate>
            <atom:updated>2023-05-11T21:22:21.414Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QYCJBBU_rkO9mL--" /><figcaption>Photo by <a href="https://unsplash.com/@firmbee?utm_source=medium&amp;utm_medium=referral">Firmbee.com</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>What is a Pie Chart?</h3><p>A pie chart shows how much each part makes up of a whole. It looks like a circle that is cut into pieces, like a pie. Each piece stands for a different thing that is part of the whole. For example, you can use a pie chart to show how many people like different kinds of fruits. The circle is the total number of people, and the pieces are the number of people who like apples, bananas, oranges, etc. The bigger the piece, the more people like that fruit. You can also write the number or percentage of people on each piece to make it clearer. Pie charts are good for showing things like sales, surveys, or resources in a simple way.</p><h4><strong>Example</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*YuzwmBKRmt2_yxvPldwLzA.png" /></figure><p>The pie chart shows how people voted in a made-up city election. The first blue piece is for Reyes, who got almost half of the votes. The yellow piece is for Chu, who got about one out of three votes. The purple piece is for Williams, who got about one out of five votes. The numbers on the top right tell us the exact percentages, but the pie chart shows us the big picture of who got more or less votes.</p><h3>How to read a Pie Chart?</h3><p>To understand a pie chart, you must consider the area, arc length, and angle of every slice. Because it can be hard to compare the slices, meaningful organization is key. Slices in a pie chart should be organized in a coherent way, usually the biggest to smallest, to make it easier for the user to interpret. Start at the biggest piece and work your way down to the smallest to properly digest the data. The colors of the slices should match their respective blocks in the legend, so that viewers do not need to consult the legend as much.</p><h3>When to use a pie chart</h3><p>Pie charts are good for showing how parts make up a whole. You need a whole amount that can be split into different parts. You want to see how much each part adds to the whole, not how they compare to each other. If not, use a different chart.</p><p>There are two main types of data that can make up a whole and be split into categories. One type is when the whole is a total number. For example, how many votes each person got in an election, or how many times different users bought something (like guests, new users, or existing users).</p><p>Another type of data that can make up a whole and be split into categories is when the whole is a total value. For example, we might care more about the money from all the transactions than how many transactions there were. We can split this money by things like user type, age group, or place to see where the business makes more money.</p><h3>What type of analysis do Pie Charts support</h3><p>Pie charts should be used to show the relationship of different parts to the whole. They work best with dimensions that have a limited number of categories. If you need to emphasize that one section of the whole is overrepresented or underrepresented, a pie chart can make that story within the data stand out. Pie charts do not work well for comparing exact numbers</p><h3><strong>Tips for creating a good pie chart.</strong></h3><h4><strong>include annotations.</strong></h4><p>Write the numbers or percentages on the pie chart or next to it. Pie charts are hard to read because you can’t tell how big each piece is, unless it is half, a third, or a quarter. Also, if you want to show amounts instead of percentages, pie charts don’t have marks to show that. That’s why you need to write the numbers or percentages. You can use arrows or lines to connect them to the pieces.</p><h4><strong>Consider the order of slices.</strong></h4><p>A good order for slices can make it much easier for a reader to understand what the plot is saying. A typical ordering goes from the largest slice to the smallest slice, very useful when there are categories with very similar values. However, if the category levels have an inherent ordering, then plotting slices in that order is usually better.</p><p>As for choosing a start point, it’s a good idea to plot slices from a cardinally oriented direction. Visualization tools will usually start from the right or from the top. While starting from the right has a mathematical basis regarding conventions on measuring angles, starting from the top feels more intuitive, since it matches how we read from top to bottom, and how we think about progression of time on a clock or watch face.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*S2EZ-1LWZNiUuYZV0mOCeA.png" /></figure><h4><strong>Limit the number of pie slices.</strong></h4><p>Pie charts with a large number of slices can be difficult to read. It can be difficult to see the smallest slices, and it can be difficult to choose enough colors to make all of the slices distinct. Recommendations vary, but if you have more than about five categories, you might want to think about using a different chart type. As another option, you might consider lumping small slices into a single ‘other’ slice, colored in a neutral gray.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*NkuCuSkmurcL7cj-E9N76w.png" /></figure><h4><strong>Avoid distorting effects.</strong></h4><p>Reading a pie chart accurately requires that the slices’ areas, arc lengths, and angles all accurately represent the data. Avoiding 3D effects is important for any plot, but especially for pie charts. Squashing or stretching the circle or adding unnecessary depth can distort how large each slice compares to the whole. Another distortion can come from an ‘exploded’ pie chart, where slices are pulled out from the center for emphasis. This can make it more difficult to gauge the part-to-whole comparison.</p><h3>Pie Chart for Visual Analysis</h3><p>If you have a dimension with just a couple of categories to compare, then a pie chart can help display each value of a category within the whole. The chart should read as a comparison of each group to each other, forming a whole category. The “whole” could be anything so long as the category can be split into separate slices that are distinguishable from each other.</p><h3>Creating Pie Chart Using matplotlib</h3><p>Matplotlib has pie () function in its pyplot module which create a pie chart representing the data in an array.</p><h4><strong>Example</strong></h4><pre># Import libraries<br>from matplotlib import pyplot as plt<br>import numpy as np<br><br># Creating dataset<br>cars = [&#39;TOYOTA&#39;, &#39;HONDA&#39;, &#39;PEUGEOUT&#39;,<br>  &#39;VOLKSWAGEN&#39;, &#39;OPEL&#39;, &#39;BMW&#39;]<br><br>data = [23, 17, 35, 29, 12, 41]<br><br># Creating plot<br>fig = plt.figure(figsize =(10, 7))<br>plt.pie(data, labels = cars)<br><br># show plot<br>plt.show()</pre><h4><strong>Output</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*F1Hn29SxGAMqu-t3jh9qPQ.png" /></figure><h3><strong>How to Create Pie Chart from Pandas DataFrame using python</strong></h3><p>A pie chart is a circular graph that represents data. It is frequently used in research, engineering, and business. The segments of the pie depict the relative strength of the data and provide a graphical representation. A pie chart requires a list of categories and numerical variables. The term “pie” refers to the whole, while “slices” refers to the individual components. The pie is divided into segments and sectors, each representing a portion of the whole chart (percentage). All of the data adds up to 360 degrees and the entire value of the pie is always 100 percent.</p><p>Let us first create a simple Pie chart.</p><h3>Simple Pie chart</h3><p>For this first, all required modules are imported and a dataframe is initialized. To plot a pie chart plot () function is used and the kind attribute is set to pie.</p><h4><strong>Syntax</strong></h4><pre>plot(kind=&#39;pie&#39;)</pre><h4><strong>Example</strong></h4><pre>import pandas as pd<br><br># DataFrame of each student and the votes they get<br>dataframe = pd.DataFrame({&#39;Name&#39;: [&#39;Faridah&#39;, &#39;Faridah&#39;, &#39;Faridah&#39;,<br>        &#39;Faridah&#39;, &#39;Faridah&#39;, &#39;Nasir&#39;,<br>        &#39;Nasir&#39;, &#39;Nasir&#39;, &#39;Nasir&#39;, &#39;Nasir&#39;,<br>        &#39;Mubarak&#39;, &#39;Mubarak&#39;, &#39;Mubarak&#39;,<br>        &#39;Mubarak&#39;, &#39;Mubarak&#39;],<br>      &#39;votes_of_each_class&#39;: [12, 9, 17, 19, 20,<br>            11, 15, 12, 9, 4,<br>            22, 19, 17, 19, 18]})<br><br># Plotting the pie chart for above dataframe<br>dataframe.groupby([&#39;Name&#39;]).sum().plot(kind=&#39;pie&#39;, y=&#39;votes_of_each_class&#39;)</pre><h4><strong>Output</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*58fCGQEQnQmPtwid1MxT_A.png" /></figure><h3>Pie Chart as Percentage</h3><p>To add percentage <strong>autopct</strong> attribute is set to an appropriate value, this automatically adds percentages to each section.</p><p><strong>Syntax:</strong></p><pre>plot(kind=&#39;pie&#39;, autopct)</pre><h4><strong>Example</strong></h4><pre>import pandas as pd<br><br># DataFrame of each student and the votes they get<br>dataframe = pd.DataFrame({&#39;Name&#39;: [&#39;Faridah&#39;, &#39;Faridah&#39;, &#39;Faridah&#39;,<br>        &#39;Faridah&#39;, &#39;Faridah&#39;, &#39;Nasir&#39;,<br>        &#39;Nasir&#39;, &#39;Nasir&#39;, &#39;Nasir&#39;, &#39;Nasir&#39;,<br>        &#39;Mubarak&#39;, &#39;Mubarak&#39;,<br>        &#39;Mubarak&#39;, &#39;Mubarak&#39;,<br>        &#39;Mubarak&#39;],<br>      &#39;votes_of_each_class&#39;: [12, 9, 17, 19,<br>            20, 11, 15, 12,<br>            9, 4, 22, 19, 17,<br>            19, 18]})<br><br># Plotting the pie chart for above dataframe<br> dataframe.groupby([&#39;Name&#39;]).sum().plot(kind=&#39;pie&#39;, y=&#39;votes_of_each_class&#39;, autopct=&#39;%1.0f%%&#39;)</pre><h4><strong>Output</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*UPlFrNSQaMg3ZVmDC4LgUg.png" /></figure><h3>How to Create Pie Chart using Seaborn</h3><p>Seaborn is a library for making graphs in Python. It is based on another library called matplotlib and makes it easy to create nice-looking and informative graphs. Matplotlib is a library for making many different types of graphs in Python. It can make static, animated, and interactive graphs and works with other libraries in the SciPy stack.</p><p>Seaborn is a library for data visualization in python . it is based on another library called matplotlib. It provides a high-level interface for drawing attractive and informative statistical graphics. Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. It is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack.</p><h4><strong>Syntax to install seaborn</strong>.</h4><pre>pip install seaborn</pre><p>If we want to create a pie chart using seaborn in Python, we have to use the pie attribute of Matplotlib and the color pallets of Seaborn. We have to pass the input data and the color pallet to create a pie chart.</p><h4><strong>Example</strong></h4><p>let’s create a pie chart of some random data</p><pre>import matplotlib.pyplot as plt<br>import seaborn as sns<br><br>data = [35, 21, 29, 39, 11]<br>colors = sns.color_palette(&#39;pastel&#39;)<br>plt.pie(data, colors = colors)<br>plt.show()</pre><h4><strong>Output</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/1*G4aI5Mlzvhc2NxkZxhyvQw.png" /></figure><p>In the above code, we have used the pastel color pallet of Seaborn, but we can change the color pallet as we like. Seaborn has a lot of color pallet options available like deep, muted, colorblind, bright, and dark.</p><p>We can also add text inside the slices using the autopct parameter. For example, let’s make the above pie chart more readable by adding labels, changing the color pallet, and adding the slice percentage inside each slice.</p><h4><strong>Example</strong></h4><pre>import matplotlib.pyplot as plt<br>import seaborn as sns<br><br>data = [35, 21, 29, 39, 11]<br>labels = [&#39;slice 1&#39;, &#39;slice 2&#39;, &#39;slice 3&#39;, &#39;slice 4&#39;, &#39;slice 5&#39;]<br>colors = sns.color_palette(&#39;bright&#39;)<br>plt.pie(data, labels=labels,colors = colors, autopct = &#39;%0.0f%%&#39;)<br>plt.show()</pre><h4><strong>Output</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*VcTSrFt4JrMSE2ilJtdizg.png" /></figure><h4><strong>Example</strong></h4><p>Let’s take 6 classes with some students in it and plot a pie chart on the basic number of students in each class.</p><pre><br># importing libraries<br>import matplotlib.pyplot as plt<br>import seaborn<br><br># declaring data<br>data = [44, 45, 40, 41, 39, 30]<br>keys = [&#39;jss 1&#39;, &#39;jss2 2&#39;, &#39;jss3&#39;, &#39;ss1&#39;, &#39;ss2&#39;, &#39;ss3&#39;]<br><br># define Seaborn color palette to use<br>palette_color = seaborn.color_palette(&#39;bright&#39;)<br><br># plotting data on chart<br>plt.pie(data, labels=keys, colors=palette_color, autopct=&#39;%.0f%%&#39;)<br><br># displaying chart<br>plt.show()</pre><h4><strong>Output</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/1*wIvGayhn27VvIWqWNTD_YA.png" /></figure><p>we can also plot a pie chart with different palette and explode.</p><pre># importing libraries<br>import matplotlib.pyplot as plt<br>import seaborn<br>  <br># declaring data<br>data = [44, 45, 40, 41, 39, 30]<br>keys = [&#39;jss 1&#39;, &#39;jss2 2&#39;, &#39;jss3&#39;, &#39;ss1&#39;, &#39;ss2&#39;, &#39;ss3&#39;]<br>  <br># declaring exploding pie<br>explode = [0, 0.1, 0, 0, 0, 0.1]<br># define Seaborn color palette to use<br>palette_color = seaborn.color_palette(&#39;dark&#39;)<br>  <br># plotting data on chart<br>plt.pie(data, labels=keys, colors=palette_color,<br>        explode=explode, autopct=&#39;%.0f%%&#39;)<br>  <br># displaying chart<br>plt.show()</pre><h4><strong>Output</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/1*mq6tjNXsMVRhNewqsN_cGw.png" /></figure><p>Pie charts can be useful for showing data that has a clear and meaningful whole, such as total revenue, votes, or population. However, they are not suitable for showing data that has no natural whole, such as averages, rates, or ratios. They are also not good for showing changes over time or comparing multiple groups of data. In those cases, other chart types such as bar charts, line charts, or scatter plots might be more appropriate.</p><p>In conclusion, pie charts are a popular and easy way of presenting data that shows how a whole is divided into parts. However, they also have some drawbacks and challenges that require careful design and interpretation. By following some simple guidelines and choosing the right data for pie charts, they can be an effective tool for data visualization.</p><p>Thanks for reading.</p><p>Reference</p><p><a href="https://www.tableau.com/data-insights/reference-library/visual-analytics/charts/pie-charts">Understanding and using Pie Charts | Tableau</a></p><p><a href="https://chartio.com/learn/charts/pie-chart-complete-guide/#avoid-distorting-effects">A Complete Guide to Pie Charts | Tutorial by Chartio</a></p><p><a href="https://statisticsbyjim.com/graphs/pie-charts/">Pie Charts: Using, Examples, and Interpreting — Statistics By Jim</a></p><p><a href="https://www.geeksforgeeks.org/how-to-create-a-pie-chart-in-seaborn/">How to Create a Pie Chart in Seaborn? — GeeksforGeeks</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=621424c7ab00" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Relational Data and Non-Relational Data]]></title>
            <link>https://medium.com/@waziriphareeyda/introduction-to-relational-data-and-non-relational-data-a52225d84d53?source=rss-ed9daf51a93d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a52225d84d53</guid>
            <dc:creator><![CDATA[Faridah Yusuf]]></dc:creator>
            <pubDate>Thu, 11 May 2023 11:18:30 GMT</pubDate>
            <atom:updated>2023-05-11T11:18:30.635Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tzNJJFsLNzGJP0Vq" /><figcaption>Photo by <a href="https://unsplash.com/@lukechesser?utm_source=medium&amp;utm_medium=referral">Luke Chesser</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In the world of computer science and data management, there are two types of data: relational data and non-relational data. These types of data are fundamentally different in their structure, storage, and processing, and each has its unique advantages and disadvantages. In this article, we will discuss the differences between these two types of data and their applications.</p><h4><strong>Relational Data:</strong></h4><p>Relational data is structured data that is organized in tables, with each table consisting of rows and columns. The data in each table is related to each other based on common attributes or keys. Relational databases are widely used to store and manage structured data in organizations, businesses, and other entities.</p><p>Relational databases use Structured Query Language (SQL) to manage and manipulate data. SQL is a powerful programming language that allows users to create, read, update, and delete data in relational databases. Relational databases are known for their strong consistency and data integrity, making them suitable for applications that require high levels of reliability and accuracy.</p><p>One of the main advantages of relational data is that it can be easily queried and analyzed using SQL. This allows users to extract insights and generate reports from large datasets quickly. Additionally, relational databases can handle complex relationships between data points, making them suitable for applications that require complex data modeling and analysis.</p><h4><strong>Non-Relational Data:</strong></h4><p>Non-relational data, also known as NoSQL data, is unstructured or semi-structured data that is not organized in tables. Non-relational databases are designed to handle large volumes of data that may not fit neatly into tables or require complex relationships between data points.</p><p>Non-relational databases are generally categorized based on their data storage and access models. Some common types of non-relational databases include document databases, key-value stores, columnar databases, and graph databases. Non-relational databases use different methods of data storage and retrieval compared to relational databases. These methods include document-based storage, key-value pairs, and columnar storage, among others.</p><p>Non-relational databases are known for their scalability and flexibility, making them suitable for handling large volumes of data and high-velocity data streams. They are commonly used in applications such as social media analytics, real-time data processing, and content management systems.</p><p>One of the main advantages of non-relational data is its ability to handle unstructured and semi-structured data. This makes it ideal for handling data sources such as images, videos, and social media posts that do not fit neatly into tables. Additionally, non-relational databases can be distributed across multiple servers, making them highly scalable and suitable for applications that require high availability and fault tolerance.</p><p>Conclusion</p><p>In conclusion, both relational data and non-relational data have their unique advantages and disadvantages, and the choice of which one to use depends on the specific needs of the application. Relational databases are suitable for structured data that requires strong consistency and data integrity, while non-relational databases are suitable for handling unstructured or semi-structured data and applications that require high scalability and fault tolerance. Understanding the differences between these two types of data is essential for making informed decisions when choosing a data storage and management solution for your organization or application.</p><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a52225d84d53" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Julia is the Future of Data Science]]></title>
            <link>https://medium.com/@waziriphareeyda/why-julia-is-the-future-of-data-science-3c52a82df7eb?source=rss-ed9daf51a93d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c52a82df7eb</guid>
            <dc:creator><![CDATA[Faridah Yusuf]]></dc:creator>
            <pubDate>Sat, 08 Apr 2023 22:31:41 GMT</pubDate>
            <atom:updated>2023-04-08T22:31:41.460Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MwMmMoqaRrwrcjDr" /><figcaption>Photo by <a href="https://unsplash.com/@writecodenow?utm_source=medium&amp;utm_medium=referral">Boitumelo Phetla</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>What is Julia?</h3><p>Julia is a high-level, dynamic programming language designed for numerical and statistical calculations and also for data analytics, much like R. it was first announced in 2012 by Jeff Bezanson, Stefan Karpinski, Alan Edelman, and Viral B. Shah. when compared to Python and R, its code execution is significantly faster . Julia supports big data analytics by completing challenging tasks like cloud computing and parallelism, which are essential to large data analysis. It is fast, efficient, and easy to learn.</p><h3>Features and advantages of Julia</h3><p>Julia is a general-purpose, multi-platform programming language that is</p><ul><li>Open-source</li><li>As fast as C</li><li>As dynamic as Ruby</li><li>Homoiconic, or treating code like data</li><li>Matlab-like in math notation</li><li>Lisp-like in macros</li><li>As general as Python</li><li>As statistics-friendly as R</li><li>As natural as Perl for string processing</li><li>As powerful as Matlab for linear algebra</li><li>Hadoop-like in distribution</li><li>Suited for numerical analysis and computational science</li><li>Dynamically typed</li><li>High performance and just-in-time compiled</li><li>Using automatic memory management (garbage collection)</li><li>Composable: Julia makes it easy to express many object-oriented and functional programming patterns facilitating code reuse</li></ul><p>Let’s focus on one aspect of Julia: the fact that it’s dynamically typed. Usually, programming languages are divided into two broad categories:</p><h4><strong>Dynamically typed</strong></h4><p>Examples of statically typed languages are C/C++, C#, Java, Swift, Go, Rust, Pascal, and Fortran. In a statically typed language, type checks are performed on all your code before your program is allowed to run.</p><h4><strong>Statically typed</strong></h4><p>In dynamic languages values such as numbers, characters, and strings have attached tags that say what type they are. These tags allow programs written in a dynamically typed language to check type correctness at runtime.</p><p>Julia is a dynamic language that can achieve high performance thanks to its JIT compilation and multiple-dispatch features. These features distinguish Julia from other languages that use AOT compilation or interpretation. This article will explain why Julia is appealing for many applications.</p><h3>Why Julia was created</h3><p>The motivation behind Julia’s creation can be better understood by looking at the two-language problem that its creators wanted to address. This problem arises when software projects use two distinct programming languages with different features. In fields like science, machine learning and data analysis, dynamic languages are often favored. However, these languages are not fast enough for some tasks. Therefore, some parts of the code have to be rewritten in faster, static languages. What is the reason for this choice? Why not use a traditional high-performance, static language for everything.</p><h3>Julia is for everyone</h3><p>You might think that Julia is a language only for smart people in white coats. But that’s not true at all. It turns out that many of the features that make Julia a great language for scientists also make it a great language for everyone else. Julia offers</p><ul><li>Strong facilities for modularizing and reusing code</li><li>A strict type system that helps catch bugs in your code when it runs</li><li>A sophisticated system for reducing repetitive boilerplate code (metaprogramming)</li><li>A rich and flexible type system that allows you to model a wide variety of problems</li><li>A well-equipped standard library and various third-party libraries to handle various tasks</li><li>Great string processing facilities. This ability is usually a key selling point for any Swiss-Army-knife-style programming language. It is what initially made languages such as Perl, Python, and Ruby popular</li><li>Easy interfacing with a variety of other programming languages and tools</li></ul><h3>Data Teams Using Julia</h3><p>Julia is not only used for aerospace engineering — it is also used by pharmaceutical companies. Pfizer sped up the simulation of treatments for heart failure 175 times using models running in Julia. AstraZeneca uses Bayesian neural networks with the Flux.jl and Turing.jl . Julia packages to predict drug toxicity. Julia is taught at some of the most renowned institutions worldwide, such as MIT, Stanford, Cornell, UC Berkeley, Brown, Tokyo Metropolitan University, and so on. Here are some of the globally-known companies developing in Julia.</p><ul><li>Intel</li><li>Disney</li><li>Amazon</li><li>Capital One</li><li>KPMG</li><li>Google</li><li>Microsoft</li><li>NASA</li><li>IBM</li></ul><p>Conclusion</p><p>Julia is a strong and flexible language that is great for scientific computing, data analysis, and machine learning. Its fast performance, user-friendliness, interactivity, and community-driven development make it an attractive option for anyone who wants to do complex computations quickly and efficiently. Whether you are a researcher, data scientist, or engineer, Julia is a language that you should think about learning and using in your work.</p><p>Thanks for reading.</p><h4><strong>Reference</strong></h4><p><a href="https://www.datacamp.com/blog/the-rise-of-julia-is-it-worth-learning-in-2022">https://www.datacamp.com/blog/the-rise-of-julia-is-it-worth-learning-in-2022</a></p><p><a href="https://www.manning.com/books/julia-as-a-second-language">Julia as a Second Language (manning.com)</a></p><p><a href="https://www.freecodecamp.org/news/learn-julia-programming-language/">Learn Julia For Beginners — The Future Programming Language of Data Science and Machine Learning Explained (freecodecamp.org)</a></p><p><a href="https://julialang.org/feed.xml">The Julia Language Blog</a></p><p><a href="https://arstechnica.com/science/2020/10/the-unreasonable-effectiveness-of-the-julia-programming-language/">The unreasonable effectiveness of the Julia programming language | Ars Technica</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c52a82df7eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>