The library documents itself · NLP & linguistics
stzKnn
13 own methods · 0 forms written with extensions, listed under their method
the source: base/learning/stzKnn.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; 5 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 stzKnn(oDS). 8 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
a different thing whenever the vote overrules proximityno 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
SetApproximate
Label agreement measured 1.000 in both rows above -- on separable data the vote absorbed every neighbour the forest missed. Do not read that as a guarantee; read it as the reason AgreementWithExact() takes YOUR queries.no extension
IsApproximate
(no comment in the source: the name reads as a sentence) is approximateno extension
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 stzKnn(oDS) ? o1.IsApproximate() #--> 0composed from the signature, run for this page
SetApproximateTrees
More trees, better recall, bigger index and a slower build.no extension
SetApproximateBudget
Candidates examined per query before the true distances decide. 0 lets the engine scale it from k. This is the recall dial.no extension
ApproximateTrees
(no comment in the source: the name reads as a sentence) approximate treesno extension
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 stzKnn(oDS) ? o1.ApproximateTrees() #--> 24composed from the signature, run for this page
ApproximateBudget
(no comment in the source: the name reads as a sentence) approximate budgetno extension
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 stzKnn(oDS) ? o1.ApproximateBudget() #--> 0composed from the signature, run for this page
AgreementWithExact
Returns the fraction of the given queries on which approximate and exact classification agree. Each mode is built once, not once per query.no extension
K
(no comment in the source: the name reads as a sentence) kno extension
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 stzKnn(oDS) ? o1.K() #--> 3composed from the signature, run for this page
(no comment in the source: the name reads as a sentence) classify 1 examples runno extension
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 stzKnn(oDS) ? o1.Classify([ 2, 3 ]) #--> yescomposed from the signature, run for this page
Why
(no comment in the source: the name reads as a sentence) whyno extension

