Compactify code in scoring_matrix.__init()__.