Get marginal probabilities with hash table

Previously this was by regular MATLAB matrices. Hash tables speed calculations
up significantly since lookup is constant time.
Test classifier - got 30% accuracy. Win.