weights_matrix function

Generate a matrix to store feature weights