oc_chat
Loading...
Searching...
No Matches
token_classifier.Model Class Reference

Public Member Functions

list[float] scores (self, dict[int, float] vector)
list[float] probabilities (self, dict[int, float] vector)
tuple[str, dict[str, float]] predict (self, str command)

Static Public Attributes

list weights [list[float]]
list biases [float]

Detailed Description

A three-class softmax over the hashed n-gram space.

Definition at line 140 of file token_classifier.py.

Member Function Documentation

◆ predict()

tuple[str, dict[str, float]] token_classifier.Model.predict ( self,
str command )
The predicted verdict for *command* and the full forecast.

Definition at line 164 of file token_classifier.py.

Here is the call graph for this function:

◆ probabilities()

list[float] token_classifier.Model.probabilities ( self,
dict[int, float] vector )
The softmax of :meth:`scores`, computed shift-stably.

Definition at line 155 of file token_classifier.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scores()

list[float] token_classifier.Model.scores ( self,
dict[int, float] vector )
The unnormalised class scores of one feature vector.

Definition at line 146 of file token_classifier.py.

Here is the caller graph for this function:

Member Data Documentation

◆ biases

list token_classifier.Model.biases [float]
static

Definition at line 144 of file token_classifier.py.

◆ weights

list token_classifier.Model.weights [list[float]]
static

Definition at line 143 of file token_classifier.py.


The documentation for this class was generated from the following file: