class_docstr: !
  @brief Class represents TTSAS (Two-Threshold Sequential Algorithmic Scheme).
  @details Clustering results of BSAS and MBSAS are strongly dependent on the order in which the points in data.
            TTSAS helps to overcome this shortcoming by using two threshold parameters. The first - if the distance
            to the nearest cluster is less than the first threshold then point is assigned to the cluster. The
            second - if distance to the nearest cluster is greater than the second threshold then new cluster is
            allocated.
  
  Code example of TTSAS usage:
  @code
      from pyclustering.cluster.bsas import bsas_visualizer
      from pyclustering.cluster.ttsas import ttsas
      from pyclustering.samples.definitions import SIMPLE_SAMPLES
      from pyclustering.utils import read_sample
  
      # Read data sample from 'Simple03.data'.
      sample = read_sample(SIMPLE_SAMPLES.SAMPLE_SIMPLE3)
  
      # Prepare algorithm's parameters.
      threshold1 = 1.0
      threshold2 = 2.0
  
      # Create instance of TTSAS algorithm.
      ttsas_instance = ttsas(sample, threshold1, threshold2)
      ttsas_instance.process()
  
      # Get clustering results.
      clusters = ttsas_instance.get_clusters()
      representatives = ttsas_instance.get_representatives()
  
      # Display results using BSAS visualizer.
      bsas_visualizer.show_clusters(sample, clusters, representatives)
  @endcode
  
  @see pyclustering.cluster.bsas, pyclustering.cluster.mbsas
class_docstr_tok: ["!","@","brief","Class","represents","TTSAS","(","Two-Threshold","Sequential","Algorithmic","Scheme",")",".","@","details","Clustering","results","of","BSAS","and","MBSAS","are","strongly","dependent","on","the","order","in","which","the","points","in","data",".","TTSAS","helps","to","overcome","this","shortcoming","by","using","two","threshold","parameters",".","The","first","-","if","the","distance","to","the","nearest","cluster","is","less","than","the","first","threshold","then","point","is","assigned","to","the","cluster",".","The","second","-","if","distance","to","the","nearest","cluster","is","greater","than","the","second","threshold","then","new","cluster","is","allocated",".","Code","example","of","TTSAS","usage",":","@","code","from","pyclustering.cluster.bsas","import","bsas_visualizer","from","pyclustering.cluster.ttsas","import","ttsas","from","pyclustering.samples.definitions","import","SIMPLE_SAMPLES","from","pyclustering.utils","import","read_sample","#","Read","data","sample","from","'Simple03.data","'",".","sample","=","read_sample","(","SIMPLE_SAMPLES.SAMPLE_SIMPLE3",")","#","Prepare","algorithm","'s","parameters",".","threshold1","=","1.0","threshold2","=","2.0","#","Create","instance","of","TTSAS","algorithm",".","ttsas_instance","=","ttsas","(","sample",",","threshold1",",","threshold2",")","ttsas_instance.process","(",")","#","Get","clustering","results",".","clusters","=","ttsas_instance.get_clusters","(",")","representatives","=","ttsas_instance.get_representatives","(",")","#","Display","results","using","BSAS","visualizer",".","bsas_visualizer.show_clusters","(","sample",",","clusters",",","representatives",")","@","endcode","@","see","pyclustering.cluster.bsas",",","pyclustering.cluster.mbsas"]
docstr: !
  @brief Creates TTSAS algorithm.
  
  @param[in] data (list): Input data that is presented as list of points (objects), each point should be represented by list or tuple.
  @param[in] threshold1: Dissimilarity level (distance) between point and its closest cluster, if the distance is
              less than 'threshold1' value then point is assigned to the cluster.
  @param[in] threshold2: Dissimilarity level (distance) between point and its closest cluster, if the distance is
              greater than 'threshold2' value then point is considered as a new cluster.
  @param[in] ccore (bool): If True than DLL CCORE (C++ solution) will be used for solving.
  @param[in] **kwargs: Arbitrary keyword arguments (available arguments: 'metric').
  
  <b>Keyword Args:</b><br>
      - metric (distance_metric): Metric that is used for distance calculation between two points.
docstr_tok: ["!","@","brief","Creates","TTSAS","algorithm",".","@","param","[","in","]","data","(","list",")",":","Input","data","that","is","presented","as","list","of","points","(","objects",")",",","each","point","should","be","represented","by","list","or","tuple",".","@","param","[","in","]","threshold1",":","Dissimilarity","level","(","distance",")","between","point","and","its","closest","cluster",",","if","the","distance","is","less","than","'threshold1","'","value","then","point","is","assigned","to","the","cluster",".","@","param","[","in","]","threshold2",":","Dissimilarity","level","(","distance",")","between","point","and","its","closest","cluster",",","if","the","distance","is","greater","than","'threshold2","'","value","then","point","is","considered","as","a","new","cluster",".","@","param","[","in","]","ccore","(","bool",")",":","If","True","than","DLL","CCORE","(","C++","solution",")","will","be","used","for","solving",".","@","param","[","in","]","*","*","kwargs",":","Arbitrary","keyword","arguments","(","available","arguments",":","'metric","'",")",".","<","b",">","Keyword","Args",":","<","\/b",">","<","br",">","-","metric","(","distance_metric",")",":","Metric","that","is","used","for","distance","calculation","between","two","points","."]
code: def __init__(
      self, data, threshold1, threshold2, ccore=True, **kwargs
  ):
      """!
      @brief Creates TTSAS algorithm.
  
      @param[in] data (list): Input data that is presented as list of points (objects), each point should be represented by list or tuple.
      @param[in] threshold1: Dissimilarity level (distance) between point and its closest cluster, if the distance is
                  less than 'threshold1' value then point is assigned to the cluster.
      @param[in] threshold2: Dissimilarity level (distance) between point and its closest cluster, if the distance is
                  greater than 'threshold2' value then point is considered as a new cluster.
      @param[in] ccore (bool): If True than DLL CCORE (C++ solution) will be used for solving.
      @param[in] **kwargs: Arbitrary keyword arguments (available arguments: 'metric').
  
      <b>Keyword Args:</b><br>
          - metric (distance_metric): Metric that is used for distance calculation between two points.
  
      """
  
      self._threshold2 = threshold2
      self._amount_skipped_objects = len(data)
      self._skipped_objects = [True] * len(data)
  
      super().__init__(data, len(data), threshold1, ccore, **kwargs)
  
file_path: pyclustering/pyclustering/cluster/ttsas.py
imports: from pyclustering.core.ttsas_wrapper import ttsas
  from pyclustering.core.metric_wrapper import metric_wrapper
  from pyclustering.cluster.bsas import bsas
label_desc: Use image node_id 1 to create a new ttsas object from inherited base classes: bsas with example: obj = ttsas(data, threshold1, threshold2, ccore)