Artificial Neuron In Practice hero
LaboratoryThe Artificial Neuron & Activations

Artificial Neuron In Practice

Manual step-by-step calculations of linear scores, Sigmoid probabilities, and baseline bias offsets to evaluate decision thresholds.

Part 1: The Underlying Mechanics

Problem 1: Linear Score Computation (z=w⋅x+bz = w \cdot x + b) Given a 3-dimensional input feature vector x=[2.0−1.03.0]x = \begin{bmatrix} 2.0 \\ -1.0 \\ 3.0 \end{bmatrix}, a weight vector w=[1.54.0−0.5]w = \begin{bmatrix} 1.5 \\ 4.0 \\ -0.5 \end{bmatrix}, and a baseline bias b=−2.5b = -2.5, calculate the linear score z=w⋅x+bz = w \cdot x + b.

Reveal Solution
w⋅x=(1.5)(2.0)+(4.0)(−1.0)+(−0.5)(3.0)=3.0−4.0−1.5=−2.5z=(w⋅x)+b=−2.5+(−2.5)=−5.0Final linear score: z=−5.0\begin{aligned} &\mathbf{w \cdot x} = (1.5)(2.0) + (4.0)(-1.0) + (-0.5)(3.0) = 3.0 - 4.0 - 1.5 = \mathbf{-2.5} \\ &\mathbf{z = (w \cdot x) + b} = -2.5 + (-2.5) = \mathbf{-5.0} \\ &\text{Final linear score: } \mathbf{z = -5.0} \end{aligned}

Problem 2: Linear Score to Sigmoid Activation

A neuron has weight vector w=[2.0−1.0]w = \begin{bmatrix} 2.0 \\ -1.0 \end{bmatrix} and baseline bias b=−3.0b = -3.0.

  • Part A: Calculate the linear score z=w⋅x+bz = w \cdot x + b for the input feature vector x=[3.01.0]x = \begin{bmatrix} 3.0 \\ 1.0 \end{bmatrix}.
  • Part B: Using the Sigmoid formula σ(z)=11+e−z\sigma(z) = \frac{1}{1 + e^{-z}} and the reference table below, calculate the neuron's output probability σ(z)\sigma(z): Reference: e−1.0≈0.3679,e−2.0≈0.1353,e−3.0≈0.0498\text{Reference: } e^{-1.0} \approx 0.3679, \quad e^{-2.0} \approx 0.1353, \quad e^{-3.0} \approx 0.0498
Reveal Solution

Part A:

w⋅x=(2.0)(3.0)+(−1.0)(1.0)=6.0−1.0=5.0z=(w⋅x)+b=5.0+(−3.0)=2.0\begin{aligned} &\mathbf{w \cdot x} = (2.0)(3.0) + (-1.0)(1.0) = 6.0 - 1.0 = 5.0 \\ &\mathbf{z = (w \cdot x) + b} = 5.0 + (-3.0) = \mathbf{2.0} \end{aligned}

Part B:

σ(2.0)=11+e−2.0=11+0.1353=11.1353≈0.8808(88.1%)\mathbf{\sigma(2.0)} = \frac{1}{1 + e^{-2.0}} = \frac{1}{1 + 0.1353} = \frac{1}{1.1353} \approx \mathbf{0.8808} \quad (\mathbf{88.1\%})

Final linear score: z=2.0z = \mathbf{2.0}, Sigmoid output: σ(z)≈88.1%\sigma(z) \approx \mathbf{88.1\%}

Problem 3: Baseline Bias and the Decision Threshold

A neuron receives input feature vector x=[3.04.0]x = \begin{bmatrix} 3.0 \\ 4.0 \end{bmatrix} with weight vector w=[2.01.5]w = \begin{bmatrix} 2.0 \\ 1.5 \end{bmatrix}.

  • Part A: Calculate the raw dot product w⋅xw \cdot x.
  • Part B: What exact baseline bias bb places the neuron on the decision threshold (z=0z = 0, yielding σ(z)=0.50\sigma(z) = 0.50)?
  • Part C: To produce an output above the decision threshold (σ(z)>0.50\sigma(z) > 0.50), must the chosen bias bb be greater than or less than the value found in Part B?
Reveal Solution

Part A:

w⋅x=(2.0)(3.0)+(1.5)(4.0)=6.0+6.0=12.0\mathbf{w \cdot x} = (2.0)(3.0) + (1.5)(4.0) = 6.0 + 6.0 = \mathbf{12.0}

Part B: To place the neuron on the decision threshold (z=0z = 0):

z=w⋅x+b=0  ⟹  12.0+b=0  ⟹  b=−12.0\mathbf{z = w \cdot x + b = 0} \implies 12.0 + b = 0 \implies \mathbf{b = -12.0}

