Added regularization matrix creation routine