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.
Exemples de base (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
exécuté le 2026-10-02 04:23 dans la bibliothèque au commit 0e72e2e2c ; tiré de numeric_logistic_narrated.ring(s'ouvre dans un nouvel onglet)
Les extensions de cette méthode
Chaque extension, et si elle existe pour cette méthode ; une extension qui existe se compose avec les autres (FindSTCS).
Chaque exemple est un fichier de test de la bibliothèque, exécuté dans la bibliothèque pour cette page ; seuls ceux dont la sortie a tenu toutes les promesses écrites par leur fichier sont montrés. Les explications, les titres et le code sont ceux de la bibliothèque, en anglais.

