Probability()
SCORED BY THE RULE IT WAS FITTED BY. This goes through the engine too, and not for speed -- one row is dominated by marshalling. It is here because Haro's exp and Zig's exp agree only to within an ulp, and a model whose predictions come from a slightly different function than its fit is a question nobody should have to think about. One definition, both ends.
Basic examples (1)
o = new stzLogisticRegression(new stzTrainingSet([
[ [0.0], "lo" ], [ [0.1], "lo" ], [ [0.2], "lo" ],
[ [0.8], "hi" ], [ [0.9], "hi" ], [ [1.0], "hi" ] ]))
o.Train(300)
# the weight has the sign the data implies
? o.Weights()[1] > 0
# low input -> low class
? o.Classify([0.05])
# high input -> high class
? o.Classify([0.95])
# ...and the boundary sits between them
? o.Probability([0.05]) < 0.5 and o.Probability([0.95]) > 0.5
# it fits its own training data
? o.TrainingAccuracy()
# Why() still narrates
? StzFindFirst("P('hi')", o.Why()) > 01 lo hi 1 1 1
run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from numeric_logistic_narrated.ring(opens in a new tab)
The extensions of this method
Each extension, and whether it exists for this method; an extension that exists combines with the others (FindSTCS).
Every example is a test file of the library, run inside the library for this page; only those whose output kept every promise their file wrote are shown.

