class_docstr: RandOm Convolutional KErnel Transformation.
  
  This algorithm randomly generates a great variety of convolutional kernels
  and extracts two features for each convolution: the maximum and the
  proportion of positive values.
  
  Parameters
  ----------
  n_kernels : int (default = 10000)
      Number of kernels.
  
  kernel_sizes : array-like (default = (7, 9, 11))
      The possible sizes of the kernels.
  
  random_state : None, int or RandomState instance (default = None)
      The seed of the pseudo random number generator to use when shuffling
      the data. If int, random_state is the seed used by the random number
      generator. If RandomState instance, random_state is the random number
      generator. If None, the random number generator is the RandomState
      instance used by `np.random`.
  
  Attributes
  ----------
  weights_ : array, shape = (n_kernels, max(kernel_sizes))
      Weights of the kernels. Zero padding values are added.
  
  length_ : array, shape = (n_kernels,)
      Length of each kernel.
  
  bias_ : array, shape = (n_kernels,)
      Bias of each kernel.
  
  dilation_ : array, shape = (n_kernels,)
      Dilation of each kernel.
  
  padding_ : array, shape = (n_kernels,)
      Padding of each kernel.
  
  References
  ----------
  .. [1] A. Dempster, F. Petitjean and G. I. Webb, "ROCKET: Exceptionally
         fast and accurate time series classification using random
         convolutional kernels". https://arxiv.org/abs/1910.13051.
  
  Examples
  --------
  >>> from pyts.transformation import ROCKET
  >>> X = np.arange(100).reshape(5, 20)
  >>> rocket = ROCKET(n_kernels=10)
  >>> rocket.fit_transform(X).shape
  (5, 20)
class_docstr_tok: ["RandOm","Convolutional","KErnel","Transformation",".","This","algorithm","randomly","generates","a","great","variety","of","convolutional","kernels","and","extracts","two","features","for","each","convolution",":","the","maximum","and","the","proportion","of","positive","values",".","Parameters","--","--","--","--","--","n_kernels",":","int","(","default","=","10000",")","Number","of","kernels",".","kernel_sizes",":","array-like","(","default","=","(","7",",","9",",","11",")",")","The","possible","sizes","of","the","kernels",".","random_state",":","None",",","int","or","RandomState","instance","(","default","=","None",")","The","seed","of","the","pseudo","random","number","generator","to","use","when","shuffling","the","data",".","If","int",",","random_state","is","the","seed","used","by","the","random","number","generator",".","If","RandomState","instance",",","random_state","is","the","random","number","generator",".","If","None",",","the","random","number","generator","is","the","RandomState","instance","used","by","`","np.random","`",".","Attributes","--","--","--","--","--","weights_",":","array",",","shape","=","(","n_kernels",",","max","(","kernel_sizes",")",")","Weights","of","the","kernels",".","Zero","padding","values","are","added",".","length_",":","array",",","shape","=","(","n_kernels",",",")","Length","of","each","kernel",".","bias_",":","array",",","shape","=","(","n_kernels",",",")","Bias","of","each","kernel",".","dilation_",":","array",",","shape","=","(","n_kernels",",",")","Dilation","of","each","kernel",".","padding_",":","array",",","shape","=","(","n_kernels",",",")","Padding","of","each","kernel",".","References","--","--","--","--","--","..","[","1","]","A.","Dempster",",","F.","Petitjean","and","G.","I.","Webb",",","``","ROCKET",":","Exceptionally","fast","and","accurate","time","series","classification","using","random","convolutional","kernels","''",".","https",":","\/\/arxiv.org\/abs\/1910.13051",".","Examples","--","--","--","--",">",">",">","from","pyts.transformation","import","ROCKET",">",">",">","X","=","np.arange","(","100",")",".reshape","(","5",",","20",")",">",">",">","rocket","=","ROCKET","(","n_kernels=10",")",">",">",">","rocket.fit_transform","(","X",")",".shape","(","5",",","20",")"]
code: def _check_params(self, n_timestamps):
      if not isinstance(self.n_kernels, (int, np.integer)):
          raise TypeError(
              "'n_kernels' must be an integer (got {}).".format(
                  self.n_kernels
              )
          )
  
      if not isinstance(self.kernel_sizes, (list, tuple, np.ndarray)):
          raise TypeError(
              "'kernel_sizes' must be a list, a tuple or "
              "an array (got {}).".format(self.kernel_sizes)
          )
      kernel_sizes = check_array(
          self.kernel_sizes,
          ensure_2d=False,
          dtype="int64",
          accept_large_sparse=False,
      )
      if not np.all(1 <= kernel_sizes):
          raise ValueError(
              "All the values in 'kernel_sizes' must be "
              "greater than or equal to 1 ({} < 1).".format(
                  kernel_sizes.min()
              )
          )
      if not np.all(kernel_sizes <= n_timestamps):
          raise ValueError(
              "All the values in 'kernel_sizes' must be lower "
              "than or equal to 'n_timestamps' ({} > {}).".format(
                  kernel_sizes.max(), n_timestamps
              )
          )
  
      rng = check_random_state(self.random_state)
      seed = rng.randint(np.iinfo(np.uint32).max, dtype="u8")
  
      return kernel_sizes, seed
  
file_path: pyts/pyts/transformation/rocket.py
imports: from numba import njit, prange
  import numpy
  from sklearn.base import BaseEstimator
  from sklearn.utils.validation import check_array, check_is_fitted, check_random_state
  from ..base import UnivariateTransformerMixin
label_desc: Use image node_id 4 for calling the ROCKET obj's underlying member method code with example usage: obj._check_params(n_timestamps) and returns: kernel_sizes,  seed