Part C: Because Sigmoid is strictly increasing, an output above the decision threshold (σ(z)>0.50\sigma(z) > 0.50) requires z>0z > 0:

w⋅x+b>0  ⟹  12.0+b>0  ⟹  b>−12.0\mathbf{w \cdot x + b > 0} \implies 12.0 + b > 0 \implies \mathbf{b > -12.0}

The bias must be greater than −12.0-12.0 (such as −11.0-11.0 or 0.00.0). Any bias greater than −12.0-12.0 results in a positive linear score (z>0z > 0), yielding σ(z)>0.50\sigma(z) > 0.50.

Problem 4: Complete Artificial Neuron Pipeline

A binary classification neuron evaluates input feature vector x=[3.02.0]x = \begin{bmatrix} 3.0 \\ 2.0 \end{bmatrix} with weight vector w=[1.0−1.0]w = \begin{bmatrix} 1.0 \\ -1.0 \end{bmatrix} and baseline bias b=−2.0b = -2.0.

  • Part A: Calculate the raw dot product w⋅xw \cdot x.
  • Part B: Calculate the linear score z=w⋅x+bz = w \cdot x + b.
  • Part C: Using the Sigmoid formula σ(z)=11+e−z\sigma(z) = \frac{1}{1 + e^{-z}} and the reference table below, calculate the neuron's output probability σ(z)\sigma(z): Reference: e0.0=1.0000,e1.0≈2.7183,e2.0≈7.3891\text{Reference: } e^{0.0} = 1.0000, \quad e^{1.0} \approx 2.7183, \quad e^{2.0} \approx 7.3891
  • Part D: State the binary classification output (11 or 00) using the standard decision threshold of 0.500.50.
Reveal Solution

Part A:

w⋅x=(1.0)(3.0)+(−1.0)(2.0)=3.0−2.0=1.0\mathbf{w \cdot x} = (1.0)(3.0) + (-1.0)(2.0) = 3.0 - 2.0 = \mathbf{1.0}

Part B:

z=(w⋅x)+b=1.0+(−2.0)=−1.0\mathbf{z = (w \cdot x) + b} = 1.0 + (-2.0) = \mathbf{-1.0}

Part C:

σ(−1.0)=11+e−(−1.0)=11+e1.0=11+2.7183=13.7183≈0.2689(26.9%)\mathbf{\sigma(-1.0)} = \frac{1}{1 + e^{-(-1.0)}} = \frac{1}{1 + e^{1.0}} = \frac{1}{1 + 2.7183} = \frac{1}{3.7183} \approx \mathbf{0.2689} \quad (\mathbf{26.9\%})

Part D:

Because σ(z)≈0.2689<0.50\sigma(z) \approx 0.2689 < 0.50 (corresponding to z<0z < 0), the neuron outputs 00 (Inactive / Negative Class).

This traces the complete 4-stage artificial neuron pipeline:

  • Stage 1 (Feature weighting & dot product): w⋅x=1.0w \cdot x = 1.0
  • Stage 2 (Baseline bias offset): z=1.0+(−2.0)=−1.0z = 1.0 + (-2.0) = -1.0
  • Stage 3 (Sigmoid compression): σ(−1.0)≈0.2689\sigma(-1.0) \approx 0.2689 (26.9%26.9\%)
  • Stage 4 (Decision threshold): 26.9%<50%  ⟹  026.9\% < 50\% \implies \mathbf{0}

Part 2: Applied Scenario: The VC Investment Predictor

In Topic 1, two startups submitted pitch decks to a Venture Capital firm evaluating Unicorn Potential across four features [Team Experience, Market Size, Competition, Risk]:

xOmniFlow=[1.00.31.00.2]xSolaris=[0.31.00.00.8]x_{\text{OmniFlow}} = \begin{bmatrix} 1.0 \\ 0.3 \\ 1.0 \\ 0.2 \end{bmatrix} \qquad\qquad x_{\text{Solaris}} = \begin{bmatrix} 0.3 \\ 1.0 \\ 0.0 \\ 0.8 \end{bmatrix}

The Venture Capital firm evaluates Unicorn Potential using the weight vector ww:

w=[4.02.0−3.01.0](Team Experience Weight)(Market Size Weight)(Competition Weight)(Risk Weight)w = \begin{bmatrix} 4.0 \\ 2.0 \\ -3.0 \\ 1.0 \end{bmatrix} \begin{matrix} \text{(Team Experience Weight)} \\ \text{(Market Size Weight)} \\ \text{(Competition Weight)} \\ \text{(Risk Weight)} \end{matrix}

