<?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 Muhamad Ali on Medium]]></title>
        <description><![CDATA[Stories by Muhamad Ali on Medium]]></description>
        <link>https://medium.com/@ngodingyo?source=rss-451058c36a4d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9F2b7juqmukzt_SAYHiTug@2x.jpeg</url>
            <title>Stories by Muhamad Ali on Medium</title>
            <link>https://medium.com/@ngodingyo?source=rss-451058c36a4d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 20 May 2026 19:12:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ngodingyo/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[Introduction to Large Language Models]]></title>
            <link>https://ngodingyo.medium.com/introduction-to-large-language-models-b8df670dbd0a?source=rss-451058c36a4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8df670dbd0a</guid>
            <dc:creator><![CDATA[Muhamad Ali]]></dc:creator>
            <pubDate>Sat, 18 Jan 2025 14:22:57 GMT</pubDate>
            <atom:updated>2025-01-18T14:22:57.311Z</atom:updated>
            <content:encoded><![CDATA[<p>This is the final article in the <strong>Foundations for Data Science</strong> series. In this article, we’ll dive into an <strong>overview of Large Language Models (LLMs)</strong>. Make sure you’ve followed along with all the previous articles in the series to get the most out of this one. So let’s get started!</p><p><strong>Large Language Models (LLMs) </strong>are advanced computer programs designed to understand and generate human-like text. They are a type of artificial intelligence (AI) built using <strong>machine learning</strong> techniques. These models are trained on huge amounts of text data, such as books, articles, and websites, to learn the patterns and rules of language</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*_wnvjbTsTMDtFhprjqK6-g.png" /></figure><h3><strong>Open Source vs Closed Source Models</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*L5DjxGKXRZh8uFErgE7ssA.png" /></figure><h3><strong>Pretrained Models</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*CLKrxLXamiwSy0UpojF7kw.png" /></figure><p>A <strong>pretrained model</strong> is a machine learning model that has already been trained on a large dataset for a specific task or general understanding. Instead of starting from scratch, you use this model as a foundation and can customize it further for your needs.</p><p><strong>Key Features of Pretrained Models</strong></p><ol><li><strong>Ready-to-Use Knowledge</strong>:<br> They already “know” a lot because they were trained on large amounts of data (like books, articles, or code).</li><li><strong>Save Time and Resources</strong>:<br> Instead of spending weeks or months training a model, you can use a pretrained one in minutes.</li><li><strong>Customizable</strong>:<br> You can fine-tune a pretrained model to adapt it to your specific task, like classifying emails or translating languages.</li></ol><p><strong>How It Works</strong></p><p>Think of a pretrained model like a student who has completed a general education. If you want them to work in a specific field (like medicine or engineering), you just need to teach them a little more about that subject, instead of starting from scratch.</p><h3><strong>Vector Database</strong></h3><p><strong>A vector database</strong> is a type of database designed to store, search, and manage <strong>vector embeddings</strong>. Vector embeddings are numerical representations of data like text, images, or audio, often created by AI models. These embeddings help machines understand the meaning or context of the data.</p><p><strong>Why Use a Vector Database?</strong></p><p>Traditional databases work well for exact matches (like “find user ID 123”), but they struggle with <strong>similarity-based searches</strong> (like “find products similar to this”). A vector database excels at finding data that is <strong>“close” or “similar”</strong> in meaning, not just exact matches.</p><p><strong>How It Works (Simple Explanation):</strong></p><ol><li><strong>Embeddings Creation</strong>: AI models convert items (text, images, etc.) into vectors (lists of numbers). For example:</li></ol><ul><li>Text: “I love cats” → [0.56, 0.32, 0.78…]</li><li>Image: A picture of a dog → [0.12, 0.98, 0.45…]</li></ul><p>2. <strong>Storage</strong>:The vectors are stored in the database.</p><p>3. <strong>Similarity Search</strong>: When you search, the database compares the vector of your query with the stored vectors to find similar ones.</p><p><strong>Use Cases</strong></p><ol><li><strong>Search Engines</strong>: Finding similar documents, images, or videos.</li></ol><p>2. <strong>Recommendation Systems</strong>: Suggesting products or content based on user preferences.</p><p>3. <strong>Chatbots</strong>: Retrieving the most relevant responses from a knowledge base.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*u3E7JFOyjkpw4Y_aRkXlvg.png" /></figure><h3><strong>Prompt Engineering</strong></h3><p><strong>Prompt engineering</strong> is the process of designing and optimizing the text (or “prompt”) that you give to an AI model to get the best possible response. It’s like asking the right question to get the most useful answer.</p><p><strong>Why is Prompt Engineering Important?</strong></p><p>AI models, like ChatGPT or Bard, don’t automatically know what you want. How you phrase your input can significantly impact the quality, accuracy, and relevance of the response.</p><p>Think of it like:</p><p>• A vague prompt: “Tell me something.” → Confusing answer.</p><ul><li>A clear prompt: “Explain photosynthesis in simple terms.” → Precise and useful answer.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GKJqJcVKeRhHdG60ADDf6A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*076eJsuhGhKV1NtmvdE-JA.png" /></figure><p><strong>Key Takeaways:</strong></p><ul><li><strong>Simple Tasks</strong>: Use Zero-Shot or Few-Shot Prompting.</li><li><strong>Reasoning or Multi-Step Tasks</strong>: Chain-of-Thought, Self-Consistency, or Tree of Thoughts.</li><li><strong>Complex or Knowledge-Intensive Tasks</strong>: Generated Knowledge or Prompt Chaining.</li><li><strong>Creative Strategy Development</strong>: Meta Prompting or ToT.</li></ul><h3><strong>Retrieval Augmented Generation (RAG)</strong></h3><p>Retrieval-Augmented Generation (RAG) is a powerful AI technique that combines two major components:</p><ol><li><strong>Information Retrieval</strong>: It searches for relevant information from external sources, like documents or databases.</li></ol><p>2. <strong>Text Generation</strong>: It uses a language model (like GPT) to generate human-like text based on the retrieved information.</p><p><strong>Example Use Cases</strong></p><ul><li><strong>Customer Support</strong>: Helping customers by retrieving relevant answers from a knowledge base.</li><li><strong>Education</strong>: Assisting students by pulling answers from textbooks or research papers.</li><li><strong>Enterprise</strong>: Providing business-specific insights using internal company data.</li></ul><p><strong>Key Advantages</strong></p><ul><li>Combines the vast knowledge of language models with precise, up-to-date information.</li><li>Adaptable to various fields by connecting it to different databases.</li><li>Generates answers that are both accurate and conversational.</li></ul><p><strong>Step-by-step RAG</strong></p><p><strong>Indexing</strong>: Documents are divided into smaller chunks, vectorized, and stored in a <strong>Vector Database</strong> for efficient searching.</p><p><strong>Query</strong>: The user submits a query, which is vectorized to compare with stored chunks.</p><p><strong>Retrieve</strong>: The system finds the most relevant chunks from the Vector Database.</p><p><strong>Augment</strong>: Relevant chunks are combined with the query to create an enhanced input for the LLM.</p><p><strong>Generate</strong>: The LLM a response based on the query and retrieved in form generatesation.</p><p><strong>Response</strong>: The system delivers the final, accurate response to the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*RMdLXqyl4WcJNqQGMPpzsQ.png" /></figure><h3><strong>LLM Agents</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ocGXiWtUxUDIJMIhMtLE5Q.png" /></figure><p>LLM (Large Language Model) agents are like <strong>smart assistants</strong> powered by AI. They can understand and process human language to perform tasks, solve problems, or interact with other systems.</p><p><strong>How LLM Agents Work</strong></p><ol><li><strong>Understand Commands</strong>: You give the agent instructions (e.g., “Summarize this article” or “Book a meeting for me”).</li><li><strong>Reason &amp; Plan</strong>: The agent figures out what needs to be done by breaking the task into smaller steps.</li><li><strong>Take Actions</strong>: It may interact with tools, systems, or databases to perform the required actions.</li><li><strong>Respond</strong>: Finally, the agent gives you the result, like a response, a summary, or a completed task.</li></ol><p><strong>Key Features</strong></p><ul><li><strong>Powered by AI</strong>: LLM agents use large models (like GPT or Claude) to generate human-like responses.</li><li><strong>Tool Integration</strong>: They can connect with external tools, such as search engines, APIs, or calculators, to enhance their capabilities.</li><li><strong>Adaptable</strong>: LLM agents can handle many tasks, from answering questions to automating workflows.</li></ul><h3><strong>Fine-tuning</strong></h3><p><strong>Fine-tuning an LLM</strong> means customizing a pre-trained Large Language Model to perform specific tasks or understand specialized data.</p><p><strong>How It Works:</strong></p><ol><li><strong>Start with a Pre-trained Model</strong>: Use an existing LLM trained on general data.</li><li><strong>Provide Custom Data</strong>: Feed the model domain-specific or task-specific data (e.g., medical records, legal documents).</li><li><strong>Train the Model</strong>: Adjust the model’s parameters to improve performance on the given data.</li><li><strong>Deploy the Fine-Tuned Model</strong>: Use the customized model for specialized tasks.</li></ol><p><strong>Why Fine-Tune?</strong></p><ul><li>Improves accuracy for specific industries (e.g., healthcare, finance).</li><li>Makes the model better at tasks like classification, summarization, or chat.</li></ul><p>In short, fine-tuning tailors an LLM to fit your unique needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hx3U1qIsSHeDYbaxn6I4kA.png" /></figure><p><strong>Why Fine-Tuning is Still Needed</strong></p><ol><li><strong>Deeper Understanding</strong>: RAG helps with retrieving information, but it doesn’t improve the LLM’s inherent ability to generate domain-specific answers. Fine-tuning makes the model itself smarter for specific tasks.</li><li><strong>Improved Language Skills</strong>: Fine-tuning ensures the model uses precise terminology, tone, or style for specialized fields like legal or medical content.</li><li><strong>Faster Performance</strong>: A fine-tuned model directly “knows” answers and needs less context retrieval, which can speed up responses.</li><li><strong>Offline Use</strong>: RAG requires external databases or APIs. Fine-tuning creates a standalone model that works even without external tools.</li><li><strong>Consistency</strong>: Fine-tuned models are less likely to make mistakes in a specific domain compared to a general LLM that relies on RAG alone.</li></ol><p><strong>RAG vs. Fine-Tuning</strong></p><ul><li><strong>RAG</strong>: Great for keeping answers fresh and updated by relying on external sources.</li><li><strong>Fine-Tuning</strong>: Ensures the model generates accurate and reliable answers even without external help.</li></ul><p>In summary, fine-tuning complements RAG by making the LLM inherently better for your specific needs, while RAG extends its knowledge with external data.</p><p>This concludes the <strong>Introduction to Large Language Models</strong>. To practice what you’ve learned, you can explore the <strong>hands-on materials</strong> provided. Click the following link to access them: <a href="https://github.com/ali-datascience/mymediumfondationfordatascience/tree/main/G.%20LLMs">https://github.com/ali-datascience/mymediumfondationfordatascience/tree/main/G.%20LLMs</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8df670dbd0a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unlocking NLP: The Ultimate Guide to Natural Language Processing for Beginners]]></title>
            <link>https://ngodingyo.medium.com/unlocking-nlp-the-ultimate-guide-to-natural-language-processing-for-beginners-341f6a98f6f7?source=rss-451058c36a4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/341f6a98f6f7</guid>
            <dc:creator><![CDATA[Muhamad Ali]]></dc:creator>
            <pubDate>Sat, 11 Jan 2025 15:00:33 GMT</pubDate>
            <atom:updated>2025-01-11T15:10:28.294Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to my article exploring the foundation for data science. In this article series, I will briefly cover NLP (Natural Language Processing) and strive to make this article easy to remember and understand. In this post, we will discuss:</p><p><strong>Text Preprocessing</strong></p><ul><li>Regular Expressions</li><li>Tokenization</li><li>Stop Words Removal</li><li>Stemming and Lemmatization</li><li>N-grams</li></ul><p><strong>Identifying Parts of Speech and Named Entities</strong></p><ul><li>Text Tagging</li><li>Parts of Speech (POS) Tagging</li><li>Named Entity Recognition (NER)</li></ul><p><strong>Vectorizing Text</strong></p><ul><li>Numerical Representation of Text</li><li>Bag of Words Model</li><li>TF-IDF</li><li>Word Embeddings</li></ul><p><strong>Topic Modeling</strong></p><ul><li>Latent Dirichlet Allocation</li><li>Latent Semantic Analysis</li></ul><p><strong>Text Classifier</strong></p><p>At the end of this post, you can find a practical NLP session on my GitHub link. Let’s start with <strong>Text Preprocessing</strong>. Oh, and make sure you’ve followed this series from the beginning. If not, please click this link: <a href="https://medium.com/@ngodingyo/list/foundations-for-data-science-4973a354ba72">https://medium.com/@ngodingyo/list/foundations-for-data-science-4973a354ba72</a>.</p><p>Alright, let’s begin!</p><h3><strong>Regular Expressions</strong></h3><p>Regular Expressions, or <strong>Regex</strong>, are patterns used to match and manipulate text. Think of them as a powerful search-and-replace tool that can find specific text patterns, not just exact matches.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SJGoo0dV2n1aedrdbABr3Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*W3U9oSm8azO-ZqC44gS8uw.png" /></figure><h3>Tokenization</h3><p>Tokenization involves splitting text into smaller, manageable units known as tokens, which can be words, sentences, or other meaningful segments. This foundational step in text preprocessing is essential for tasks like sentiment analysis, topic modeling, and other natural language processing applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*QDrAzEKx5qHprGLAPjxrgA.png" /></figure><h3><strong>Stop words</strong></h3><p><strong>Stop words </strong>are common words in a language, such as “and”, “the”, “is”, “in”, “of”, or “a”, that occur very frequently in text but usually don’t add significant meaning to the overall context. These words are often removed during text preprocessing because they don’t contribute much to understanding the key points of a sentence, especially in tasks like sentiment analysis or topic modeling.</p><ul><li>For example, in sentiment analysis, you’re often more interested in words that express opinions or emotions, such as “happy”, “great”, or “sad”. Stop words like “the” or “is” don’t affect the sentiment or meaning, so removing them helps make the analysis more efficient and focused.</li><li>In topic modeling, where the goal is to discover the main topics in a collection of texts, stop words don’t provide helpful information about the topics themselves, so they are typically filtered out to improve the quality of the results.</li><li>By removing stop words, we reduce noise in the data, making the analysis or modeling process faster and more accurate.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*aSPvmwyyphxd3pcXWsm5bg.png" /></figure><h3><strong>Stemming and Lemmatization</strong></h3><p><strong>Stemming</strong></p><p>Stemming is a way to simplify words by cutting off their endings to get their base form. It helps group similar words together, like “running,” “runner,” and “ran” all becoming “run.” However, the base form created by stemming isn’t always a real word. For example, “studies” might turn into “studi.” It’s a fast and rule-based process used in tasks like search engines to match related words quickly.</p><p><strong>Use Case</strong>:<br> Stemming is useful in applications where exact word meanings are not critical, such as search engines or basic keyword matching</p><p><strong>Lemmatization</strong></p><p>Lemmatization also reduces words to their base or dictionary form (called a lemma) but considers the word’s context and grammatical rules. Unlike stemming, lemmatization produces valid words in the language.</p><p><strong>Use Case</strong>:<br> Lemmatization is preferred for tasks that require accurate word meanings and grammatical structure, such as sentiment analysis or machine translation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UwgWiPEBJ2i7Oc1YM6ZjBg.png" /></figure><h3><strong>N-grams</strong></h3><p>N-grams are sequences of <strong>N consecutive items</strong> (usually words or characters) from a given text. They are commonly used in natural language processing (NLP) for analyzing or predicting text.</p><p><strong>Why Use N-grams?</strong></p><ul><li><strong>Text Analysis</strong>: Helps identify common phrases or patterns.<br> Example: In analyzing reviews, bigrams like “not good” may reveal negative sentiment.</li><li><strong>Text Generation</strong>: Used in models like Markov Chains to predict the next word based on previous ones.</li><li><strong>Spelling Correction</strong>: Detects likely sequences of characters.</li><li><strong>Plagiarism Detection</strong>: Identifies reused sequences of text.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TDZMg1zGHiqre5B9N-MD6Q.png" /></figure><h3><strong>Text Tagging</strong></h3><p>Text tagging is the process of assigning labels or tags to parts of a text to identify its structure, meaning, or context. It is widely used in <strong>Natural Language Processing (NLP)</strong> to categorize and analyze textual data.</p><p><strong>Types of Text Tagging</strong></p><ol><li><strong>Part-of-Speech (POS) Tagging</strong>: Assigns grammatical roles like noun, verb, or adjective to words in a sentence.</li></ol><ul><li>Example: <em>“The cat sleeps”</em> → The/DT cat/NN sleeps/VB</li><li>DT = Determiner, NN = Noun, VB = Verb</li></ul><p>2. <strong>Named Entity Recognition (NER)</strong>: Identifies entities like names, dates, locations, or organizations.</p><ul><li>Example: <em>“Apple launched the iPhone in California in 2007.”</em><br> → Apple/ORG iPhone/PRODUCT California/LOC 2007/DATE</li></ul><p>3. <strong>Sentiment Tagging</strong>: Labels text with emotions or opinions, such as positive, negative, or neutral.</p><ul><li>Example: <em>“I love this movie!”</em> → Positive</li></ul><p>4. <strong>Topic Tagging</strong>: Assigns topics or themes to text, such as “sports,” “technology,” or “finance.”</p><ul><li>Example: <em>“Bitcoin prices are rising.”</em> → Topic: Finance</li></ul><p>5. <strong>Intent Tagging</strong>: Detects user intentions in conversational AI.</p><ul><li>Example: <em>“What’s the weather tomorrow?”</em> → Intent: Weather Query</li></ul><p>6. <strong>Entity Linking</strong>: Links identified entities to a knowledge base or database for further context.</p><ul><li>Example: <em>“Paris is beautiful.”</em> → Paris → Paris, France (Location)</li></ul><p><strong>Applications</strong></p><ul><li><strong>Search Engines</strong>: Improve keyword relevance and search results.</li><li><strong>Chatbots</strong>: Understand user intent and respond effectively.</li><li><strong>Sentiment Analysis</strong>: Analyze customer reviews or social media sentiment.</li><li><strong>Content Categorization</strong>: Automatically tag blog posts or news articles.</li><li><strong>Information Extraction</strong>: Pull structured data from unstructured text, such as extracting dates or names.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lIZaFo7f9NhRB7s6RtJBgw.png" /></figure><h3><strong>Parts of Speech (POS) Tagging</strong></h3><p><strong>Parts of Speech (POS) Tagging</strong></p><p><strong>POS tagging</strong> involves labeling each word in a sentence with its grammatical role, such as noun, verb, adjective, or adverb. This helps in understanding sentence structure.</p><p><strong>Common POS Tags</strong>:</p><ul><li><strong>NN</strong>: Noun (e.g., cat, dog)</li><li><strong>VB</strong>: Verb (e.g., run, eat)</li><li><strong>JJ</strong>: Adjective (e.g., beautiful, fast)</li><li><strong>RB</strong>: Adverb (e.g., quickly, softly)</li><li><strong>DT</strong>: Determiner (e.g., the, a)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*kdjumwau43LQVeTXWBo1yg.png" /></figure><h3><strong>Named Entity Recognition (NER)</strong></h3><p><strong>NER</strong> identifies real-world entities mentioned in a text, such as names, locations, organizations, dates, and more. It provides semantic meaning to the entities.</p><p><strong>Common Named Entity Types</strong>:</p><ul><li><strong>PERSON</strong>: People’s names</li><li><strong>ORG</strong>: Organizations (e.g., Google, NASA)</li><li><strong>LOC</strong>: Locations (e.g., Paris, Mount Everest)</li><li><strong>DATE</strong>: Dates (e.g., 2024, March 15)</li><li><strong>PRODUCT</strong>: Products (e.g., iPhone, Tesla)</li></ul><p><strong>Example</strong>:<br> <em>“Barack Obama was born in Hawaii and served as President of the United States.”</em><br> NER Tags:</p><ul><li>Barack Obama → PERSON</li><li>Hawaii → LOC</li><li>United States → LOC</li></ul><h3><strong>Vectorizing Text</strong></h3><p><strong>Numerical Representation of Text</strong></p><p>This involves assigning numbers to words or sentences in a way that captures their meaning, patterns, or structure. For example:</p><ul><li>Each unique word could have a unique number.</li><li>A sentence could be represented as a combination of numbers based on its words.</li></ul><p>Numerical representation of text, also known as text vectorization or encoding, is essential for processing text data in machine learning models. Here are common methods to convert text into numerical representations :</p><p><strong>Bag of Words Model (BoW)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*UeAPEa0Cp9DYQe6HbeT_Ug.png" /></figure><p>This is one of the simplest ways to vectorize text. Here’s how it works:</p><ul><li><strong>Imagine a “bag” holding all unique words</strong> from your text dataset (like a dictionary).</li><li>For each piece of text (sentence, paragraph), count how many times each word appears from that “bag.”</li><li>Represent the text as a row of numbers, where each number corresponds to the count of a word in the bag.</li></ul><p>For example: If the “bag” contains the words: [‘cat’, ‘dog’, ‘fish’],<br> The sentence “cat and cat” becomes: [2, 0, 0] (2 “cat”, 0 “dog”, 0 “fish”).</p><p><strong>Key point</strong>: BoW ignores word order. It only cares about the counts</p><p><strong>TF-IDF (Term Frequency-Inverse Document Frequency)</strong></p><p>This improves on the Bag of Words model by giving more importance to <strong>unique or rare words</strong> in a dataset. It balances:</p><ul><li><strong>Term Frequency (TF):</strong> How often a word appears in a document.</li><li><strong>Inverse Document Frequency (IDF):</strong> How rare or unique a word is across all documents.</li><li>Common words like “the” or “is” get less weight, while rare words like “quantum” or “matrix” get more weight.</li></ul><p>The final value shows how important a word is in a specific document compared to its use in the entire dataset.</p><p>For example:</p><ul><li>If the word “AI” appears frequently in one document but rarely across the whole dataset, it will have a high TF-IDF score for that document.</li></ul><p><strong>Word Embeddings</strong></p><p>Word embeddings are a way to represent words as numbers (vectors) in such a way that words with similar meanings are close to each other in this vector space. It helps computers understand the relationship between words in a way that captures their context and meaning.</p><p><strong>How Word Embeddings Work</strong></p><p>Imagine a 3D space where each word is a point. Words like “cat,” “dog,” and “animal” are near each other because they are similar, while “car” is far away because it’s unrelated.</p><p><strong>Simple Analogy</strong></p><p>Think of word embeddings as a <strong>map of the world</strong>:</p><ul><li>Words are cities.</li><li>Similar words are near each other (like cities in the same country).</li><li>Unrelated words are far apart.</li></ul><h3>Topic Modelling</h3><p>Topic modeling is a technique used to discover hidden topics in a large collection of text documents. It helps group similar words together and assigns them to topics, making it easier to understand the themes within the data. For example:</p><p><strong>Latent Dirichlet Allocation (LDA)</strong></p><p><strong>LDA</strong> is one of the most popular topic modeling algorithms. It works like this:</p><ul><li>Imagine a bunch of documents (like articles or books).</li><li>LDA assumes that each document is a mix of several topics, and each topic is a mix of several words.</li><li>For example, a sports article might be 70% “sports” topic and 30% “health” topic. The “sports” topic might include words like “game,” “team,” and “player.”</li></ul><p>LDA finds these patterns and assigns a probability for each word in a document to belong to a topic. It’s like asking:<br> <strong>“What topics best explain these words?”</strong></p><p><strong>Latent Semantic Analysis (LSA)</strong></p><p><strong>LSA</strong> is another topic modeling technique. It uses mathematical techniques (like Singular Value Decomposition or SVD) to find patterns in word usage. It works by:</p><ul><li>Reducing the dimensions of the word-document matrix to capture the most important relationships between words and documents.</li></ul><p>The main idea: <strong>Group similar words together based on their context, even if they don’t explicitly appear together.</strong></p><p>For example:</p><ul><li>Words like “doctor,” “medicine,” and “hospital” might form a “health” topic, even if some documents don’t use all of them.</li></ul><p><strong>Simple Analogy:</strong></p><ul><li><strong>LDA:</strong> Imagine you’re reading a mix of articles, and you try to guess their topics by looking at word probabilities (e.g., “90% politics, 10% sports”).</li><li><strong>LSA:</strong> You look for relationships between words and group them into topics, even if the exact words don’t always appear together.</li></ul><h3><strong>Text classifier</strong></h3><p>A <strong>text classifier</strong> is a machine learning model that categorizes or labels text data into predefined categories. For example:</p><ul><li>Emails → “Spam” or “Not Spam.”</li><li>Movie reviews → “Positive” or “Negative.”</li><li>News articles → “Sports,” “Politics,” “Entertainment.”</li></ul><p>Text classifiers use patterns in text data to make predictions about which category a new piece of text belongs to</p><p>This concludes the <strong>The Ultimate Guide to Natural Language Processing for Beginners</strong>. To practice what you’ve learned, you can explore the <strong>hands-on materials</strong> provided. Click the following link to access them: <a href="https://github.com/ali-datascience/mymediumfondationfordatascience/tree/main/F.%20NLP">https://github.com/ali-datascience/mymediumfondationfordatascience/tree/main/F.%20NLP</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=341f6a98f6f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy to understand Deep learning for Data Science]]></title>
            <link>https://ngodingyo.medium.com/easy-to-understand-deep-learning-for-data-science-d62910ddd204?source=rss-451058c36a4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d62910ddd204</guid>
            <dc:creator><![CDATA[Muhamad Ali]]></dc:creator>
            <pubDate>Fri, 10 Jan 2025 06:47:29 GMT</pubDate>
            <atom:updated>2025-01-11T11:49:41.307Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7r2SPfTyblSRA0xylQH0bw.png" /></figure><p><strong>Deep Learning</strong> is a type of machine learning that uses neural networks with multiple layers to learn patterns from large amounts of data. It mimics how the human brain works by processing information through layers of interconnected nodes (neurons).</p><h3><strong>Key Points:</strong></h3><ol><li><strong>Neural Networks</strong>: A series of layers that transform inputs (like images or text) into outputs (like predictions or classifications).</li></ol><p>2. <strong>Learning from Data</strong>: The network adjusts its connections (weights) during training to improve accuracy.</p><p>3. <strong>Applications</strong>: Used for tasks like image recognition, speech processing, and natural language understanding.</p><p>In short, <strong>Deep Learning</strong> is about teaching computers to solve complex problems by learning patterns from data, just like a brain!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*KZ3h2lV7jcA_LmdwoHlQxw.png" /></figure><p>A neural network is a computational model inspired by the structure and functioning of the human brain’s interconnected network of neurons. It’s a powerful tool used in machine learning and artificial intelligence for tasks like classification, regression, pattern recognition, and more.</p><p>Neural networks are highly versatile and can be applied to various tasks, including image and speech recognition, natural language processing, game playing, and more. They have shown remarkable success in many real-world applications, making them a central component of modern artificial intelligence and machine learning system.</p><h3><strong>Applications</strong>:</h3><p>Neural networks are used in various domains, including:</p><ul><li>Computer vision (image classification, object detection)</li><li>Natural language processing (language translation, sentiment analysis)</li><li>Speech recognition</li><li>Recommender systems</li><li>Robotics</li><li>Finance (stock market prediction, fraud detection)</li><li>Healthcare (disease diagnosis, medical image analysis)</li></ul><h3><strong>Here’s how a neural network typically works:</strong></h3><ul><li><strong>Architecture: </strong>A neural network is composed of interconnected layers of nodes, also known as neurons. These layers are typically organized into three types:</li><li><strong>Input Layer:</strong> Neurons that receive input data.</li><li><strong>Hidden Layers:</strong> Intermediate layers between the input and output layers where computation occurs. Each neuron in a hidden layer receives input from the previous layer’s neurons and produces output for the next layer.</li><li><strong>Output Layer</strong>: Neurons that produce the network’s output.</li><li><strong>Connections</strong>: Neurons within and across layers are connected by weighted connections. Each connection has a weight that determines the strength of influence one neuron has on another.</li><li><strong>Activation Function</strong>: Each neuron typically applies an activation function to its input, which introduces non-linearity into the network and allows it to model complex relationships in the data. Common activation functions include sigmoid, tanh, ReLU (Rectified Linear Unit), and softmax.</li><li><strong>Forward Propagation</strong>: During the training or inference phase, input data is fed into the network through the input layer. This data passes through the hidden layers, with computations (weighted sums followed by activation functions) being performed at each neuron, until the output layer produces a result.</li><li><strong>Backpropagation: </strong>After the network produces an output, the computed output is compared to the desired output, and an error value is calculated. This error is then propagated backward through the network, adjusting the weights of connections iteratively to minimize the error. This process is called backpropagation.</li><li><strong>Training</strong>: The process of adjusting the weights of the connections to minimize the error between the predicted output and the actual output is known as training. This is typically done using optimization algorithms like stochastic gradient descent (SGD), Adam, or RMSProp.</li><li><strong>Model Evaluation</strong>: Once trained, the performance of the neural network is evaluated using validation or test datasets to ensure it generalizes well to unseen data.</li></ul><h3><strong>Basic Components:</strong></h3><p><strong>Neurons (Nodes)</strong>:</p><ul><li>The basic computational units of a neural network.</li><li>Each neuron receives input signals, performs a computation, and then outputs a signal.</li><li>Neurons are organized into layers.</li></ul><p><strong>Weights and Biases</strong>:</p><ul><li>Weights represent the strength of the connections between neurons.</li><li>Biases are additional parameters added to neurons that allow for more flexible learning.</li><li>Both weights and biases are adjusted during training to minimize errors in the network’s predictions.</li></ul><p><strong>Activation Function:</strong></p><ul><li>Each neuron typically applies an activation function to the weighted sum of its inputs.</li><li>Activation functions introduce non-linearity to the network, enabling it to learn complex patterns and relationships in the data.</li><li>Common activation functions include sigmoid, tanh, ReLU, and softmax.</li></ul><h3><strong>Training Process</strong></h3><p>•<strong> Forward Propagation</strong>:</p><ul><li>Input data is fed into the network, and computations are performed layer by layer until the output is generated.</li><li>Each neuron computes a weighted sum of its inputs, applies an activation function, and passes the result to the next layer.</li></ul><p>•<strong> Loss Function</strong>:</p><ul><li>Measures the difference between the predicted output and the actual output.</li><li>Common loss functions include mean squared error for regression tasks and cross-entropy loss for classification tasks.</li></ul><p>•<strong> Backpropagation</strong>:</p><ul><li>The process of propagating the error backward through the network to update weights and biases.</li><li>Gradient descent algorithms are used to adjust weights and biases iteratively, minimizing the error.</li></ul><p>•<strong> Optimization Algorithms</strong>: Techniques used to optimize the learning process, such as stochastic gradient descent (SGD), Adam, RMSProp, etc.</p><h3><strong>Types of Neural Networks Simplified:</strong></h3><p>1.<strong> Feedforward Neural Networks (FNN) also known as multi-layer perceptrons (MLP)</strong>:</p><ul><li><strong>What it is</strong>: The simplest type of neural network where data moves in one direction (input → hidden layers → output).</li><li><strong>Analogy</strong>: Think of it like a conveyor belt in a factory where raw material (input) is processed step by step to produce a finished product (output).</li><li><strong>Use Case</strong>: Image recognition, simple classification tasks.</li></ul><p>2.<strong> Recurrent Neural Networks (RNN)</strong>:</p><ul><li><strong>What it is</strong>: A network with loops that lets it “remember” previous steps. Ideal for sequential data like text or time series.</li><li><strong>Analogy</strong>: Like writing a story, where each word depends on the one before it.</li><li><strong>Limitation</strong>: Struggles with long-term memory (vanishing gradient problem).</li><li><strong>Use Case</strong>: Language translation, stock price prediction.</li></ul><p>3.<strong> Convolutional Neural Networks (CNN)</strong>:</p><ul><li><strong>What it is</strong>: Special networks for processing grid-like data, such as images. Extracts features like edges, shapes, and objects.</li><li><strong>Analogy</strong>: Imagine scanning a photo with a magnifying glass, piece by piece, to analyze every detail.</li><li><strong>Use Case</strong>: Facial recognition, object detection.</li></ul><p>4.<strong> Generative Adversarial Networks (GAN)</strong>:</p><ul><li><strong>What it is</strong>: Two networks competing with each other — one (generator) creates fake data, and the other (discriminator) judges if it’s real or fake. They improve together over time.</li><li><strong>Analogy</strong>: Like a painter (generator) trying to fool an art critic (discriminator).</li><li><strong>Use Case</strong>: Generating realistic images, deepfake videos.</li></ul><p>5.<strong> Long Short-Term Memory (LSTM) &amp; Gated Recurrent Unit (GRU)</strong>:</p><ul><li><strong>What they are</strong>: Advanced versions of RNNs designed to “remember” long-term dependencies and avoid forgetting important data.</li><li><strong>Analogy</strong>: Like a notebook where you can write down key points to remember later while reading a book.</li><li><strong>Use Case</strong>: Speech recognition, long text summarization.</li></ul><h3><strong>Activation Function</strong></h3><p>Here are some commonly used activation functions and their characteristics:</p><p><strong>Step Function</strong>:</p><ul><li>Simplest activation function.</li><li>Outputs 0 if the input is below a certain threshold, and 1 otherwise.</li><li>Not commonly used in modern neural networks due to its discontinuity and inability to produce gradients for backpropagation.</li></ul><p><strong>Sigmoid Function</strong>:</p><ul><li>S-shaped curve that squashes the input values to the range [0, 1].</li><li>Smooth and continuously differentiable.</li><li>Used in the output layer of binary classification tasks because it produces probabilities.</li><li>Prone to vanishing gradient problem for very large or very small input values, leading to slow convergence during training</li></ul><p><strong>Hyperbolic Tangent (tanh) Function:</strong></p><ul><li>S-shaped curve similar to the sigmoid function but squashes the input values to the range [-1, 1].</li><li>Symmetric around the origin.</li><li>Suitable for hidden layers of neural networks because it introduces stronger non-linearity than sigmoid.</li><li>Still susceptible to the vanishing gradient problem.</li></ul><p><strong>Rectified Linear Unit (ReLU):</strong></p><ul><li>Defined as f(x) = max(0, x).</li><li>Simple and computationally efficient.</li><li>Addresses the vanishing gradient problem by avoiding saturation for positive input values.</li><li>Can suffer from the “dying ReLU” problem, where neurons become inactive (output zero) for all inputs, leading to dead neurons that do not contribute to the learning process.</li></ul><p><strong>Leaky ReLU</strong>:</p><ul><li>Variant of ReLU that allows a small, non-zero gradient for negative input values.</li><li>Helps mitigate the dying ReLU problem by preventing neurons from becoming completely inactive.</li><li>Can improve the training performance of deep neural networks.</li></ul><p><strong>Softmax Function:</strong></p><ul><li>Used in the output layer of multi-class classification tasks.</li><li>Normalizes the output vector into a probability distribution, ensuring that the sum of all output values is equal to 1.</li><li>Useful for modeling probability distributions over multiple classes.</li></ul><p>This concludes the <strong>Deep learning for Data Science</strong>. To practice what you’ve learned, you can explore the <strong>hands-on materials</strong> provided. Click the following link to access them: <a href="https://github.com/ali-datascience/mymediumfondationfordatascience/tree/main/E.%20Machine%20Learning%20%26%20Deep%20Learning">https://github.com/ali-datascience/mymediumfondationfordatascience/tree/main/E.%20Machine%20Learning%20%26%20Deep%20Learning</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d62910ddd204" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Summary of Machine Learning Theory for Data Science]]></title>
            <link>https://ngodingyo.medium.com/summary-of-machine-learning-theory-for-data-science-770a85dbc470?source=rss-451058c36a4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/770a85dbc470</guid>
            <dc:creator><![CDATA[Muhamad Ali]]></dc:creator>
            <pubDate>Thu, 09 Jan 2025 13:13:15 GMT</pubDate>
            <atom:updated>2025-01-11T11:50:38.270Z</atom:updated>
            <content:encoded><![CDATA[<p>Machine Learning (ML) is a way of teaching computers to learn and make decisions on their own by finding patterns in data, rather than being explicitly programmed to do so. It’s like giving computers the ability to “think” or “predict” based on experience, similar to how humans learn from their surroundings</p><h3><strong>Types of Machine Learning</strong></h3><p>1.<strong> Supervised Learning</strong>:</p><ul><li>The computer learns from labeled data (data with answers).</li><li>Example: Teaching a model to identify spam emails by showing it emails marked as “spam” or “not spam.”</li></ul><p>2.<strong> Unsupervised Learning</strong>:</p><ul><li>The computer looks for patterns in data without knowing the correct answers.</li><li>Example: Grouping similar customers based on their shopping habits.</li></ul><p>3.<strong> Reinforcement Learning</strong>:</p><ul><li>The computer learns by trial and error, getting rewards for correct actions and penalties for wrong ones.</li><li>Example: Teaching a robot to play chess or a self-driving car to navigate safely.</li></ul><h3><strong>Linear Regression</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*kwWd_j_-1xXDpHNKfq4w8Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aATW1xYdXEyUUl14iOFNhA.png" /></figure><h3><strong>POLYNOMIAL REGRESSION</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*fYpaJXxjEch6SQL2l8PHmQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*RNqpE-q_KK06yaFa8FtMUA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6b-tWw7exN0XgyAPqBonKQ.png" /></figure><h3>Ridge Regression</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*mYhHwnRwVnxuZeQm1NTcjA.png" /></figure><h3>Lasso Regression</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*7PVsMxwsM-uNKo3JxGvCYg.png" /></figure><h3><strong>Elastic Net Regression</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j0hBG50LJ0QvdHi3w7xovA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*umGqZIljCZwaaPmZ1hUf9A.png" /></figure><h3>Logistic Regression</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pWX9CTyJIdvKa1-KdIjwkg.png" /></figure><h3><strong>Decision Tree</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oYn1baA9TASX1uU_1dCZ4g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w9iMR9q63j_9YMVB8QS-ww.png" /></figure><h3><strong>SUPPORT VECTOR MACHINE</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tKdU_AXQ-aAsHoaFk21Ahg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*dvEJ1q2cH5fUda3ip_fcEg.png" /></figure><h3><strong>Naive Bayes</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*JBQiwnVEeiDAW2cyTgZImQ.png" /></figure><p>Naive Bayes is a classification algorithm based on Bayes’ theorem, which is a probability theory that calculates the likelihood of an event based on prior knowledge of conditions related to that event. The “naive” part of Naive Bayes comes from the assumption that features used to describe instances are independent of each other, which simplifies the calculations but may not always reflect real-world scenarios accurately. Naive Bayes is widely used in text classification, spam filtering, and other tasks due to its simplicity and efficiency, although its assumption of feature independence may not always hold in real-world scenarios.</p><p><strong>Types:</strong></p><p><strong>Gaussian Naive Bayes:</strong> Assumes that the features follow a normal distribution.</p><p><strong>Multinomial Naive Bayes: </strong>Suitable for discrete data (e.g., text data) and assumes a multinomial distribution of features.</p><p><strong>Bernoulli Naive Bayes:</strong> Appropriate for binary features, assuming a Bernoulli distribution.</p><p><strong>Even Simpler Analogy:</strong></p><p>Imagine you’re at a party with different types of food: <strong>pizza</strong>, <strong>sushi</strong>, and <strong>burgers</strong>. You want to guess which food a guest will choose based on their <strong>preferences</strong>.</p><p>Let’s say you know:</p><ul><li>70% of people at the party like <strong>pizza</strong>.</li><li>20% like <strong>sushi</strong>.</li><li>10% like <strong>burgers</strong>.</li></ul><p>Now, you meet a guest who:</p><ul><li><strong>Likes cheesy food</strong>.</li><li><strong>Prefers something fast to eat</strong>.</li></ul><p>Based on this information, you’d guess that the guest will choose <strong>pizza</strong>, because pizza is cheesy and fast to eat.</p><p><strong>How Naive Bayes Works Here:</strong></p><ol><li><strong>Look at the probability of each food</strong> (pizza, sushi, burgers).</li></ol><p>2. <strong>Check the guest’s preferences</strong> (cheesy and fast).</p><p>3. Combine the information to guess the food with the highest probability.</p><p>Even though <strong>cheese</strong> and <strong>fast</strong> might both influence their choice, Naive Bayes assumes that these preferences are <strong>independent</strong>, which makes it easier and faster to calculate.</p><p>So, you end up predicting <strong>pizza</strong> because it has the highest chance based on what you know.</p><h3><strong>Gaussian Naive Bayes (GNB)</strong></h3><p>Gaussian Naive Bayes (GNB) is a probabilistic classification algorithm that is based on Bayes’ theorem and makes the assumption that the features of a dataset are normally (Gaussian) distributed. It is a variant of the Naive Bayes algorithm, which is a simple and efficient method for classification tasks.</p><p><strong>How to determine whether the GNB algorithm is suitable for addressing your problem?</strong></p><ul><li>GNB assumes that the features are continuous and follow a Gaussian (normal) distribution. If your features are continuous and seem to have a roughly bell-shaped distribution, GNB might be a good fit.</li><li>GNB relies on the “naive” assumption that features are independent given the class. If you believe that the features in your dataset are relatively independent when considering the class labels, GNB could be appropriate</li><li>GNB tends to perform well with high-dimensional datasets. If you have a large number of features relative to the number of instances, GNB might be computationally efficient and provide reasonable results</li><li>GNB can work well with small training datasets. If you have limited labeled data for training, GNB might be a good choice compared to more complex algorithms that require larger datasets</li></ul><h3><strong>Multinomial Naive Bayes</strong></h3><p>Multinomial Naive Bayes is a probabilistic machine learning algorithm commonly used for text classification tasks. It is an extension of the Naive Bayes algorithm, designed specifically for situations where the features are discrete and represent counts, such as word frequencies in text data.</p><p><strong>How to determine whether the Multinomial Naive Bayes algorithm is suitable for addressing your problem?</strong></p><ul><li>Multinomial Naive Bayes is designed for problems where the features are discrete and represent counts, such as word frequencies in text data. If your data involves counting occurrences of specific items, Multinomial Naive Bayes might be a good choice</li><li>The algorithm is particularly well-suited for text classification tasks, such as spam detection, sentiment analysis, and topic categorization. If your problem involves analyzing and categorizing text documents, Multinomial Naive Bayes is worth considering.</li><li>The algorithm assumes that features are conditionally independent given the class label. If this assumption aligns well with your data (or if the violation of this assumption is not critical for your problem),</li><li>Multinomial Naive Bayes can be effective If your features are discrete and can be represented as counts (e.g., frequencies, occurrences), Multinomial Naive Bayes is a good match</li><li>Supervised learning algorithms like Multinomial Naive Bayes require labeled training data. Ensure that you have a sufficient amount of labeled examples for each class in your problem</li></ul><h3><strong>Bernoulli Naive Bayes</strong></h3><p><strong>Bernoulli Naive Bayes</strong> is a variation of the Naive Bayes algorithm that is used when the features (or attributes) you’re working with are <strong>binary</strong> (yes/no, true/false, 0/1).</p><p>In simple terms, it’s used when you only care whether something <strong>exists</strong> or <strong>does not exist</strong>.</p><p><strong>Simple Analogy:</strong></p><p>Imagine you’re trying to predict whether someone <strong>will like a movie</strong> based on a few characteristics about them. These characteristics are either <strong>true</strong> or <strong>false</strong> (binary):</p><ul><li><strong>Likes action movies</strong> (True/False)</li><li><strong>Likes comedy</strong> (True/False)</li><li><strong>Likes romantic movies</strong> (True/False)</li></ul><p>Now, you have a <strong>new person</strong> and you want to predict if they’ll like a movie based on their characteristics:</p><ul><li>This person <strong>likes action movies</strong>.</li><li>This person <strong>does not like comedy</strong>.</li></ul><p><strong>Bernoulli Naive Bayes</strong> works by:</p><ol><li>Looking at the probability of each characteristic (<strong>likes action</strong>, <strong>likes comedy</strong>, etc.).</li></ol><p>2. Using these to predict the likelihood of the person <strong>liking the movie</strong>.</p><p><strong>How Does It Work?</strong></p><ul><li><strong>Bernoulli Naive Bayes</strong> calculates the probability of a class (e.g., “likes the movie” or “doesn’t like the movie”) by looking at which features are <strong>true</strong> or <strong>false</strong>.</li><li>It assumes that each characteristic (like liking action movies) <strong>does not affect the others</strong>. So, it simply looks at each feature individually to calculate the probability</li></ul><h3><strong>Ensemble algorithms</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*P-8nuTEgNxi-ScsIVIjcng.png" /></figure><p>Ensemble algorithms are machine learning techniques that combine the predictions from multiple base models to produce a more robust and accurate final prediction. The basic idea behind ensemble methods is that by aggregating the predictions of multiple models, the weaknesses of individual models can be offset, resulting in better overall performance.</p><p><strong>Types of Ensemble Methods</strong></p><p>1.<strong> Bagging (e.g., Random Forest)</strong>:</p><ul><li>Multiple models work independently and make predictions. The final answer is based on a majority vote or average.</li><li><strong>Goal</strong>: Reduce errors by averaging out the mistakes.</li></ul><p>2.<strong> Boosting (e.g., AdaBoost)</strong>:</p><ul><li>Models are built one after the other. Each new model tries to correct the mistakes of the previous one.</li><li><strong>Goal</strong>: Improve accuracy by focusing on harder cases.</li></ul><p>3.<strong> Stacking</strong>:</p><ul><li>Different models make predictions, and a final model combines those predictions to make the best decision.</li><li><strong>Goal</strong>: Combine the strengths of different models.</li></ul><p><strong>Why Use Ensemble Methods?</strong></p><ul><li><strong>Better Accuracy</strong>: By combining models, we usually get a more accurate result.</li><li><strong>More Reliable</strong>: If one model makes a mistake, others might fix it.</li></ul><p>In short, ensemble algorithms make predictions stronger by combining multiple models.</p><h3><strong>Random Forest</strong></h3><p><strong>Random Forest</strong> is a popular machine learning method used for both <strong>classification</strong> (grouping things) and <strong>regression</strong> (predicting numbers). It combines many decision trees to make better and more accurate predictions.</p><p><strong>How It Works:</strong></p><p>1.<strong> Bootstrap Sampling</strong>: Random Forest creates many subsets of the original data by randomly selecting data points (with replacement). Some data points may be used more than once in each subset.</p><p>2.<strong> Building Decision Trees</strong>: For each subset, a <strong>decision tree</strong> is built. A decision tree is a model that makes decisions by splitting data based on different features. The tree considers random features at each step to keep things varied.</p><p>3.<strong> Voting or Averaging</strong>:</p><ul><li>For <strong>classification</strong> (e.g., predicting categories), each tree “votes” for a class, and the class with the most votes wins.</li><li>For <strong>regression</strong> (e.g., predicting numbers), the average of all trees’ predictions is used.</li></ul><p><strong>Advantages:</strong></p><ul><li><strong>Reduces Overfitting</strong>: Combining many trees helps avoid overfitting (where the model is too specific to the data).</li><li><strong>Robust</strong>: It handles noisy data and outliers well.</li><li><strong>Feature Importance</strong>: It can show which features are most important for making decisions.</li><li><strong>Works Well with Large Data</strong>: It handles big datasets efficiently.</li></ul><p><strong>Considerations:</strong></p><ul><li><strong>Harder to Interpret</strong>: Random Forest is not as easy to understand as a single decision tree.</li><li><strong>Computationally Expensive</strong>: It can take a lot of time and computing power, especially with many trees.</li></ul><p>In short, Random Forest improves predictions by using many decision trees, making it stronger and more reliable than a single tree.</p><h3><strong>AdaBoost</strong></h3><p><strong>What is AdaBoost?</strong></p><p><strong>AdaBoost</strong> (Adaptive Boosting) is a machine learning technique that combines multiple weak models (usually decision trees) to create a stronger model. It focuses on improving mistakes made by previous models.</p><p><strong>How It Works:</strong></p><p>1.<strong> Start with a Simple Model</strong>: AdaBoost begins with a weak model (like a simple decision tree).</p><p>2.<strong> Focus on Mistakes</strong>: After the first model makes predictions, AdaBoost looks at the mistakes it made. It then builds a second model that focuses more on these hard-to-predict cases.</p><p>3.<strong> Combine Models</strong>: All the models are combined, but models that correct mistakes are given more weight (importance). The final prediction is based on the combined result of all models.</p><p><strong>Advantages:</strong></p><ul><li><strong>Better Accuracy</strong>: AdaBoost improves weak models, making them stronger and more accurate.</li><li><strong>Handles Complex Data</strong>: It can work well with complex data and handle errors effectively.</li></ul><p><strong>Considerations:</strong></p><ul><li><strong>Sensitive to Noisy Data</strong>: If there’s a lot of noise or errors in the data, AdaBoost might not perform as well.</li><li><strong>Can Overfit</strong>: If not carefully tuned, AdaBoost can overfit the data (become too focused on specific details).</li></ul><p>In short, AdaBoost turns weak models into a strong one by focusing on correcting errors made by previous models.</p><h3><strong>Gradient Boosting Machines (GBM)</strong></h3><p><strong>Gradient Boosting Machines (GBM)</strong> is a machine learning technique that builds strong models by combining many weak models, typically decision trees. It focuses on fixing the mistakes made by previous models, similar to AdaBoost, but with a different approach.</p><p><strong>How It Works:</strong></p><ol><li><strong>Start with a Simple Model</strong>: GBM starts by training a simple decision tree to make predictions.</li></ol><p>2. <strong>Focus on Errors</strong>: After the first model makes predictions, GBM calculates the errors (or “residuals”) of the model.</p><p>3. <strong>Improve the Model</strong>: It then builds a new model that tries to correct those errors, and this new model is added to the previous one.</p><p>4. <strong>Combine Models</strong>: The predictions from all models are combined, with each new model helping to improve the accuracy of the previous ones.</p><p><strong>Advantages:</strong></p><ul><li><strong>High Accuracy</strong>: GBM often gives very accurate results by focusing on errors and improving with each step.</li><li><strong>Handles Different Data Types</strong>: It works well with both numerical and categorical data.</li></ul><p><strong>Considerations:</strong></p><ul><li><strong>Can Overfit</strong>: If not carefully tuned, GBM can overfit (become too specific to the data).</li><li><strong>Slow to Train</strong>: It can take longer to train, especially with large datasets.</li></ul><p>In short, <strong>GBM</strong> builds a strong model by correcting errors in previous models, making it powerful and accurate.</p><p><strong>In Simple Terms:</strong></p><ul><li><strong>AdaBoost</strong> focuses on <strong>correcting mistakes</strong> by giving more weight to misclassified examples.</li><li><strong>GBM</strong> focuses on <strong>reducing errors</strong> by adjusting the prediction to correct the difference between actual and predicted values.</li></ul><h3><strong>XGBoost</strong></h3><p><strong>What is XGBoost?</strong></p><ul><li><strong>XGBoost</strong> is a type of machine learning model that builds <strong>many small decision trees</strong> to make accurate predictions.</li><li>It is called <strong>“boosting”</strong> because it builds trees one after another, improving the model with each step.</li><li>It is <strong>fast</strong>, handles large data well, and often gives excellent results.</li></ul><p><strong>How Does It Work?</strong></p><p>Imagine you are guessing a friend’s favorite food:</p><ol><li><strong>First Guess</strong>: You say “Pizza” but get it wrong.</li></ol><p>2. <strong>Second Guess</strong>: You learn from the mistake and try “Burger.” Now you’re closer.</p><p>3. <strong>Third Guess</strong>: You refine your guesses based on feedback and finally say “Sushi,” which is correct.</p><p>This is similar to <strong>boosting</strong>:</p><ul><li>The model starts with a basic guess.</li><li>It keeps improving by learning from mistakes (errors) in previous steps. Eventually, it builds a series of trees that work together to give a very accurate prediction.</li></ul><p><strong>Advantages of XGBoost</strong></p><ul><li><strong>High Performance</strong>: Often achieves state-of-the-art results in machine learning competitions like Kaggle.</li><li><strong>Scalability</strong>: Can handle large datasets efficiently.</li><li><strong>Flexibility</strong>: Supports various objectives, including regression, classification, and ranking.</li><li><strong>Robustness</strong>: Handles missing values, outliers, and sparse data well.</li></ul><p><strong>Key Benefits</strong></p><ul><li><strong>Fast</strong>: Works well with big data.</li><li><strong>Accurate</strong>: Often beats other machine learning models.</li><li><strong>Handles Complex Data</strong>: Deals well with missing values and messy data</li></ul><h3><strong>CatBoost</strong></h3><p><strong>What is CatBoost?</strong></p><p><strong>CatBoost</strong> is a machine learning algorithm designed for <strong>classification</strong> and <strong>regression</strong> tasks. It is a type of <strong>Gradient Boosting Machine (GBM)</strong>, but it is particularly good at handling <strong>categorical features</strong> (data like product types, age groups, etc.) without needing preprocessing.</p><p><strong>Key Features:</strong></p><ul><li><strong>Handles Categorical Data Directly</strong>: Unlike most other algorithms, CatBoost can process categorical features directly, saving time on data preprocessing.</li><li><strong>Efficient and Fast</strong>: It uses advanced techniques to make training faster and more efficient.</li><li><strong>Robust to Overfitting</strong>: CatBoost includes built-in mechanisms to prevent overfitting, which helps in producing a more generalizable model.</li></ul><p><strong>Advantages:</strong></p><ul><li><strong>No Need for Extensive Preprocessing</strong>: CatBoost handles categorical variables automatically, so you don’t need to one-hot encode or label encode them.</li><li><strong>High Accuracy</strong>: Often provides excellent results with minimal tuning.</li><li><strong>Less Prone to Overfitting</strong>: It uses techniques like <strong>ordered boosting</strong> to reduce overfitting.</li></ul><p><strong>Considerations:</strong></p><ul><li><strong>Training Time</strong>: Though faster than some other GBMs, it can still take time to train on large datasets.</li><li><strong>Model Complexity</strong>: Can be harder to understand and tune than simpler algorithms.</li></ul><p><strong>In Short:</strong></p><p><strong>CatBoost</strong> is a powerful machine learning algorithm that shines when working with <strong>categorical data</strong>. It is efficient, accurate, and less prone to overfitting, making it great for a wide range of tasks.</p><h3><strong>Light Gradient Boosting Machine</strong></h3><p><strong>What is LightGBM?</strong></p><p><strong>LightGBM</strong> is a fast and efficient machine learning algorithm, an improved version of <strong>Gradient Boosting Machine (GBM)</strong>. It is designed for speed, memory efficiency, and handling large datasets.</p><p><strong>Key Features:</strong></p><ul><li><strong>Faster Training</strong>: Uses histograms to speed up the process.</li><li><strong>Efficient Memory Use</strong>: Works well with large datasets.</li><li><strong>Leaf-wise Growth</strong>: Builds deeper, more accurate trees.</li><li><strong>Handles Categorical Data</strong>: Can directly work with categorical features.</li></ul><p><strong>Advantages:</strong></p><ul><li><strong>Faster and more scalable</strong> than traditional GBMs.</li><li><strong>Good accuracy</strong> with fewer trees.</li><li><strong>Memory-efficient</strong>.</li></ul><p><strong>Considerations:</strong></p><ul><li><strong>Sensitive to overfitting</strong> if not tuned properly.</li><li><strong>More complex to tune</strong> than simple models.</li></ul><p>In short, <strong>LightGBM</strong> is a faster, more memory-efficient version of GBM, ideal for large datasets.</p><h3><strong>Stacking</strong></h3><p><strong>What is Stacking?</strong></p><p><strong>Stacking</strong> (or <em>Stacked Generalization</em>) is a technique that combines multiple models to make better predictions. It uses a <strong>meta-model</strong> (a final model) to learn how to combine the outputs of other models (called <strong>base models</strong>).</p><p><strong>How Does Stacking Work?</strong></p><ol><li><strong>Base Models</strong>:</li></ol><ul><li>Several models (e.g., Decision Tree, SVM, etc.) are trained on the same dataset.</li><li>These models make predictions, which act like “inputs” for the next step.</li></ul><p>2. <strong>Meta-Model</strong>:</p><ul><li>A final model (e.g., Logistic Regression, Random Forest) learns how to combine the predictions from the base models.</li><li>This final model gives the final prediction.</li></ul><p><strong>Types of Stacking</strong></p><ol><li><strong>Stacking Classifier</strong> (for classification):</li></ol><ul><li>Used when predicting categories (e.g., “Yes/No” or “A/B/C”).</li><li>Base models predict class labels (or probabilities).</li><li>The meta-model combines these predictions to decide the final class.</li></ul><p>2. <strong>Stacking Regressor</strong> (for regression):</p><ul><li>Used when predicting numbers (e.g., price, temperature).</li><li>Base models predict continuous values.</li><li>The meta-model blends these predictions to give the final output.</li></ul><p><strong>Why Use Stacking?</strong></p><ul><li>Combines the strengths of different models.</li><li>Usually improves accuracy compared to using individual models.</li></ul><p><strong>In Simple Words:</strong></p><p>Stacking is like a <strong>team project</strong>:</p><ul><li>Each team member (base model) gives their opinion (prediction).</li><li>The team leader (meta-model) combines everyone’s opinions to make a final, better decision.</li></ul><h3><strong>K-Means Clustering</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*VtLDbYsxr0yrswq5Cwc3mg.png" /></figure><p><strong>K-Means</strong> is a popular algorithm that groups data into <strong>k clusters</strong> based on similarity.</p><p>Each cluster has a <strong>centroid</strong> (center), and data points belong to the cluster with the nearest centroid.</p><p><strong>How it Works:</strong></p><ol><li><strong>Choose k</strong>: Decide the number of clusters.</li></ol><p>2. <strong>Initialize Centroids</strong>: Randomly place k centroids.</p><p>3. <strong>Assign Points</strong>: Each data point is assigned to the nearest centroid.</p><p>4. <strong>Update Centroids</strong>: Move centroids to the mean of their assigned points.</p><p>5. <strong>Repeat</strong>: Steps 3 and 4 until centroids stop moving or a set number of iterations is reached.</p><p><strong>Key Terms:</strong></p><p>•<strong> Centroid</strong>: The center of a cluster.</p><p>•<strong> Clusters</strong>: Groups of similar data points.</p><p>•<strong> Distance Metric</strong>: Usually uses Euclidean distance to calculate closeness.</p><p><strong>Strengths:</strong></p><p>• Easy to use and understand.</p><p>• Works well with large datasets.</p><p><strong>Limitations:</strong></p><p>• Requires specifying k beforehand.</p><p>• Sensitive to outliers.</p><p>• Struggles with irregular or non-linear clusters.</p><p>In short, <strong>K-Means</strong> groups similar data by finding cluster centers and iteratively improving them.</p><h3><strong>Agglomerative clustering</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*_EKmick8b2MW3g88Vs7fQg.png" /></figure><p><strong>Agglomerative clustering</strong> is a hierarchical, bottom-up clustering method. Each data point starts in its own cluster, and clusters are merged step-by-step until only one cluster remains or a stopping condition is met.</p><p><strong>How It Works:</strong></p><ol><li><strong>Start</strong>: Each data point is its own cluster.</li></ol><p>2. <strong>Calculate Distances</strong>: Measure distances between all clusters (e.g., Euclidean, Manhattan).</p><p>3. <strong>Merge Closest Clusters</strong>: Combine the two nearest clusters into one.</p><p>4. <strong>Update Distances</strong>: Recalculate distances between the new cluster and others.</p><p>5. <strong>Repeat</strong>: Continue merging until a stopping condition is met (e.g., desired number of clusters).</p><p><strong>Key Points:</strong></p><p>•<strong> Bottom-Up Approach</strong>: Starts with individual points and merges clusters.</p><p>•<strong> Distance Measures</strong>: Methods like Euclidean or cosine similarity determine closeness.</p><p>•<strong> Flexible</strong>: No need to predefine the number of clusters, unlike K-Means.</p><p>Agglomerative clustering builds a hierarchy of clusters, ideal for discovering natural groupings in data.</p><h3><strong>BIRCH</strong></h3><p><strong>BIRCH</strong> (Balanced Iterative Reducing and Clustering using Hierarchies) is a fast clustering algorithm for large datasets. It creates a <strong>CF Tree</strong> to summarize the data and clusters it efficiently, even if the data is too large to fit in memory.</p><p><strong>How BIRCH Works:</strong></p><ol><li><strong>Clustering Features (CF)</strong>: Each cluster is summarized with:</li></ol><ul><li><strong>N</strong>: Number of points.</li><li><strong>LS</strong>: Sum of the points.</li><li><strong>SS</strong>: Sum of squared points. These help calculate cluster properties (like centroids) efficiently.</li></ul><p>2. <strong>CF Tree</strong>: A balanced tree that organizes clusters:</p><ul><li><strong>Leaf Nodes</strong>: Store data summaries for clusters.</li><li><strong>Non-leaf Nodes</strong>: Store summaries of subclusters.</li><li><strong>Incremental Updates</strong>: New points update the tree without needing to reprocess all data.</li></ul><p><strong>Key Benefits:</strong></p><ul><li>Handles very large datasets.</li><li>Efficient memory use.</li><li>Balances speed and accuracy for clustering.</li></ul><p>In short, <strong>BIRCH</strong> simplifies and speeds up clustering by summarizing data into a tree-like structure.</p><h3><strong>Mean Shift</strong></h3><p><strong>Mean Shift</strong> is a clustering algorithm that finds groups (clusters) of data points by looking for areas where points are most concentrated (dense regions)/most crowded (dense) areas.</p><p><strong>How It Works (Simplified):</strong></p><ol><li><strong>Start with Data Points</strong>: Treat each data point as a starting location.</li></ol><p>2. <strong>Move Toward Dense Areas</strong>: For each point, look at its nearby points (within a certain distance, called “bandwidth”). Calculate the average position (mean) of these nearby points and move the starting point toward that mean.</p><p>3. <strong>Repeat</strong>: Keep moving points until they stop changing position (converge).</p><p>4. <strong>Group into Clusters</strong>: Points that end up in the same dense area belong to the same cluster.</p><p><strong>Key Features:</strong></p><ul><li><strong>No need to specify the number of clusters</strong> (unlike K-Means).</li><li>Works well for clusters with irregular shapes.</li><li>The <strong>bandwidth (distance radius)</strong> controls how many clusters you get:</li><li>Small bandwidth → More clusters.</li><li>Large bandwidth → Fewer clusters.</li></ul><p><strong>In Simple Terms:</strong></p><p>Mean Shift works like <strong>finding the “hottest” spots</strong> on a heatmap. It moves points toward the areas where most points are gathered until natural clusters form.</p><ul><li>Supervised learning algorithms like Multinomial Naive Bayes require labeled training data. Ensure that you have a sufficient amount of labeled examples for each class in your problem</li></ul><p>This concludes the <strong>Summary of Machine Learning Theory for Data Science</strong>. To practice what you’ve learned, you can explore the <strong>hands-on materials</strong> provided. Click the following link to access them: <a href="https://github.com/ali-datascience/mymediumfondationfordatascience/tree/main/E.%20Machine%20Learning%20%26%20Deep%20Learning">https://github.com/ali-datascience/mymediumfondationfordatascience/tree/main/E.%20Machine%20Learning%20%26%20Deep%20Learning</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=770a85dbc470" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Preprocessing Techniques That Data Scientists Must Know]]></title>
            <link>https://ngodingyo.medium.com/data-preprocessing-techniques-that-data-scientists-must-know-ce182f338b7b?source=rss-451058c36a4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce182f338b7b</guid>
            <dc:creator><![CDATA[Muhamad Ali]]></dc:creator>
            <pubDate>Fri, 03 Jan 2025 06:37:43 GMT</pubDate>
            <atom:updated>2025-01-03T06:37:43.200Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to the tutorial of the “<strong>Foundation for Data Science</strong>” series!. In this article series, we will cover data science with the following outline:</p><ol><li><strong>Introduction to Data Science:</strong> A framework that guides Data Science projects.</li><li><strong>Big Data</strong>: Understanding large-scale data and how to process it.</li><li><strong>Python for Data Science</strong>: Why Python is the go-to language in this field.</li><li><strong>Fundamentals of Statistics</strong>: The statistical foundations that power data analysis.</li><li><strong>Exploratory Data Analysis (EDA)</strong>: The art of understanding data before building models.</li><li><strong>Data Preprocessing</strong>: Preparing and cleaning data for analysis.</li><li><strong>Machine Learning</strong>: Algorithms that make machines intelligent.</li><li><strong>Deep Learning</strong>: Advanced technology driving artificial intelligence.</li><li><strong>Natural Language Processing (NLP) &amp; LLMs</strong>: Processing human language using cutting-edge tools like Large Language Models (LLMs).</li></ol><p>Currently, we are at the <strong>Data Preprocessing </strong>stage. Make sure to follow this article series from the beginning for a comprehensive understanding!</p><p>So in this article, we will walk through the basic concepts of <strong>Data Preprocessing</strong> that are fundamental for diving deeper into data science. Whether you’re a beginner or looking to refresh your knowledge, this guide will help you build a strong foundation for the exciting world of data science.</p><p>For those who haven’t read previous post, please click the following link. <a href="https://ngodingyo.medium.com/exploratory-data-analysis-eda-for-data-science-d3e40bd81673">https://ngodingyo.medium.com/exploratory-data-analysis-eda-for-data-science-d3e40bd81673</a>. The article discusses about <strong>EDA</strong> for data science..</p><p>So , let’s get started!</p><p><strong>Data preprocessing </strong>is an essential phase in any data analysis or machine learning project. It involves transforming raw, unstructured data into a clean, structured, and analyzable format. This process ensures the data is accurate, consistent, and ready for insightful analysis or effective modeling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*KhmCmVx6z8eC72NGxgV7oQ.png" /></figure><h3>Data Cleansing</h3><p><strong>Data cleansing</strong>, also known as <strong>data cleaning</strong>, is the process of identifying and correcting errors or inconsistencies in data to improve its quality and reliability. The goal of data cleansing is to ensure that the dataset is accurate, consistent, complete, and ready for analysis or modeling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*TftCbee1xOZ-KuHiwDvStQ.png" /></figure><p><strong>Key Aspects of Data Cleansing:</strong></p><ol><li><strong>Error Detection</strong></li></ol><ul><li>Identifying inaccuracies, such as typos, duplicates, or misformatted entries.</li></ul><p>2. <strong>Handling Missing Data</strong></p><ul><li>Filling missing values using techniques like mean, median, mode, or predictive methods.</li><li>Removing rows or columns with excessive missing data.</li></ul><p>3. <strong>Removing Duplicates</strong></p><ul><li>Eliminating repeated entries to prevent redundancy and bias.</li></ul><p>4. <strong>Resolving Inconsistencies</strong></p><ul><li>Standardizing formats (e.g., “Yes” vs. “Y”).</li><li>Harmonizing units of measurement or date formats.</li></ul><p>5. <strong>Outlier Management</strong></p><ul><li>Detecting and addressing data points that deviate significantly from the norm.</li></ul><p>6. <strong>Validation</strong></p><ul><li>Verifying data against predefined rules or criteria to ensure it meets quality standards.</li></ul><h3>Dimensionality reduction</h3><p><strong>Dimensionality reduction</strong> is a data preprocessing technique used to reduce the number of features (dimensions) in a dataset while retaining as much relevant information as possible. It simplifies data, making it easier to visualize, process, and analyze, particularly for large datasets with many variables.</p><p><strong>Why Dimensionality Reduction is Important:</strong></p><ol><li><strong>Curse of Dimensionality</strong>: As the number of features increases, the dataset becomes sparse, and the performance of machine learning algorithms can degrade.</li></ol><p>2. <strong>Improved Model Performance</strong>: Reducing irrelevant or redundant features can enhance computational efficiency and model accuracy.</p><p>3. <strong>Better Visualization</strong>: High-dimensional data (e.g., 10+ features) can be challenging to visualize. Dimensionality reduction allows data to be plotted in 2D or 3D for better interpretation.</p><p>4. <strong>Noise Reduction</strong>: It eliminates redundant features, reducing noise and improving data quality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*E7lhtECPpMYpGKwIKXbCKA.png" /></figure><h3>What is Feature Engineering?</h3><p><strong>Feature engineering</strong> is the process of selecting, modifying, or creating new features (variables) from raw data to improve the performance of a machine learning model. It’s about making the data more meaningful for the model by emphasizing the patterns or information that matter most</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*ABnHcKphx3fE6cl4ubZo_g.png" /></figure><p><strong>Why is Feature Engineering Important?</strong></p><ul><li><strong>Better Model Performance</strong>: The right features make it easier for the model to learn and make accurate predictions.</li><li><strong>Simplifies Complex Data</strong>: Converts raw data into a structured format that’s easier for algorithms to understand.</li><li><strong>Highlights Hidden Insights</strong>: Extracts important relationships or trends in the data.</li></ul><p><strong>Examples of Feature Engineering:</strong></p><ol><li><strong>Creating New Features</strong></li></ol><ul><li>Add meaningful variables based on existing ones.<br> Example: From DATE, create features like month, day, weekday, or is_weekend.</li></ul><p>2. <strong>Transforming Features</strong></p><ul><li>Apply mathematical transformations to make data easier to model.<br> Example: Use the logarithm of income to reduce the effect of outliers.</li></ul><p>3. <strong>Encoding Categorical Data</strong></p><ul><li>Convert text categories into numbers so the model can understand them.<br> Example: Transform Gender = {Male, Female} into {0, 1}.</li></ul><p>4. <strong>Handling Missing Values</strong></p><ul><li>Fill missing data with a meaningful value (e.g., average, median) or a placeholder.</li></ul><p>5.<strong>Scaling Features</strong></p><ol><li>Standardize or normalize numeric features to bring them to a similar scale.<br> Example: Scale age from 0 to 1 so that it doesn’t dominate other features.</li></ol><p>6. <strong>Combining Features</strong></p><ul><li>Create interactions or composite features.<br> Example: Multiply height and weight to create a new feature like BodyMassIndex</li></ul><h3>What is Sampling Data?</h3><p><strong>Sampling data</strong> is the process of selecting a smaller, representative subset of data from a larger dataset or population. The goal of sampling is to analyze the subset to draw conclusions about the whole dataset or population without processing the entire data, which can be time-consuming or impractical.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*13Fmv5yFNpg7_pO4vrpWSg.png" /></figure><p><strong>Types of Sampling:</strong></p><ol><li><strong>Random Sampling</strong>:<br> Every data point has an equal chance of being selected.<br> Example: Picking 100 names at random from a list of 10,000 customers.</li></ol><p>2. <strong>Systematic Sampling</strong>:<br> Data is selected at regular intervals.<br> Example: Choosing every 10th record in a dataset.</p><p>3. <strong>Stratified Sampling</strong>:<br> The data is divided into groups (strata), and samples are taken proportionally from each group.<br> Example: If a dataset has 70% females and 30% males, the sample should reflect the same ratio.</p><p>4. <strong>Cluster Sampling</strong>:<br> The data is divided into clusters, and a few clusters are randomly selected for analysis.<br> Example: Analyzing sales from a few randomly chosen stores out of all branches.</p><p>5. <strong>Convenience Sampling</strong>:<br> Selecting data points that are easiest to access.<br> Example: Using the first 100 entries in a dataset.</p><h3>What is Data Transformation?</h3><p><strong>Data transformation</strong> is the process of changing data into a better format so it’s easier to work with or analyze. It’s like cleaning and organizing messy information so that it makes sense and can be used effectively in tasks like creating graphs, running machine learning models, or finding patterns</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*OvQZm-1RM8vbIU7yUeFTiw.png" /></figure><p><strong>Why is Data Transformation Important?</strong></p><ol><li><strong>Makes Data Easier to Use</strong>: Raw data can be messy or hard to understand. Transformation organizes it.</li></ol><p>2. <strong>Helps Find Patterns</strong>: Changing the data can reveal trends or relationships.</p><p>3. <strong>Improves Accuracy</strong>: Clean and well-prepared data helps models make better predictions.</p><p><strong>Examples of Data Transformation:</strong></p><ol><li><strong>Scaling</strong>:</li></ol><ul><li>Changing numbers to fit within a range.</li><li>Example: Instead of scores like 55, 70, and 90, transform them into 0.55, 0.7, and 0.9.</li></ul><p>2. <strong>Converting Text to Numbers</strong>:</p><ul><li>Changing words into numbers so computers can understand them.</li><li>Example: Replace “Male” with 1 and “Female” with 0.</li></ul><p>3. <strong>Grouping Data</strong>:</p><ul><li>Combine similar data into categories.</li><li>Example: Instead of listing exact ages, group people as “young,” “middle-aged,” and “senior.”</li></ul><p>4. <strong>Fixing Dates</strong>:</p><ul><li>Create useful info like “How many years ago did they join?” from a date like “2015–06–20.”</li></ul><p>5. <strong>Handling Big Numbers</strong>:</p><ul><li>Use formulas to shrink large numbers into smaller ones.</li><li>Example: Instead of 100,000 and 1,000,000, transform them into 2 and 3 (log scale).</li></ul><h3>What is Imbalanced Data?</h3><p><strong>Imbalanced data</strong> happens when the categories in your dataset are not represented equally. In other words, one class or category has a lot more data points (examples) than the other(s).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*S6TpLA_nUCUAY9iF9-DWng.png" /></figure><p><strong>Why is Imbalanced Data a Problem?</strong></p><p>When the data is imbalanced, machine learning models tend to be biased toward the more common class. The model might become very good at predicting the majority class but fail to predict the minority class (the one with fewer data points)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aGrwMrKPLx4N4IuRTW1g8w.png" /></figure><p><strong>How to Handle Imbalanced Data?</strong></p><ol><li><strong>Resampling</strong>:</li></ol><ul><li><strong>Upsampling</strong>: Add more examples of the minority class.</li><li><strong>Downsampling</strong>: Reduce the number of examples from the majority class.</li></ul><p>2. <strong>Use Different Metrics</strong>:<br> Instead of just accuracy, use metrics like <strong>precision</strong>, <strong>recall</strong>, or <strong>F1 score</strong> to evaluate the model’s performance on imbalanced data.</p><p>3. <strong>Use Specialized Algorithms</strong>:<br> Some algorithms are designed to handle imbalanced data better.</p><p>This concludes the introduction of <strong>Data Preprocessing</strong> for Data Science. To practice what you’ve learned, you can explore the <strong>hands-on materials</strong> provided. Click the following link to access them: <a href="https://github.com/ali-datascience/mymediumfondationfordatascience/blob/main/D.%20Data%20Preprocessing/Data%20Preprocessing.ipynb">https://github.com/ali-datascience/mymediumfondationfordatascience/blob/main/D.%20Data%20Preprocessing/Data%20Preprocessing.ipynb</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce182f338b7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploratory Data Analysis (EDA) for Data Science]]></title>
            <link>https://ngodingyo.medium.com/exploratory-data-analysis-eda-for-data-science-d3e40bd81673?source=rss-451058c36a4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3e40bd81673</guid>
            <dc:creator><![CDATA[Muhamad Ali]]></dc:creator>
            <pubDate>Thu, 02 Jan 2025 14:35:17 GMT</pubDate>
            <atom:updated>2025-01-02T14:35:17.708Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to the next part of the “<strong>Foundation for Data Science</strong>” series!. In this article series, we will cover data science with the following outline:</p><ol><li><strong>Introduction to Data Science:</strong> A framework that guides Data Science projects.</li><li><strong>Big Data</strong>: Understanding large-scale data and how to process it.</li><li><strong>Python for Data Science</strong>: Why Python is the go-to language in this field.</li><li><strong>Fundamentals of Statistics</strong>: The statistical foundations that power data analysis.</li><li><strong>Exploratory Data Analysis (EDA)</strong>: The art of understanding data before building models.</li><li><strong>Data Preprocessing</strong>: Preparing and cleaning data for analysis.</li><li><strong>Machine Learning</strong>: Algorithms that make machines intelligent.</li><li><strong>Deep Learning</strong>: Advanced technology driving artificial intelligence.</li><li><strong>Natural Language Processing (NLP) &amp; LLMs</strong>: Processing human language using cutting-edge tools like Large Language Models (LLMs).</li></ol><p>Currently, we are at the <strong>Exploratory Data Analysis (EDA)</strong> stage. Make sure to follow this article series from the beginning for a comprehensive understanding!</p><p>So in this article, we will walk through the basic concepts of <strong>Exploratory Data Analysis (EDA)</strong> that are fundamental for diving deeper into data science. Whether you’re a beginner or looking to refresh your knowledge, this guide will help you build a strong foundation for the exciting world of data science.</p><p>For those who haven’t read previous post, please click the following link. <a href="https://ngodingyo.medium.com/fundamental-of-statistics-for-data-science-7bba5172d0d8">https://ngodingyo.medium.com/python-for-data-science-part-1-08324637f85f</a> . The article discusses statistics as a foundation for data science..</p><p>Let’s get started!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*RgfXcz1b-pctYWyiYsufCg.png" /></figure><p><strong>Exploratory Data Analysis (EDA) </strong>is a crucial technique in data analysis, allowing us to gain a deep understanding of the data at hand. Simply put, it involves uncovering the insights hidden within the data we’re working with.</p><p><strong>The main objectives of the EDA are:</strong></p><p>1. Understand the Dataset</p><p>2. Identify Data Quality Issues</p><p>3. Explore Variable Relationships</p><p>4. Visualize Data</p><p>5. Extract Patterns and Trends</p><p>6. Guide Feature Selection</p><p>7. Inform Next Steps (Provide insights for preprocessing and modeling decisions)</p><h3><strong>Why is EDA Important?</strong></h3><ol><li><strong>Understanding Data</strong>: Helps uncover data distributions, missing values, and unusual observations.</li></ol><p>2. <strong>Improving Data Quality</strong>: Identifies and addresses issues like duplicates, errors, or outliers.</p><p>3. <strong>Discovering Patterns</strong>: Reveals correlations, trends, and relationships among variables.</p><p>4. <strong>Guiding Feature Selection</strong>: Determines which features are most relevant for analysis or modeling.</p><p>5. <strong>Hypothesis Testing</strong>: Generates hypotheses about the data and business problems.</p><h3><strong>Key Steps in EDA</strong></h3><ol><li><strong>Data Collection and Overview</strong></li></ol><ul><li>Import and inspect the data structure.</li><li>Summarize data types, size, and content.</li></ul><p>2. <strong>Univariate Analysis</strong></p><ul><li>Examine individual variables using descriptive statistics (mean, median, mode, etc.).</li><li>Visualize distributions using histograms, box plots, and density plots.</li></ul><p>3. <strong>Bivariate Analysis</strong></p><ul><li>Explore relationships between two variables through scatter plots, correlation matrices, and cross-tabulations.</li></ul><p>4. <strong>Multivariate Analysis</strong></p><ul><li>Analyze complex relationships among multiple variables using techniques like pair plots or principal component analysis (PCA).</li></ul><p>5. <strong>Handling Missing Data</strong></p><ul><li>Identify and address missing values using imputation or removal techniques.</li></ul><p>6. <strong>Outlier Detection</strong></p><ul><li>Spot unusual data points using box plots, z-scores, or IQR (Interquartile Range).</li></ul><p>7. <strong>Data Visualization</strong></p><ul><li>Use visual tools like bar charts, heatmaps, and line graphs to convey findings effectively.</li></ul><h3><strong>Techniques Used in EDA</strong></h3><ul><li><strong>Descriptive Statistics</strong>: To summarize data (e.g., mean, standard deviation, skewness).</li><li><strong>Data Visualization</strong>: Using libraries like Matplotlib, Seaborn, or Plotly for clear visual representations.</li><li><strong>Correlation Analysis</strong>: To understand relationships and multicollinearity among variables.</li></ul><p>This concludes the introduction of Exploratory Data Analysis for Data Science. To practice what you’ve learned, you can explore the <strong>hands-on materials</strong> provided. Click the following link to access them: <a href="https://github.com/ali-datascience/mymediumfondationfordatascience/tree/main/C.%20EDA">https://github.com/ali-datascience/mymediumfondationfordatascience/tree/main/C.%20EDA</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3e40bd81673" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fundamental of Statistics for Data Science]]></title>
            <link>https://ngodingyo.medium.com/fundamental-of-statistics-for-data-science-7bba5172d0d8?source=rss-451058c36a4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7bba5172d0d8</guid>
            <dc:creator><![CDATA[Muhamad Ali]]></dc:creator>
            <pubDate>Mon, 30 Dec 2024 13:31:02 GMT</pubDate>
            <atom:updated>2024-12-30T14:00:35.917Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>WHY DO WE NEED STATISTICS?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*23VVOAxKnlupi-MqF7HoQw.png" /></figure><p><strong>GENERAL DEFINITION OF STATISTICS</strong></p><p>widely known as “a set of methods for collecting, summarizing, analyzing, and interpreting data.</p><p>● As a tool for describing information<br> ● A means for analysis and drawing conclusions<br> ● A tool for decision-making</p><p>Statistics can provide descriptive insights to obtain information.</p><h3><strong>POPULATION AND SAMPLE</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*rxyiOHKZm9k5M5gxszvHDA.png" /></figure><p>A population is referred to as the universe or the entire set of people or objects of interest.</p><p>A sample is a smaller subset of people or objects within the population.</p><p>A sample is considered representative if its members tend to share similar characteristics with the population.</p><h3><strong>STATISTICAL METHODS</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*e0OSA3UranGal3D6Aj4gOg.png" /></figure><p><strong>Descriptive Statistics VS Inferential</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r-ncWDqDvXPCJ4ZiaIaMmw.png" /></figure><p><strong>Measure of Central Tendency</strong></p><p>is a statistics method that picture central value from dataset.</p><p>This measure will give an information about most common value or average value from dataset.</p><p><strong>Mean</strong><br> The mean is what we usually think of as the average.</p><p><strong>Mode</strong><br> The mode is the number that appears the most often in a dataset. There can be more than one mode if multiple numbers appear with the same highest frequency.</p><p><strong>Median</strong><br> The median is the middle number in a sorted list of numbers. If the dataset has an odd number of values, the median is the number in the center. If the dataset has an even number of values, the median is the average of the two middle numbers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/291/1*i0jpexvKFNYxoyWMGjyjaQ.png" /></figure><p><strong>Measure of variability</strong> is a statistics method to describe how sparse is the data scatter from the central</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/248/1*wXG9QssC__40SHGMWhlU-g.png" /></figure><p>This metrics is important because it will help us to describe how consistent the data and how unbiassed data to identified outlier.</p><ol><li><strong>Range</strong><br> The range is the difference between the highest and lowest values in a dataset. It shows how spread out the data is.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/1*Lt3xzqtrXlT1xRIEkQq44A.png" /></figure><p>2.<strong>Variance</strong><br> Variance measures how much the values in a dataset differ from the mean (average). It gives you an idea of how spread out the data points are. A high variance means the data is spread out, and a low variance means the data is close to the mean.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*Pz92eMN6WoyBp2SXW1hdbA.png" /></figure><p>3.<strong>Standard Deviation</strong><br> Standard deviation is simply the square root of the variance. It also tells you how spread out the data is but in the same units as the original data, making it easier to understand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*D289LKtIQLHhGnZXVBmXlQ.png" /></figure><p>4. <strong>The</strong> <strong>Interquartile Range (IQR)</strong> is a measure of variability that describes the range within which the central 50% of data values lie. It is the difference between the third quartile (Q3) and the first quartile (Q1)</p><h3><strong>CENTRAL LIMIT THEOREM (CLT)</strong></h3><p>The Central Limit Theorem shows that as the number of randomly taken samples increases, the distribution of possible locations of the sample means will follow a normal distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cUiVOOr1NGUvU4yxO-1JUw.png" /></figure><h4><strong>Skewness</strong></h4><p><strong>Skewness</strong> is a statistical measure that describes the degree of asymmetry in a dataset’s distribution around its mean. It provides insight into the shape of the data and how much it deviates from a perfectly symmetric bell curve (normal distribution).</p><p><strong>Why it matters:</strong></p><ul><li>If data is skewed, it might not follow the normal “bell curve” shape.</li><li>This can affect things like averages or predictions, so you might need to adjust your analysis.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*Q0LCA5qjzTH6kGyUNl2c_g.png" /></figure><h3><strong>Kurtosis</strong></h3><p>Kurtosis refers to the degree of presence of outliers in the distribution. In statistics, kurtosis is a statistical measure, whether the data is <strong>heavy-tailed</strong> or <strong>light-tailed</strong> in a <em>normal distribution</em>.</p><p><strong>Types of Kurtosis:</strong></p><ol><li><strong>Mesokurtic</strong> (normal kurtosis <em>, kurt = </em>0):</li></ol><ul><li>This is the kurtosis of a normal distribution.</li><li>Example: A perfect bell curve.</li></ul><p>2. <strong>Leptokurtic</strong> (high kurtosis<em>, kurt &gt; </em>0):</p><ul><li>The graph has a sharp peak and heavy tails.</li><li>Example: More extreme test scores (many very high and very low scores).</li></ul><p>3. <strong>Platykurtic</strong> (low kurtosis<em>, kurt &lt; </em>0):</p><ul><li>The graph is flat with light tails.</li><li>Example: Most test scores are close to the average, with few extremes.</li></ul><p>In the context of <strong>kurtosis</strong>, <strong>0</strong> refers to the <strong>excess kurtosis</strong> of a dataset that has the same shape as a normal distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*1V1aCQobA2isjQ7jgdVXug.png" /></figure><h3><strong>Visualization</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IElkNhNYoADee8Bv0bCL_w.png" /></figure><h3><strong>Distribution of discrete random variables</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*onFKbxgNxOQ1YxLN68wpUg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WQ2vWFJU6kRF3J9yh7KYHQ.png" /></figure><h4><strong>Poisson Distribution</strong></h4><p>The <strong>Poisson distribution</strong> is a discrete probability distribution used to model the number of times an event occurs within a fixed interval of time, space, or other dimensions (e.g., area, volume), under the assumption that these events occur with a known constant rate and independently of each other</p><p><strong>Examples of Poisson Distribution Applications:</strong></p><ol><li>The number of customer arrivals at a store per hour.</li></ol><p>2. The number of emails received per day.</p><p>3. The number of accidents at a traffic intersection in a week.</p><p>4. The number of defects in a batch of products.</p><h4><strong>Binomial Distribution</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*6z1bQvwLq-MANCMnTtghVA.png" /></figure><p>The <strong>Binomial distribution</strong> is a discrete probability distribution that models the number of successes in a fixed number of independent trials of a binary (yes/no or success/failure) experiment, where the probability of success remains constant for each trial.</p><p><strong>Key Characteristics of Binomial Distribution:</strong></p><ol><li><strong>Discrete Nature</strong>: It deals with countable outcomes (e.g., number of heads in 10 coin flips).</li></ol><p>2. <strong>Two Possible Outcomes</strong>: Each trial results in one of two outcomes, typically called “success” or “failure.”</p><p><strong>Examples of Binomial Distribution Applications:</strong></p><ol><li>The number of heads in 10 coin flips, where p=0.5.</li></ol><p>2. The number of defective items in a batch of 100 if the probability of a defect is 2%.].</p><p>3. The number of correct answers on a multiple-choice test with 5 questions, where each question has a 25% chance of being answered correctly.</p><h4><strong>Bernoulli Distribution</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z3ikVz5gt5Ld8s-5KNt03g.png" /></figure><p>The <strong>Bernoulli distribution</strong> is the simplest discrete probability distribution. It models a single experiment or trial with exactly two possible outcomes: <em>success</em> (1) and <em>failure</em> (0).</p><p><strong>Key Characteristics of Bernoulli Distribution:</strong></p><p>1.<strong> Single Trial</strong>: The Bernoulli distribution applies to a single event or trial.</p><p>2.<strong> Two Outcomes</strong>: The outcomes are binary:</p><ul><li>111: Success</li><li>000: Failure</li></ul><p><strong>Examples of Bernoulli Distribution Applications:</strong></p><p>1. Tossing a coin once (success = heads, failure = tails).</p><p>2. A student passes or fails a test (1 = pass, 0 = fail).</p><h4><strong>Geometric Distribution</strong></h4><p>The <strong>Geometric distribution</strong> is a discrete probability distribution that models the number of <em>trials</em> required to get the first success in a sequence of independent and identically distributed Bernoulli trials. Each trial has two possible outcomes: success or failure, and the probability of success is constant across trials.</p><p><strong>Key Characteristics of Geometric Distribution:</strong></p><ol><li><strong>Two Outcomes</strong>: Each trial results in success (111) or failure (000).</li></ol><p>2. <strong>Focus on First Success</strong>: The random variable XXX represents the number of trials needed to achieve the first success.</p><p><strong>Examples of Geometric Distribution Applications:</strong></p><ol><li>The number of coin flips until the first heads (where ppp is the probability of heads).</li></ol><p>2. The probability of rolling a 3 for the first time with a standard six-sided die across 25 rolls</p><p>3. The number of customer calls until a sale is made (where ppp is the probability of making a sale in each call).</p><p>4. The number of attempts needed to correctly guess a password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*g5_Rp8S-vh8Bxi70nZCR5w.png" /></figure><h4>Hypergeometric Distribution</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w2QSsbsLKoVVqMICnhw1tw.png" /></figure><h3><strong>Distribution of Continuous Random Variables</strong></h3><p>A <strong>distribution of continuous random variables</strong> refers to the probability distribution that describes the likelihood of a continuous random variable taking on any value within a certain range. Unlike discrete random variables, which can only take specific, countable values, continuous random variables can take on <strong>infinitely many values</strong> within a given interval. These values are typically represented by real numbers</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*Uu_T_sCi_QPSSjZvTGZoWQ.png" /></figure><h4><strong>Normal Distribution</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*mr72vJkuVzgCSpr7UNORAA.png" /></figure><p>The <strong>Normal Distribution</strong>, also known as the <strong>Gaussian distribution</strong>, is one of the most important and widely used probability distributions in statistics. It describes how data points are distributed around a central value, with most of the data points clustering around the mean (average), and fewer points appearing as you move further away from the mean.</p><p><strong>Key Characteristics of Normal Distribution:</strong></p><p>1.<strong>Symmetry</strong>: The normal distribution is <strong>symmetric</strong> around its mean, meaning the left and right sides of the distribution are mirror images of each other.</p><p>2.<strong>Bell-shaped curve</strong>: The graph of a normal distribution forms a bell-shaped curve, with the peak at the mean of the data.</p><p>3.<strong>Mean, Median, and Mode</strong>: In a perfectly normal distribution, the mean, median, and mode are all the same and occur at the center of the distribution.</p><h3><strong>MARGIN OF ERROR</strong></h3><p>The <strong>Margin of Error (MoE)</strong> is a measure used in statistics to show the range of uncertainty in a survey or experiment. It indicates how much the results from a sample (like a poll or survey) might differ from the true value in the entire population.</p><p><strong>Simple Definition:</strong></p><p>The <strong>Margin of Error</strong> tells you how much you can expect your sample results to differ from the actual population value due to sampling</p><p><strong>Key Points:</strong></p><ol><li><strong>Smaller MoE = More Precision</strong>:</li></ol><ul><li>A smaller margin of error means your results are more accurate.</li><li>A larger margin of error means more uncertainty.</li></ul><p>2. <strong>Why Does It Exist?</strong></p><ul><li>Surveys or experiments can’t include everyone (the whole population).</li><li>Instead, they use a sample, which introduces some uncertainty.</li></ul><p>3. <strong>Factors Affecting the Margin of Error</strong>:</p><ul><li><strong>Sample Size</strong>: Larger samples reduce the margin of error.</li><li><strong>Confidence Level</strong>: Higher confidence (e.g., 95% or 99%) increases the margin of error.</li><li><strong>Variability in Data</strong>: More variation in the data leads to a larger margin of error.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gVxWUY4MCSQM9MZOgXhYOw.png" /></figure><h3><strong>Confidence interval</strong></h3><p>A <strong>Confidence Interval (CI)</strong> is a range of values that is likely to contain the true value of a population parameter (like a mean or proportion). It gives an estimate of where the true value lies, based on sample data, with a certain level of confidence (e.g., 95%)</p><p><strong>Example:</strong></p><p>•A survey finds that the average height of students is <strong>170 cm</strong>, and the 95% confidence interval is <strong>(167 cm, 173 cm)</strong>.</p><ul><li>This means: <strong>“We are 95% confident that the true average height of all students is between 167 cm and 173 cm.”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*r09jSnn0kKNzeHg4V0dLig.png" /></figure><h3><strong>Z-SCORE AND T-SCORE</strong></h3><p><strong>Z-Score</strong> and <strong>T-Score</strong> are measures used in statistics to determine how far a data point or sample statistic is from the mean, measured in terms of standard deviations. The choice between the two depends on the situation, such as the size of your sample and whether the population standard deviation is known.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LJyj-sWVWAypgIeAxdV2-g.png" /></figure><h3><strong>HYPOTHESIS TESTING</strong></h3><p><strong>Hypothesis Testing</strong> is a statistical method used to make decisions or inferences about a population based on sample data. It helps you determine whether an assumption (<strong>hypothesis</strong>) about a population parameter is supported by the evidence in the data.</p><p><strong>Basic Idea</strong></p><ol><li><strong>Start with a claim</strong>:</li></ol><ul><li>Example: “The average height of students in a class is 170 cm.”</li></ul><p>2. <strong>Collect data</strong>:</p><ul><li>Measure the heights of a random sample of students.</li></ul><p>3. <strong>Decide if the data supports or contradicts the claim</strong>:</p><ul><li>Use statistical tools to check if the sample data aligns with the claim or if it’s significantly different.</li></ul><p><strong>Key Terms in Hypothesis Testing</strong></p><ol><li><strong>Null Hypothesis (H0H_0H0​)</strong>:</li></ol><ul><li>The default assumption or “no effect” statement.</li><li>Example: “The average height of students is 170 cm.”</li></ul><p>2. <strong>Alternative Hypothesis (HaH_aHa​)</strong>:</p><ul><li>The opposite of the null hypothesis, representing a new claim.</li><li>Example: “The average height of students is NOT 170 cm.”</li></ul><p>3. <strong>Significance Level (α\alphaα)</strong>:</p><ul><li>The threshold for deciding whether to reject H0H_0H0​.</li><li>Common values: 0.050.050.05 (5%) or 0.010.010.01 (1%).</li></ul><p>4. <strong>P-Value</strong>:</p><ul><li>The probability of observing the sample data (or more extreme) if H0H_0H0​ is true.</li><li>If <strong>p-value &lt; α\alphaα</strong>: Reject <strong>Null Hypothesis </strong>H0H_0H0​.</li></ul><p>5. <strong>Test Statistic</strong>:</p><ul><li>A value calculated from the sample data used to make a decision.</li><li>Examples: Z-score, T-score.</li></ul><p><strong>Steps in Hypothesis Testing</strong></p><ol><li><strong>State the hypotheses</strong>:</li></ol><ul><li>Null hypothesis (H0H_0H0​): “The average height is 170 cm.”</li><li>Alternative hypothesis (HaH_aHa​): “The average height is NOT 170 cm.”</li></ul><p>2. <strong>Set the significance level (α\alphaα)</strong>:</p><ul><li>Example: α=0.05\alpha = 0.05α=0.05 (5%).</li></ul><p>3. <strong>Collect and analyze sample data</strong>:</p><ul><li>Calculate the test statistic (e.g., Z-score or T-score).</li></ul><p>4. <strong>Calculate the p-value</strong>:</p><ul><li>The smaller the p-value, the stronger the evidence against H0H_0H0​.</li></ul><p>5. <strong>Make a decision</strong>:</p><ul><li>If p-value&lt;α{p-value} Reject H0H_0H0​ (evidence supports HaH_aHa​).</li><li>If p-value≥α {p-value} : Fail to reject H0H_0H0​ (not enough evidence to support HaH_aHa​).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BaAG9SUNcDi_Bw8-gicEFA.png" /></figure><p>This concludes the introduction of statistic for Data Science. To practice what you’ve learned, you can explore the <strong>hands-on materials</strong> provided. Click the following link to access them: <a href="https://github.com/ali-datascience/mymediumfondationfordatascience/tree/main/B.%20Statistics">https://github.com/ali-datascience/mymediumfondationfordatascience/tree/main/B.%20Statistics</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7bba5172d0d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python for Data Science Part 2]]></title>
            <link>https://ngodingyo.medium.com/python-for-data-science-part-2-f53d939825ad?source=rss-451058c36a4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f53d939825ad</guid>
            <dc:creator><![CDATA[Muhamad Ali]]></dc:creator>
            <pubDate>Sun, 29 Dec 2024 04:09:23 GMT</pubDate>
            <atom:updated>2024-12-29T04:09:23.778Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to the second part of the “<strong>Introduction to Python for Data Science</strong>” series! Python has become one of the most popular and powerful programming languages in the field of data science. Its simplicity, versatility, and vast ecosystem of libraries make it the perfect tool for anyone looking to get started with data analysis, machine learning, and artificial intelligence.</p><p>In this article series, we will cover data science with the following outline:</p><ol><li><strong>Introduction to Data Science:</strong> A framework that guides Data Science projects.</li><li><strong>Big Data</strong>: Understanding large-scale data and how to process it.</li><li><strong>Python for Data Science</strong>: Why Python is the go-to language in this field.</li><li><strong>Fundamentals of Statistics</strong>: The statistical foundations that power data analysis.</li><li><strong>Exploratory Data Analysis (EDA)</strong>: The art of understanding data before building models.</li><li><strong>Data Preprocessing</strong>: Preparing and cleaning data for analysis.</li><li><strong>Machine Learning</strong>: Algorithms that make machines intelligent.</li><li><strong>Deep Learning</strong>: Advanced technology driving artificial intelligence.</li><li><strong>Natural Language Processing (NLP) &amp; LLMs</strong>: Processing human language using cutting-edge tools like Large Language Models (LLMs).</li></ol><p>Currently, we are at the <strong>Python for Data Science</strong> stage. Make sure to follow this article series from the beginning for a comprehensive understanding!</p><p>So in this article, we will walk through the basic concepts of Python that are fundamental for diving deeper into data science. Whether you’re a beginner or looking to refresh your knowledge, this guide will help you build a strong foundation for the exciting world of data science.</p><p>For those who haven’t read Python for Data Science Part 1, please click the following link. <a href="https://ngodingyo.medium.com/python-for-data-science-part-1-08324637f85f">https://ngodingyo.medium.com/python-for-data-science-part-1-08324637f85f</a></p><p>Let’s get started!</p><h3><strong>Input</strong></h3><p>Prompt =&gt; A string, representing a message</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pCkjZG8LuDgTcEuLsbUuGw.png" /></figure><h3><strong>String Formatting</strong></h3><p>In Python, <strong>string formatting</strong> refers to the process of creating and modifying strings dynamically by inserting values into placeholders within a string. There are multiple ways to format strings in Python, ranging from simple concatenation to more advanced methods like f-strings, str.format(), and the older % formatting</p><p>Most commonly used string formatting methods in Python:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KABrFqgwAi4DLGFz5G68vw.png" /></figure><h3><strong>Control Flow IF Else</strong></h3><p>In Python, <strong>control flow</strong> with if and else is used to make decisions in your code based on conditions.</p><ul><li>The if keyword checks a condition. If the condition is <strong>True</strong>, the code inside the if block runs.</li><li>The else keyword provides an alternative block of code to run when the condition is <strong>False</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*njxk5QKOAZ8brMNBACnXCA.png" /></figure><h3><strong>List Comprehension</strong></h3><p>List comprehension is a concise way to create lists in Python. It allows you to construct a new list by applying an expression to each item in an iterable, optionally filtering items with a condition. This term is often referred to as a <em>one-liner</em>, meaning a single line of code. Control flow, such as loops and conditional statements, can be written in a simpler form using the list comprehension method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2J7LRBf6TOs-4dIs0TazmA.png" /></figure><h3><strong>Function</strong></h3><p>In Python, a <strong>function</strong> is a block of reusable code that performs a specific task. Functions allow you to organize your code, improve reusability, and make your programs easier to read and maintain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9r0bbSnZZm5J-qKTGtCP0g.png" /></figure><p>This concludes the second part of the introduction to Python for Data Science. In this article, the fundamentals of Python, which serve as an essential foundation for data analysis and manipulation, were explored. These initial steps will be highly beneficial for those looking to deepen their skills in Data Science.</p><p>To practice what you’ve learned, you can explore the <strong>hands-on materials</strong> provided. Click the following link to access them: <a href="https://github.com/ali-datascience/mymediumfondationfordatascience">GitHub Hands-On: Introduction to Python for Data Science.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f53d939825ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python for Data Science Part 1]]></title>
            <link>https://ngodingyo.medium.com/python-for-data-science-part-1-08324637f85f?source=rss-451058c36a4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/08324637f85f</guid>
            <dc:creator><![CDATA[Muhamad Ali]]></dc:creator>
            <pubDate>Fri, 27 Dec 2024 11:56:52 GMT</pubDate>
            <atom:updated>2024-12-27T12:18:09.220Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to the first part of the “Introduction to Python for Data Science” series! Python has become one of the most popular and powerful programming languages in the field of data science. Its simplicity, versatility, and vast ecosystem of libraries make it the perfect tool for anyone looking to get started with data analysis, machine learning, and artificial intelligence.</p><p>In this article series, we will cover data science with the following outline:</p><ol><li><strong>Introduction to Data Science:</strong> A framework that guides Data Science projects.</li><li><strong>Big Data</strong>: Understanding large-scale data and how to process it.</li><li><strong>Python for Data Science</strong>: Why Python is the go-to language in this field.</li><li><strong>Fundamentals of Statistics</strong>: The statistical foundations that power data analysis.</li><li><strong>Exploratory Data Analysis (EDA)</strong>: The art of understanding data before building models.</li><li><strong>Data Preprocessing</strong>: Preparing and cleaning data for analysis.</li><li><strong>Machine Learning</strong>: Algorithms that make machines intelligent.</li><li><strong>Deep Learning</strong>: Advanced technology driving artificial intelligence.</li><li><strong>Natural Language Processing (NLP) &amp; LLMs</strong>: Processing human language using cutting-edge tools like Large Language Models (LLMs).</li></ol><p>Currently, we are at the <strong>Python for Data Science</strong> stage. Make sure to follow this article series from the beginning for a comprehensive understanding!</p><p>So in this article, we will walk through the basic concepts of Python that are fundamental for diving deeper into data science. Whether you’re a beginner or looking to refresh your knowledge, this guide will help you build a strong foundation for the exciting world of data science. Let’s get started!</p><h3><strong>What is Python</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*SmrjoiGYpk9B4T8m14RyPQ.png" /></figure><p>Python is a versatile and widely used <strong>high-level programming language</strong> known for its readability, simplicity, and ease of use. Created by <strong>Guido van Rossum</strong> and first released in 1991, Python has become one of the most popular programming languages worldwide.</p><h3><strong>Coding Style Guide</strong></h3><p>There are several rules to follow when creating programs using the Python programming language.</p><p><strong>1. Indentation</strong></p><p>Adding two or four spaces to nested code serves to indicate that the second statement is part of the first statement.</p><p><strong>2. Tabs or Spaces</strong><br>Indentation can be added using either spaces or tabs, but it is not allowed to use both in the same block of code</p><p><strong>3. Comments</strong><br>Begin with the # character followed by a space, and are used to add documentation or explanations about how a block of code works. This is especially useful when working on a program as a team</p><p><strong>4. Quotation Marks</strong><br> Python treats single quotes (‘) and double quotes (“) as equivalent. The choice of quotation marks depends on personal preference and the string being written. However, only one style should be used consistently.</p><h3><strong>Variables</strong></h3><p>Variables are used to store a value.</p><p><strong>Rules for naming variables:</strong></p><p>1.Must start with a letter (A-Z or a-z) or an underscore (_).</p><p>2.Cannot start with a number.</p><p>3.Variable names cannot be the same as Python <strong>keywords</strong>, such as: True, False, assert, try, except, def, if, else, finally, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*TlsuWgnIIWx45BWDQDO_Vw.png" /></figure><h3><strong>Local Variables vs. Global Variables</strong></h3><ul><li><strong>Global Variables</strong><br> Variables defined outside a function and can be accessed at any time throughout the program.</li><li><strong>Local Variables</strong><br> Variables defined inside a function and can only be accessed within that function.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*HSZ9HH9P_ScyZR0XD-nJww.png" /></figure><h3><strong>Data Types</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9X_fuT4NOFQdC4COZazqIQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XJcg0mC6ELphrLUja8fniA.png" /></figure><h3><strong>Arithmetic Operators</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rfkicoG71sbhoOiZU2KL6Q.png" /></figure><h3><strong>Relational Operators]</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*QsCE7Gmdcke4D0ymhN2Cbw.png" /></figure><h3><strong>Assignment Operators</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*t2WojUEfs3SOWas4LRgq6g.png" /></figure><h3><strong>Logical Operators</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sP0ZIT46ZkVgrqIAVeifSA.png" /></figure><h3><strong>Membership Operators</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bWBgOpDy71lYy3mWsZfaEA.png" /></figure><h3><strong>Identity Operators</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nqNMbE_iItNXkMqbPq8Ylw.png" /></figure><p>This concludes the first part of the introduction to Python for Data Science. In this article, the fundamentals of Python, which serve as an essential foundation for data analysis and manipulation, were explored. These initial steps will be highly beneficial for those looking to deepen their skills in Data Science.</p><p>To practice what you’ve learned, you can explore the <strong>hands-on materials</strong> provided. Click the following link to access them: <a href="https://github.com/ali-datascience/mymediumfondationfordatascience">GitHub Hands-On: Introduction to Python for Data Science.</a></p><p>Stay tuned for the next installment in this series, where a deeper dive into Python and its applications in Data Science will be covered</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=08324637f85f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Big Data]]></title>
            <link>https://ngodingyo.medium.com/big-data-c7c22bf1c119?source=rss-451058c36a4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7c22bf1c119</guid>
            <dc:creator><![CDATA[Muhamad Ali]]></dc:creator>
            <pubDate>Thu, 26 Dec 2024 03:33:46 GMT</pubDate>
            <atom:updated>2024-12-26T03:37:00.938Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s world, every click, swipe, and transaction generates data. This explosion of information — known as Big Data — holds the power to transform industries, improve decision-making, and uncover hidden opportunities. But what is Big Data, and why is it so important? Understanding this domain isn’t just for tech experts; it’s for anyone who wants to thrive in a data-driven world. Let’s dive into why Big Data is a must-know for everyone</p><h3><strong>What is Big Data?</strong></h3><p>Big Data refers to <strong>large amounts of data</strong> that are too big and complex for traditional tools like spreadsheets or databases to handle. Think of it like a giant pile of information that is constantly growing and changing.</p><figure><img alt="Original Image : https://tradeeconomics.com/wp-content/uploads/2022/09/Fig1_-5-Vs-of-Data.jpg" src="https://cdn-images-1.medium.com/max/399/1*WeaC0YI3pBnAEPw70Q-8Bw.png" /><figcaption>Original Image : <a href="https://tradeeconomics.com/wp-content/uploads/2022/09/Fig1_-5-Vs-of-Data.jpg">https://tradeeconomics.com/wp-content/uploads/2022/09/Fig1_-5-Vs-of-Data.jpg</a></figcaption></figure><h3><strong>Why is it “big”?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*4G9yHLeLW4u_t7m99BSQrg.png" /></figure><p><strong>Big Data is big because of three main “V’s”:</strong></p><ul><li><strong>Volume:</strong> There’s a lot of it! (e.g., millions of social media posts every day)</li><li><strong>Velocity:</strong> It arrives very quickly. (e.g., live GPS data)</li><li><strong>Variety:</strong> It comes in many forms. (e.g., videos, photos, texts, and numbers)</li></ul><p>Big Data is also about two additional “V’s” that make it even more important: <strong>Veracity</strong> and <strong>Value</strong></p><ul><li><strong>Veracity:</strong> Ensuring the data is accurate and reliable</li><li><strong>Value:</strong> Extracting useful insights from the data to make better decisions</li></ul><h3><strong>What is Data Warehouse?</strong></h3><p>A data warehouse is a system that combines data from various sources into a single, centralized location. It stores consistent data to support data analysis, artificial intelligence (AI), and machine learning processes, ultimately enhancing business analytics. A data warehouse consolidates data from multiple sources to make it available in a unified format.</p><p><strong>Key Features of a Data Warehouse:</strong></p><p>1.<strong>Centralized Storage:</strong></p><p>It collects data from different sources (e.g., sales systems, marketing tools, and customer databases) and stores it in one place.</p><p>2.<strong>Structured and Organized:</strong></p><p>Data in a warehouse is cleaned and organized into a consistent format, making it easy to analyze.</p><p>3.<strong>Historical Data:</strong></p><p>It stores data over long periods, allowing companies to track trends and changes over time.</p><p>4.<strong>Optimized for Queries:</strong></p><p>Unlike regular databases, data warehouses are designed for fast data retrieval and reporting, not day-to-day transactions.</p><h3><strong>What is Data Data Lake?</strong></h3><p>A data lake is a centralized repository that allows us to store all structured and unstructured data at any scale. We can store data as-is, without the need to structure it beforehand, and perform various types of analytics, ranging from dashboards and visualizations to big data processing, real-time analysis, and machine learning, to enable better decision-making.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PxV1V_NKSZ_QL_hbZoRJpg.png" /></figure><h3><strong>Differences Between Data Lake and Data Warehouse</strong></h3><p>An organization typically needs both a <strong>Data Lake</strong> and a <strong>Data Warehouse</strong> because they serve different purposes and use cases.</p><ul><li><strong>Data Warehouse</strong> is a database optimized for analyzing relational data from transactional systems and business applications. Data is structured and organized in advance to optimize SQL queries, which are often used for reporting and operational analysis. The data is cleaned, enriched, and transformed, acting as a trusted “single source of truth” for users.</li><li><strong>Data Lake</strong> is a different kind of storage compared to traditional relational databases. It can store both relational data from business applications and non-relational data from sources like IoT devices and social media. Data lakes don’t require predefined structures or schemas, allowing all types of data to be stored without detailed planning. This data can be analyzed using various methods, including SQL queries, big data analytics, text search, real-time analytics, and machine learning</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*Kgj5tdCbzHnutjiaANzPoQ.png" /></figure><p><strong>Key Differences:</strong></p><p>1.<strong>Schema:</strong></p><ul><li>Data Lake: Schema on read (data is structured when read).</li><li>Data Warehouse: Schema on write (data is structured when stored).</li></ul><p>2.<strong>Data Quality:</strong></p><ul><li>Data Lake: Stores raw, unprocessed data.</li><li>Data Warehouse: Stores cleaned and transformed data, ensuring higher reliability.</li></ul><p>3.<strong>Access:</strong></p><ul><li>Data Lake: Accessed by developers and data scientists.</li><li>Data Warehouse: Accessed by business analysts.</li></ul><p>4.<strong>Analytics:</strong></p><ul><li>Data Lake: Used for predictive analysis, data discovery, and profiling.</li><li>Data Warehouse: Primarily used for reporting and visualization.</li></ul><p>In short, while both are essential for handling data, <strong>Data Lakes</strong> are more flexible and suited for raw data and complex analysis, while <strong>Data Warehouses</strong> focus on structured, reliable data for reporting and operational insights.</p><h3><strong>Differences Between Data Mart and Data Warehouse</strong></h3><p>A <strong>Data Mart</strong> is a type of <strong>Data Warehouse</strong> designed to serve the needs of a specific team or business unit, such as finance, marketing, or sales. Its scope is smaller and more focused, often containing summarized (aggregated) data to meet the needs of its users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*JeFEeUg5lvSx4TsnDB936w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*rC3V3ndovIJw_8C-hOFNgg.png" /></figure><p><strong>Key Differences:</strong></p><p>1.<strong>Scope:</strong></p><ul><li>Data Warehouse: Centralized, integrating data from multiple areas into one system.</li><li>Data Mart: Specific to a particular business area or department.</li></ul><p>2.<strong>Users:</strong></p><ul><li>Data Warehouse: Accessible by the entire organization.</li><li>Data Mart: Specific to a particular team or department.</li></ul><p>3.<strong>Data Sources:</strong></p><ul><li>Data Warehouse: Collects data from various sources across the organization.</li><li>Data Mart: Data is sourced from the Data Warehouse.</li></ul><p>4.<strong>Size:</strong></p><ul><li>Data Warehouse: Larger, as it holds data from all areas of the business.</li><li>Data Mart: Smaller, focused only on specific departments or areas.</li></ul><p>5.<strong>Data Detail:</strong></p><ul><li>Data Warehouse: Contains detailed data for in-depth analysis.</li><li>Data Mart: Contains summarized or aggregated data for easier access by specific users.</li></ul><p>In summary, <strong>Data Warehouses</strong> are large, centralized data systems used across an entire organization, while <strong>Data Marts</strong> are smaller, focused systems tailored for specific teams or departments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7c22bf1c119" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>