You need an "else", and raise an error here: if somebody passed in something that is neither "svd", nor "randomized".