<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Machine-Learning on Arshad Siddiqui</title><link>https://arshadhs.github.io/categories/machine-learning/</link><description>Recent content in Machine-Learning on Arshad Siddiqui</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 21 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://arshadhs.github.io/categories/machine-learning/index.xml" rel="self" type="application/rss+xml"/><item><title>LNN for Regression</title><link>https://arshadhs.github.io/docs/ai/deep-learning/030-linear-neural-networks-for-regression/</link><pubDate>Sun, 15 Feb 2026 00:00:00 +0000</pubDate><guid>https://arshadhs.github.io/docs/ai/deep-learning/030-linear-neural-networks-for-regression/</guid><description>&lt;h1 id="linear-neural-networks-for-regression">
 Linear Neural Networks for Regression
 
 &lt;a class="anchor" href="#linear-neural-networks-for-regression">#&lt;/a>
 
&lt;/h1>
&lt;p>A &lt;strong>linear neural network for regression&lt;/strong> is a model that predicts a &lt;strong>continuous&lt;/strong> target by taking a weighted sum of input features and applying the &lt;strong>identity activation&lt;/strong> (so the output can be any real number).&lt;/p>
&lt;ul>
&lt;li>Single neuron for regression (predicting &lt;em>how much&lt;/em> / &lt;em>how many&lt;/em>)&lt;/li>
&lt;li>Data + linear model (single neuron, no hidden layers) + squared loss&lt;/li>
&lt;li>Training using &lt;strong>batch gradient descent&lt;/strong> algorithm&lt;/li>
&lt;li>Prediction (inference)&lt;/li>
&lt;li>Eg: Auto MPG (UCI) style prediction with a single neuron (from-scratch code)&lt;/li>
&lt;/ul>
&lt;hr>


&lt;script src="https://arshadhs.github.io/mermaid.min.js">&lt;/script>

 &lt;script>mermaid.initialize({
 "flowchart": {
 "useMaxWidth":true
 },
 "theme": "default"
}
)&lt;/script>