In Topic 1, their raw dot products were:

  • w⋅xOmniFlow=(4.0)(1.0)+(2.0)(0.3)+(−3.0)(1.0)+(1.0)(0.2)=+1.8w \cdot x_{\text{OmniFlow}} = (4.0)(1.0) + (2.0)(0.3) + (-3.0)(1.0) + (1.0)(0.2) = \mathbf{+1.8}
  • w⋅xSolaris=(4.0)(0.3)+(2.0)(1.0)+(−3.0)(0.0)+(1.0)(0.8)=+4.0w \cdot x_{\text{Solaris}} = (4.0)(0.3) + (2.0)(1.0) + (-3.0)(0.0) + (1.0)(0.8) = \mathbf{+4.0}

Now, macroeconomic conditions change. The broader venture capital market enters a downturn marked by rising interest rates and conservative capital deployment. To reflect higher investment standards, the investment committee introduces a baseline bias:

b=−2.5b = -2.5

To pass initial screening, the firm requires a Sigmoid probability of at least 50%50\% (σ(z)≥0.50\sigma(z) \ge 0.50, corresponding to z≥0z \ge 0) to classify a startup as High Potential.

Problem 5: Startup Screening Under Macro Downturn

  • Part A: Compute the linear score z=w⋅x+bz = w \cdot x + b for both OmniFlow and Solaris AI.
  • Part B: Using the Sigmoid formula σ(z)=11+e−z\sigma(z) = \frac{1}{1 + e^{-z}} and the reference table below, calculate the screening probability σ(z)\sigma(z) for both startups: Reference: e−1.5≈0.2231,e−0.7≈0.4966,e0.7≈2.0138,e1.5≈4.4817\text{Reference: } e^{-1.5} \approx 0.2231, \quad e^{-0.7} \approx 0.4966, \quad e^{0.7} \approx 2.0138, \quad e^{1.5} \approx 4.4817
  • Part C: State which startup qualifies as High Potential (σ(z)≥0.50\sigma(z) \ge 0.50), and explain how the negative bias (b=−2.5b = -2.5) altered the outcome for OmniFlow compared to its raw dot product in Topic 1.
Reveal Solution

Part A: Linear Score Computation

For OmniFlow:

zOmniFlow=(w⋅xOmniFlow)+b=1.8+(−2.5)=−0.7\mathbf{z_{\text{OmniFlow}}} = (w \cdot x_{\text{OmniFlow}}) + b = 1.8 + (-2.5) = \mathbf{-0.7}

For Solaris AI:

zSolaris=(w⋅xSolaris)+b=4.0+(−2.5)=+1.5\mathbf{z_{\text{Solaris}}} = (w \cdot x_{\text{Solaris}}) + b = 4.0 + (-2.5) = \mathbf{+1.5}

Part B: Sigmoid Probability

For OmniFlow (z=−0.7z = -0.7):

σ(−0.7)=11+e−(−0.7)=11+e0.7=11+2.0138=13.0138≈0.3318(33.2%)\mathbf{\sigma(-0.7)} = \frac{1}{1 + e^{-(-0.7)}} = \frac{1}{1 + e^{0.7}} = \frac{1}{1 + 2.0138} = \frac{1}{3.0138} \approx \mathbf{0.3318} \quad (\mathbf{33.2\%})

For Solaris AI (z=+1.5z = +1.5):

σ(+1.5)=11+e−1.5=11+0.2231=11.2231≈0.8176(81.8%)\mathbf{\sigma(+1.5)} = \frac{1}{1 + e^{-1.5}} = \frac{1}{1 + 0.2231} = \frac{1}{1.2231} \approx \mathbf{0.8176} \quad (\mathbf{81.8\%})

Part C: Decision & Analysis

  • Solaris AI qualifies as a High Potential candidate with a probability of 81.8%81.8\% (σ(z)≥0.50\sigma(z) \ge 0.50). Its strong dot product (+4.0+4.0) absorbs the negative bias (b=−2.5b = -2.5) and keeps the linear score positive (z=+1.5z = +1.5).
  • OmniFlow falls into Low Potential with a probability of 33.2%33.2\% (σ(z)<0.50\sigma(z) < 0.50). Although its dot product was positive in Topic 1 (+1.8+1.8), adding the negative bias pulls its linear score into negative territory (z=−0.7z = -0.7), dropping its probability below the 50%50\% threshold.

Key Takeaway: The baseline bias bb acts as an environmental threshold on Unicorn Potential. When market conditions tighten (b=−2.5b = -2.5), borderline candidates with small positive dot products get rejected (z<0z < 0), while high-conviction opportunities remain positive (z>0z > 0).

Previous
Artificial Neuron Architecture