- All Implemented Interfaces:
- java.io.Serializable
public class Weight
extends java.lang.Object
implements java.io.Serializable
Stores one row of the sparse matrix which makes up the multiclass perceptron.
Uses a lot of bit fiddling to get the desired results. What we
want is a row of scores representing transitions where each score
is the score for that transition (for the feature using this Weight
object). Since the average model seems to have about 3 non-zero
scores per feature, we condense that by keeping pairs of index and
score. However, we can then further condense that by bit packing
the index and score into one long. This cuts down on object
creation and makes it faster to read/write the models.
Thankfully, all of the unpleasant bit fiddling can be hidden away
in this one class.
- Author:
- John Bauer
- See Also:
- Serialized Form