Softanza
StartFrançais
Softanza
The library documents itself · NLP & linguistics

stzLogisticRegression

11 own methods · 0 forms written with extensions, listed under their method

the source: base/learning/stzLogisticRegression.ring(opens in a new tab) · All classes · The area reference: NLP & linguistics

Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean

Examples: 0 come from the library's tests; 2 were composed from each method's signature and run for this page, on a fresh object, for example oDS = new stzTrainingSet([]) oDS.AddExample([ 1, 1 ], "yes") oDS.AddExample([ 1, 0 ], "yes") oDS.AddExample([ 0, 1 ], "no") oDS.AddExample([ 0, 0 ], "no") o1 = new stzLogisticRegression(oDS). 9 methods have none yet. Examples run on 2026-10-03 20:23 inside the library at commit 0e72e2e2c.

Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
TrainingSetQ
THE HELD SET IS LIVE THROUGH HERE. Haro COPIES an object into an attribute, so the set handed to the constructor is a SNAPSHOT: growing the caller's own object afterwards would NOT reach this learner. Grow it through this accessor -- oLearner.TrainingSetQ().AddExample(...) -- which reaches the real held set (accessor + method call is live in Haro).no extension
SetLearningRate
(no comment in the source: the name reads as a sentence) set learning rateno extension
The drift against the old loop was measured, not assumed, and it is never zero: 1e-16 after ONE epoch, 1e-15 at ten, 1e-14 at a hundred and still 1e-14 at five hundred. That is the one thing that could not be held fixed -- Haro's exp is the C library's, the engine's is Zig's, they agree to within an ulp, and gradient descent feeds each step into the next so the difference grows about a decade per five hundred epochs. Against weights of magnitude 1 to 10 it stays around 1e-15 relative, and both loops classify identically. 1 examples runno extension
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. 1 examples runno extension
Probabilities
Probabilities for many rows in ONE crossing. TrainingAccuracy() below is the reason this exists: it scores every training example, and a round trip per row would have made the diagnostic cost more than the fit it diagnoses.no extension
(no comment in the source: the name reads as a sentence) classify 1 examples runno extension
(no comment in the source: the name reads as a sentence) weights 1 examples runno extension
Bias
(no comment in the source: the name reads as a sentence) bias
composed example
oDS = new stzTrainingSet([])
oDS.AddExample([ 1, 1 ], "yes")
oDS.AddExample([ 1, 0 ], "yes")
oDS.AddExample([ 0, 1 ], "no")
oDS.AddExample([ 0, 0 ], "no")
o1 = new stzLogisticRegression(oDS)
? o1.Bias()
#--> 0
composed from the signature, run for this page
no extension
Needing standardised features is the normal requirement for stochastic gradient descent, not a defect here -- but nothing surfaced the failure. This does: a diverged model scores around chance on data it has already seen, where a converged one scores near 1. 1 examples run
composed example
oDS = new stzTrainingSet([])
oDS.AddExample([ 1, 1 ], "yes")
oDS.AddExample([ 1, 0 ], "yes")
oDS.AddExample([ 0, 1 ], "no")
oDS.AddExample([ 0, 0 ], "no")
o1 = new stzLogisticRegression(oDS)
? o1.TrainingAccuracy()
#--> 0
composed from the signature, run for this page
no extension
(no comment in the source: the name reads as a sentence) why 1 examples runno extension