&lt;pre class="mermaid">
flowchart LR
 D[&amp;#34;Data&amp;lt;br/&amp;gt;X, y&amp;#34;] --&amp;gt; M[&amp;#34;Linear model&amp;lt;br/&amp;gt;w, b&amp;lt;br/&amp;gt;Single neuron&amp;#34;]
 M --&amp;gt; A[&amp;#34;Activation&amp;lt;br/&amp;gt;Identity&amp;#34;]
 A --&amp;gt; L[&amp;#34;Loss&amp;lt;br/&amp;gt;MSE (Squared error)&amp;#34;]
 L --&amp;gt; O[&amp;#34;Optimiser&amp;lt;br/&amp;gt;Batch Gradient DescentBatch GD / Mini-batch GD&amp;#34;]
 O --&amp;gt; P[&amp;#34;Parameters&amp;lt;br/&amp;gt;w, b&amp;#34;]
 P --&amp;gt; I[&amp;#34;Inference&amp;lt;br/&amp;gt;Predict ŷ (number) for new x&amp;#34;]

 %% Pastel colour scheme
 style D fill:#E3F2FD,stroke:#1E88E5,stroke-width:1px
 style M fill:#E8F5E9,stroke:#43A047,stroke-width:1px
 style A fill:#FFF3E0,stroke:#FB8C00,stroke-width:1px
 style L fill:#FCE4EC,stroke:#D81B60,stroke-width:1px
 style O fill:#F3E5F5,stroke:#8E24AA,stroke-width:1px
 style P fill:#E0F7FA,stroke:#00838F,stroke-width:1px
 style I fill:#F1F8E9,stroke:#558B2F,stroke-width:1px
&lt;/pre>

&lt;hr>
&lt;h2 id="regression">
 Regression
 
 &lt;a class="anchor" href="#regression">#&lt;/a>
 
&lt;/h2>
&lt;p>Regression is a supervised learning task that predicts a continuous-valued output based on input features.&lt;/p></description></item><item><title>Gradient Descent Algorithm</title><link>https://arshadhs.github.io/docs/ai/deep-learning/035-gradient-descent-algorithm/</link><pubDate>Thu, 26 Feb 2026 00:00:00 +0000</pubDate><guid>https://arshadhs.github.io/docs/ai/deep-learning/035-gradient-descent-algorithm/</guid><description>&lt;h1 id="gradient-descent-algorithm">
 Gradient Descent Algorithm
 
 &lt;a class="anchor" href="#gradient-descent-algorithm">#&lt;/a>
 
&lt;/h1>
&lt;p>Gradient Descent Algorithm (GDA) is&lt;/p>
&lt;ul>
&lt;li>an &lt;strong>optimisation method&lt;/strong>&lt;/li>
&lt;li>used to &lt;strong>train models&lt;/strong>&lt;/li>
&lt;li>by repeatedly updating parameters (weights and biases) to &lt;strong>reduce the loss&lt;/strong>&lt;/li>
&lt;/ul>
&lt;blockquote class="book-hint info">
&lt;p>In deep learning, the default training approach is almost always &lt;strong>mini-batch gradient descent&lt;/strong>, usually with &lt;strong>Adam&lt;/strong> or &lt;strong>SGD + momentum&lt;/strong>.&lt;/p>
&lt;/blockquote>
&lt;p>Gradient Descent is &lt;strong>used in both regression and classification&lt;/strong>.&lt;/p>
&lt;p>It’s not tied to the task type — it’s tied to the fact you have:&lt;/p></description></item><item><title>LNN for Classification</title><link>https://arshadhs.github.io/docs/ai/deep-learning/040-linear-neural-networks-for-classification/</link><pubDate>Sun, 15 Feb 2026 00:00:00 +0000</pubDate><guid>https://arshadhs.github.io/docs/ai/deep-learning/040-linear-neural-networks-for-classification/</guid><description>&lt;h1 id="linear-nn-for-classification">
 Linear NN for Classification
 
 &lt;a class="anchor" href="#linear-nn-for-classification">#&lt;/a>
 
&lt;/h1>
&lt;p>A &lt;strong>Linear Neural Network (LNN) for classification&lt;/strong> uses &lt;strong>no hidden layers&lt;/strong>.&lt;br>
It learns a &lt;strong>linear decision boundary&lt;/strong> and outputs &lt;strong>class probabilities&lt;/strong>, then converts them into predicted classes.&lt;/p>
&lt;blockquote class="book-hint info">
&lt;p>Neural-network view:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Binary classification&lt;/strong> → logistic regression (single neuron + sigmoid)&lt;/li>
&lt;li>&lt;strong>Multi-class classification&lt;/strong> → softmax regression (K output neurons + softmax)&lt;/li>
&lt;/ul>
&lt;/blockquote>
&lt;hr>


&lt;script src="https://arshadhs.github.io/mermaid.min.js">&lt;/script>

 &lt;script>mermaid.initialize({
 "flowchart": {
 "useMaxWidth":true
 },
 "theme": "default"
}
)&lt;/script>




&lt;pre class="mermaid">
flowchart LR
 D[&amp;#34;Data&amp;lt;br/&amp;gt;X, y&amp;#34;] --&amp;gt; M[&amp;#34;Linear model&amp;lt;br/&amp;gt;w, b&amp;#34;]
 M --&amp;gt; A[&amp;#34;Activation&amp;lt;br/&amp;gt;Sigmoid / Softmax&amp;#34;]
 A --&amp;gt; L[&amp;#34;Loss&amp;lt;br/&amp;gt;Cross-entropy&amp;#34;]
 L --&amp;gt; O[&amp;#34;Optimiser&amp;lt;br/&amp;gt;Mini-batch GD / Adam&amp;#34;]
 O --&amp;gt; P[&amp;#34;Updated parameters&amp;lt;br/&amp;gt;w, b&amp;#34;]
 P --&amp;gt; I[&amp;#34;Inference&amp;lt;br/&amp;gt;Probabilities → class&amp;#34;]

 %% Pastel colour scheme
 style D fill:#E3F2FD,stroke:#1E88E5,stroke-width:1px
 style M fill:#E8F5E9,stroke:#43A047,stroke-width:1px
 style A fill:#FFF3E0,stroke:#FB8C00,stroke-width:1px
 style L fill:#FCE4EC,stroke:#D81B60,stroke-width:1px
 style O fill:#F3E5F5,stroke:#8E24AA,stroke-width:1px
 style P fill:#E0F7FA,stroke:#00838F,stroke-width:1px
 style I fill:#F1F8E9,stroke:#558B2F,stroke-width:1px
&lt;/pre>

&lt;hr>
&lt;h2 id="classification">
 Classification
 
 &lt;a class="anchor" href="#classification">#&lt;/a>
 
&lt;/h2>
&lt;p>Classification predicts a &lt;strong>discrete class label&lt;/strong>.&lt;br>
Common settings:&lt;/p></description></item><item><title>Deep Feedforward Neural Networks (DFNN) for Classification</title><link>https://arshadhs.github.io/docs/ai/deep-learning/050-deep-feedforward/</link><pubDate>Thu, 26 Feb 2026 00:00:00 +0000</pubDate><guid>https://arshadhs.github.io/docs/ai/deep-learning/050-deep-feedforward/</guid><description>&lt;h1 id="deep-feedforward-neural-networks-dfnn-or-multi-layer-perceptrons-mlp-for-classification">
 Deep Feedforward Neural Networks (DFNN) or Multi Layer Perceptrons (MLP) for Classification
 
 &lt;a class="anchor" href="#deep-feedforward-neural-networks-dfnn-or-multi-layer-perceptrons-mlp-for-classification">#&lt;/a>
 
&lt;/h1>
&lt;p>A &lt;strong>Deep Feedforward Neural Network (DFNN)&lt;/strong>, also called a &lt;strong>Multi-Layer Perceptron (MLP)&lt;/strong>, is a neural network with one or more &lt;strong>hidden layers&lt;/strong> where information flows &lt;strong>forward only&lt;/strong> (no recurrence).&lt;br>
For classification, DFNNs learn &lt;strong>non-linear decision boundaries&lt;/strong> by combining hidden layers with &lt;strong>non-linear activation functions&lt;/strong>.&lt;/p>
&lt;blockquote class="book-hint info">
&lt;p>Core idea:&lt;/p>
&lt;ul>
&lt;li>A single neuron can only learn &lt;strong>linear&lt;/strong> boundaries.&lt;/li>
&lt;li>Adding &lt;strong>hidden layers + non-linearity&lt;/strong> allows DFNNs to solve problems like &lt;strong>XOR&lt;/strong>.&lt;/li>
&lt;/ul>
&lt;/blockquote>
&lt;hr>
&lt;h2 id="mlp-as-solution-for-xor">
 MLP as solution for XOR
 
 &lt;a class="anchor" href="#mlp-as-solution-for-xor">#&lt;/a>
 
&lt;/h2>
&lt;p>A single perceptron fails on XOR because XOR is &lt;strong>not linearly separable&lt;/strong>.&lt;/p></description></item><item><title>ML Pipeline</title><link>https://arshadhs.github.io/docs/ai/machine-learning/99-ml-pipeline-model/</link><pubDate>Tue, 21 Apr 2026 00:00:00 +0000</pubDate><guid>https://arshadhs.github.io/docs/ai/machine-learning/99-ml-pipeline-model/</guid><description>&lt;h1 id="machine-learning-pipeline-preprocessing--models">
 Machine Learning Pipeline: Preprocessing &amp;amp; Models
 
 &lt;a class="anchor" href="#machine-learning-pipeline-preprocessing--models">#&lt;/a>
 
&lt;/h1>
&lt;p>This page explains both &lt;strong>data preprocessing&lt;/strong> and &lt;strong>model development concepts&lt;/strong> in a clear, structured way to support understanding.&lt;/p>
&lt;blockquote class="book-hint info">
&lt;p>A complete ML pipeline includes preprocessing, feature engineering, feature selection, and model training.&lt;/p>
&lt;/blockquote>
&lt;hr>
&lt;h1 id="1-data-preprocessing-overview">
 1. Data Preprocessing Overview
 
 &lt;a class="anchor" href="#1-data-preprocessing-overview">#&lt;/a>
 
&lt;/h1>
&lt;p>Raw data is often:&lt;/p>
&lt;ul>
&lt;li>Noisy&lt;/li>
&lt;li>Incomplete&lt;/li>
&lt;li>Inconsistent&lt;/li>
&lt;/ul>
&lt;p>Preprocessing ensures data is suitable for machine learning.&lt;/p>
&lt;hr>
&lt;h1 id="2-missing-values">
 2. Missing Values
 
 &lt;a class="anchor" href="#2-missing-values">#&lt;/a>
 
&lt;/h1>
&lt;p>&lt;strong>Why they occur&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Sensor errors&lt;/li>
&lt;li>Data collection issues&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Methods&lt;/strong>&lt;/p></description></item></channel></rss>