OpenCyber Academy
Rapid course · Lesson 15 · English
Course code: OCA-020Lesson 15: OCA-020-A015

Epsilon is a step on the toy, not a receipt recipe

Open, free learning for anyone who wants to protect people and technology. No account is required to read this text or its worked answers.

Lesson map

Lesson 15. Map, example, EX061.

flowchart TD
  W["Printed weights and bias"] --> E["Five eps values, no sixth"]
  E --> A["Accuracy falls from 0.985 to 0.505"]
  A --> R["The receipt rule stays prose"]

The step moves synthetic points. It does not edit a receipt image.

Logical drawing

weights w=(1.795, 1.756) b=-0.080
eps=0.00 accuracy=0.985
eps=0.25 accuracy=0.950
eps=0.50 accuracy=0.840
eps=0.75 accuracy=0.660
eps=1.00 accuracy=0.505

Learning outcomes

After this chapter, you should be able to:

  1. Read the printed weights, the bias, and the five accuracies.
  2. Describe the step as a signed move of size eps on a synthetic point.
  3. Keep the €500 review rule out of this print.

15.1 Training uses seed 7. The accuracy loop only evaluates.

random.Random(7) draws two clusters. A point labelled 1 is centred at +1 on both axes. A point labelled 0 is centred at −1. The Gaussian scale is 0.7. Four hundred points train. Two hundred points are held for the accuracy lines. Logistic regression starts at weights [0, 0] and bias 0, runs 200 epochs, and steps by 0.1 times the mean gradient. The printed result of that training is w=(1.795, 1.756) and b=-0.080.

acc does not train again. For each test point it computes p, then builds a new point by adding eps * sign((p - y) * w) on each axis. It scores the new point with the same weights and counts a success when the sigmoid output is at least 0.5 and the label agrees. At eps 0 the added term is zero, so the line is the clean accuracy 0.985. The later lines are 0.950, 0.840, 0.660 and 0.505. The tuple of eps values has five entries. A sixth eps is not printed.

The points are numbers from a generator. They are not pixels, and they are not scanned receipts. The manuscript's decision for ReceiptSort — manual review above €500 or when confidence is low — lives in the adoption prose. It is not a column of this print. Nothing in this chapter is a procedure for altering a real receipt, a real image, or a production classifier.

Lesson table; scroll horizontally to read all columns →

eps Printed accuracy What it is
0.00 0.985 Clean test points
0.50 0.840 Midpoint of the five
1.00 0.505 Last printed line
any other not printed Not a result

15.2 Worked example

Lesson table; scroll horizontally to read all columns →

Proposal for the Tallis note Decision
Quote the five accuracies and the weights Keep
Add eps 1.25 because the trend is clear Refuse
Turn the sign step into steps for a receipt scan Refuse
Leave the €500 review in the adoption plan, as prose Keep

Synthetic case. ReceiptSort's review rule and this weight vector are different objects.

Errors and limits

A falling accuracy on toy points is a lesson about this classifier. It is not evidence that a client's receipt was altered.

Apply

  • EX061 — Five lines. What do the weights and the five accuracies say, and what must the note refuse to add?
    Show marking criteria
    Rubric: 3 = w=(1.795, 1.756), b=-0.080, accuracies 0.985 down to 0.505; no sixth eps; the €500 rule stays prose; no receipt procedure;; 2 = the five lines and the refusal;; 1 = one accuracy;; 0 = adds an eps or a procedure.
Worked answers

EX061. The printed weights are (1.795, 1.756) and the bias is -0.080. The five accuracies run from 0.985 at eps 0.00 to 0.505 at eps 1.00. No sixth eps is printed. The €500 review stays in the adoption prose. The sign step is on synthetic points and is not a receipt procedure.