Rewrite hypothesis() to take a raw feature vector.  Use mulTransposed().