<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Optimisation on Arshad Siddiqui</title><link>https://arshadhs.github.io/tags/optimisation/</link><description>Recent content in Optimisation on Arshad Siddiqui</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 26 Feb 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://arshadhs.github.io/tags/optimisation/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></channel></rss>