'Set parameters.'

def fit(self, X, y=None):

    X = check_array(X, accept_sparse='csr')
    if (self.sample_interval is None):
        if (self.sample_steps == 1):
            self.sample_interval_ = 0.8
        elif (self.sample_steps == 2):
            self.sample_interval_ = 0.5
        elif (self.sample_steps == 3):
            self.sample_interval_ = 0.4
        else:
            raise ValueError('If    sample_steps    is    not    in    [1,    2,    3],    you    need    to    provide    sample_interval')
    else:
        self.sample_interval_ = self.sample_interval
    return self
