<?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 Aja Nnaemeka James on Medium]]></title>
        <description><![CDATA[Stories by Aja Nnaemeka James on Medium]]></description>
        <link>https://medium.com/@ajannaemekajames?source=rss-20318e350dc3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*dl6gaeiLKwE9y8Yt</url>
            <title>Stories by Aja Nnaemeka James on Medium</title>
            <link>https://medium.com/@ajannaemekajames?source=rss-20318e350dc3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 00:23:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ajannaemekajames/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[Chapter 2: Supervised Learning]]></title>
            <link>https://medium.com/@ajannaemekajames/chapter-2-supervised-learning-5633145d0ee3?source=rss-20318e350dc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/5633145d0ee3</guid>
            <dc:creator><![CDATA[Aja Nnaemeka James]]></dc:creator>
            <pubDate>Sun, 19 Oct 2025 23:11:20 GMT</pubDate>
            <atom:updated>2025-10-19T23:11:20.415Z</atom:updated>
            <content:encoded><![CDATA[<p>Chapter 2: Supervised Learning</p><p>This chapter explains the most common type of machine learning called supervised learning. In supervised learning, a model is trained using labeled data, meaning each example in the training set has both input features and the correct output. The goal of the model is to learn the relationship between inputs and outputs so that it can correctly predict the output for new, unseen data.</p><p>Supervised learning is divided into two major types: classification and regression. Classification involves predicting a category or class label such as “spam” or “not spam,” while regression predicts a continuous numerical value such as the price of a house or the temperature tomorrow.</p><p>The authors use examples from the scikit-learn library to demonstrate how supervised learning works. They start by loading datasets such as the breast cancer and iris datasets, splitting the data into training and testing sets, training a model on the training data, making predictions on the test data, and evaluating performance. This simple workflow forms the foundation for almost all machine learning tasks in scikit-learn.</p><p>The chapter introduces and explains several major supervised learning algorithms.</p><p>The first algorithm discussed is k-Nearest Neighbors (kNN). It makes predictions by finding the “k” closest data points to a new example and using their labels to decide the output. It is simple and intuitive but can be slow for large datasets and is sensitive to the scale of the data.</p><p>Next, linear models are introduced. These models predict the output as a weighted sum of the input features. Examples include Linear Regression for continuous outcomes and Logistic Regression for binary classification. Linear models are fast and easy to interpret but only work well if the relationship between input and output is roughly linear.</p><p>Support Vector Machines (SVMs) are then presented. They work by finding the best separating boundary between different classes. With the use of kernels, SVMs can handle complex, non-linear data. They can be powerful but require careful tuning of parameters.</p><p>Decision Trees are another important model explained in the chapter. They split data based on feature thresholds, forming a tree-like structure of decisions. Decision Trees are easy to interpret and visualize but tend to overfit the training data if not properly controlled.</p><p>The authors then discuss ensemble methods such as Random Forests and Gradient Boosting. A Random Forest is a collection of many decision trees trained on random subsets of the data, and their predictions are averaged. Gradient Boosting builds trees sequentially, where each new tree focuses on correcting the errors of the previous one. These ensemble methods generally provide strong performance on many types of data but can be slower to train and harder to interpret.</p><p>Model evaluation is another key topic. The authors stress the importance of measuring a model’s ability to generalize to unseen data. They describe using a training and test split, as well as more advanced methods like cross-validation, to evaluate models. Common performance metrics include accuracy for classification and mean squared error for regression. They also explain overfitting and underfitting, where a model either memorizes the training data too closely or fails to capture the patterns in the data.</p><p>Parameter tuning is also introduced. Most models have hyperparameters that control their behavior, such as the number of neighbors in kNN or the regularization strength in linear models. The authors show how to use scikit-learn’s GridSearchCV to automatically find the best set of parameters through systematic search and validation.</p><p>Finally, the chapter explains how to choose the right algorithm. There is no single best model for all problems. The right choice depends on the size of the data, the type of features, and whether interpretability or prediction accuracy is more important. A practical approach is to start with simple models, evaluate their performance, and then move to more complex ones if necessary.</p><p>The chapter concludes with visual examples showing how different algorithms produce different decision boundaries and how model complexity affects generalization. It also highlights the importance of feature scaling, especially for algorithms that depend on distance calculations such as kNN and SVM.</p><p>In summary, Chapter 2 gives a comprehensive overview of the fundamental ideas, algorithms, and techniques of supervised learning. It equips the reader with the knowledge to train, evaluate, and select appropriate models for real-world prediction tasks using Python and scikit-learn.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5633145d0ee3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>