class_docstr: Kshape clustering for time series.
  
  Direct interface to ``tslearn.clustering.KShape``.
  
  Parameters
  ----------
  n_clusters: int, defaults = 8
      The number of clusters to form as well as the number of
      centroids to generate.
  init_algorithm: str or np.ndarray, defaults = 'random'
      Method for initializing cluster centers. Any of the following are valid:
      ['random']. Or a np.ndarray of shape (n_clusters, ts_size, d) and gives the
      initial centers.
  n_init: int, defaults = 10
      Number of times the k-means algorithm will be run with different
      centroid seeds. The final result will be the best output of n_init
      consecutive runs in terms of inertia.
  max_iter: int, defaults = 30
      Maximum number of iterations of the k-means algorithm for a single
      run.
  tol: float, defaults = 1e-4
      Relative tolerance with regards to Frobenius norm of the difference
      in the cluster centers of two consecutive iterations to declare
      convergence.
  verbose: bool, defaults = False
      Verbosity mode.
  random_state: int or np.random.RandomState instance or None, defaults = None
      Determines random number generation for centroid initialization.
  
  Attributes
  ----------
  labels_: np.ndarray (1d array of shape (n_instance,))
      Labels that is the index each time series belongs to.
  inertia_: float
      Sum of squared distances of samples to their closest cluster center, weighted by
      the sample weights if provided.
  n_iter_: int
      Number of iterations run.
class_docstr_tok: ["Kshape","clustering","for","time","series",".","Direct","interface","to","``","tslearn.clustering.KShape","``",".","Parameters","--","--","--","--","--","n_clusters",":","int",",","defaults","=","8","The","number","of","clusters","to","form","as","well","as","the","number","of","centroids","to","generate",".","init_algorithm",":","str","or","np.ndarray",",","defaults","=","'random'","Method","for","initializing","cluster","centers",".","Any","of","the","following","are","valid",":","[","'random","'","]",".","Or","a","np.ndarray","of","shape","(","n_clusters",",","ts_size",",","d",")","and","gives","the","initial","centers",".","n_init",":","int",",","defaults","=","10","Number","of","times","the","k-means","algorithm","will","be","run","with","different","centroid","seeds",".","The","final","result","will","be","the","best","output","of","n_init","consecutive","runs","in","terms","of","inertia",".","max_iter",":","int",",","defaults","=","30","Maximum","number","of","iterations","of","the","k-means","algorithm","for","a","single","run",".","tol",":","float",",","defaults","=","1e-4","Relative","tolerance","with","regards","to","Frobenius","norm","of","the","difference","in","the","cluster","centers","of","two","consecutive","iterations","to","declare","convergence",".","verbose",":","bool",",","defaults","=","False","Verbosity","mode",".","random_state",":","int","or","np.random.RandomState","instance","or","None",",","defaults","=","None","Determines","random","number","generation","for","centroid","initialization",".","Attributes","--","--","--","--","--","labels_",":","np.ndarray","(","1d","array","of","shape","(","n_instance",",",")",")","Labels","that","is","the","index","each","time","series","belongs","to",".","inertia_",":","float","Sum","of","squared","distances","of","samples","to","their","closest","cluster","center",",","weighted","by","the","sample","weights","if","provided",".","n_iter_",":","int","Number","of","iterations","run","."]
docstr: Return testing parameter settings for the estimator.
  
  Parameters
  ----------
  parameter_set : str, default="default"
      Name of the set of test parameters to return, for use in tests. If no
      special parameters are defined for a value, will return `"default"` set.
  
  
  Returns
  -------
  params : dict or list of dict, default = {}
      Parameters to create testing instances of the class
      Each dict are parameters to construct an "interesting" test instance, i.e.,
      `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
      `create_test_instance` uses the first (or only) dictionary in `params`
docstr_tok: ["Return","testing","parameter","settings","for","the","estimator",".","Parameters","--","--","--","--","--","parameter_set",":","str",",","default=","''","default","''","Name","of","the","set","of","test","parameters","to","return",",","for","use","in","tests",".","If","no","special","parameters","are","defined","for","a","value",",","will","return","`","``","default","''","`","set",".","Returns","--","--","--","-","params",":","dict","or","list","of","dict",",","default","=","{","}","Parameters","to","create","testing","instances","of","the","class","Each","dict","are","parameters","to","construct","an","``","interesting","''","test","instance",",","i.e.",",","`","MyClass","(","*","*","params",")","`","or","`","MyClass","(","*","*","params","[","i","]",")","`","creates","a","valid","test","instance",".","`","create_test_instance","`","uses","the","first","(","or","only",")","dictionary","in","`","params","`"]
code: def get_test_params(cls, parameter_set="default"):
      """Return testing parameter settings for the estimator.
  
      Parameters
      ----------
      parameter_set : str, default="default"
          Name of the set of test parameters to return, for use in tests. If no
          special parameters are defined for a value, will return `"default"` set.
  
  
      Returns
      -------
      params : dict or list of dict, default = {}
          Parameters to create testing instances of the class
          Each dict are parameters to construct an "interesting" test instance, i.e.,
          `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
          `create_test_instance` uses the first (or only) dictionary in `params`
      """
      params1 = {
          "n_clusters": 3,
          "n_init": 2,
          "max_iter": 2,
          "tol": 1e-3,
          "verbose": False,
          "random_state": 2,
      }
      params2 = {
          "n_clusters": 2,
          "init_algorithm": "random",
          "n_init": 1,
          "max_iter": 1,
          "tol": 1e-4,
          "verbose": False,
          "random_state": 1,
      }
      return [params1, params2]
  
file_path: sktime/sktime/clustering/k_shapes.py
imports: from typing import Union
  import numpy
  from numpy.random import RandomState
  from sktime.base.adapters._tslearn import _TslearnAdapter
  from sktime.clustering.base import BaseClusterer
label_desc: Use image node_id 4 for calling the TimeSeriesKShapes obj's underlying member method code with example usage: obj.get_test_params(cls, parameter_set) and returns: list