Added use of check_random_state for use of rng.