fixed tf_idf() in Matrix