0Pricing
Deep Learning Academy · Lesson

The Step Function & Linear Decisions

How a perceptron splits two classes.

The Step Function & Linear Decisions is a free Deep Learning Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Deep Learning Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

From Score to Decision

The weighted sum gives a score, but you often need a clean yes or no. A step function turns that raw score into a firm decision.

What the Step Does

The step function outputs 1 if the score is at or above zero, and 0 if it is below. No in-between, just on or off. ⚡

output = 1 if score >= 0 else 0

The Threshold

Zero is the threshold where the decision flips. Cross it and the neuron fires; stay below and it stays quiet.

Bias Moves the Threshold

Changing the bias slides that threshold. A larger bias makes the neuron fire more easily, a smaller one makes it harder.

A Line in the Data

With two inputs, the firing rule draws a straight line on a graph. Points on one side say yes, points on the other say no.

The Decision Boundary

That line is the decision boundary. It splits your feature space into two regions, one class on each side.

Weights Tilt the Line

The weights control the angle and steepness of the boundary. Adjusting them rotates the dividing line across your data.

Linear Means Straight

This is a linear decision: the boundary is always a straight line or flat plane. It cannot bend or curve around the data.

Linearly Separable Data

If one straight line can split your classes cleanly, the data is linearly separable. A single neuron handles this case perfectly.

The Hard Edge Problem

The step's hard edge jumps abruptly from 0 to 1. That sharp jump has no useful slope, which makes gradient-based learning tricky later.

A Tiny Classifier

Combine the weighted sum with a step and you have a working binary classifier in two short lines of Python.

score = w1 * x1 + w2 * x2 + b
label = 1 if score >= 0 else 0

Quick Check

Think about the shape a single neuron can carve.

Recap

The step function turns a score into 0 or 1 at a threshold. With two inputs it draws a straight decision boundary, splitting linearly separable data. 📏

Frequently asked questions

Is the “The Step Function & Linear Decisions” lesson free?

Yes — the full text of “The Step Function & Linear Decisions” is free to read here on the web, and the Deep Learning Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Deep Learning Academy course, upgrade to CoddyKit PRO.

What will I learn in “The Step Function & Linear Decisions”?

How a perceptron splits two classes. You practise Deep Learning Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Deep Learning Academy?

No prior experience is required. Deep Learning Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “The Step Function & Linear Decisions” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Deep Learning Academy lesson?

Yes. Every Deep Learning Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Weights, Bias & the Weighted Sum
  2. The Step Function & Linear Decisions
  3. Code a Perceptron from Scratch
  4. The XOR Problem: Why One Neuron Isn't Enough
← Back to Deep Learning Academy