<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nnamdi Nnanna</title>
    <description>The latest articles on DEV Community by Nnamdi Nnanna (@nnamdi_nnanna).</description>
    <link>https://dev.to/nnamdi_nnanna</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4072085%2F6fea3512-2eb8-4639-922e-475d6cb288d8.jpg</url>
      <title>DEV Community: Nnamdi Nnanna</title>
      <link>https://dev.to/nnamdi_nnanna</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nnamdi_nnanna"/>
    <language>en</language>
    <item>
      <title>Building a Customer Churn Prediction Model with Logistic Regression</title>
      <dc:creator>Nnamdi Nnanna</dc:creator>
      <pubDate>Mon, 12 Oct 2026 10:52:53 +0000</pubDate>
      <link>https://dev.to/nnamdi_nnanna/building-a-customer-churn-prediction-model-with-logistic-regression-1k0i</link>
      <guid>https://dev.to/nnamdi_nnanna/building-a-customer-churn-prediction-model-with-logistic-regression-1k0i</guid>
      <description>&lt;p&gt;This week, I worked through Module 3: Machine Learning for Classification in ML Zoomcamp 2026.&lt;/p&gt;

&lt;p&gt;The goal was to build a model that could help a telecom company identify customers who were likely to leave. Working through the project helped me connect several machine learning concepts to a practical problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I worked on&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Data preparation and exploratory data analysis&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I explored the Telco customer churn dataset, examined the target variable, checked missing values, and looked at how different features were distributed.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Feature importance&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I learned different ways to understand the relationship between features and customer churn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Risk ratio and risk difference for categorical variables&lt;/li&gt;
&lt;li&gt;Mutual information to measure how informative categorical features are about the target&lt;/li&gt;
&lt;li&gt;Correlation coefficients to examine relationships between numerical features&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One finding that stood out was that contract type had the highest mutual information among the categorical features we examined.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;One-hot encoding with DictVectorizer&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Since machine learning models need numerical inputs, I used Scikit-Learn's "DictVectorizer" to convert categorical features into numerical representations. This produced a feature matrix with 45 columns.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Training a logistic regression model&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I trained a logistic regression model using Scikit-Learn and achieved approximately 80% accuracy on the validation set.&lt;/p&gt;

&lt;p&gt;I also explored how to interpret the model's weights, trained a smaller model using selected features, and worked through how to calculate a prediction manually.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learned&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The biggest lesson for me was understanding how the different stages of a machine learning project connect.&lt;/p&gt;

&lt;p&gt;Feature analysis helps us understand the data. Encoding prepares it for the model. Logistic regression uses those features to estimate the probability of a customer churning, and evaluation helps us understand how well the model performs.&lt;/p&gt;

&lt;p&gt;I also learned that the same classification workflow can be applied to other problems, such as spam detection, loan default prediction, and lead scoring.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's next?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'm moving on to Module 4: Evaluation Metrics for Classification, where I'll learn more about measuring model performance and understanding what accuracy alone might not tell us.&lt;/p&gt;

&lt;p&gt;I'm taking this journey one concept at a time, with the goal of understanding the reasoning behind the code rather than simply getting it to run.&lt;/p&gt;

&lt;h1&gt;
  
  
  MachineLearning #DataScience #Python #MLZoomcamp #LearningInPublic
&lt;/h1&gt;

</description>
      <category>machinelearningengineering</category>
      <category>datascience</category>
      <category>learninginpublic</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
