'Apply approximate feature map to X.
Parameters
X : {array-like, sparse matrix}, shape = (n_samples, n_features)
Returns
X_new : {array, sparse matrix},                shape = (n_samples, n_features * (2*sample_steps + 1))
Whether the return value is an array of sparse matrix depends on
the type of the input X.'

def transform(self, X):

    msg = '%(name)s    is    not    fitted.    Call    fit    to    set    the    parameters    before    calling    transform'
    check_is_fitted(self, 'sample_interval_', msg=msg)
    X = check_array(X, accept_sparse='csr')
    sparse = sp.issparse(X)
    if ((X.data if sparse else X) < 0).any():
        raise ValueError('Entries    of    X    must    be    non-negative.')
    transf = (self._transform_sparse if sparse else self._transform_dense)
    return transf(X)
