예제 #1
0
 def __init__(self,
              classification_method=("svm", None),
              point_generation_method=1):
     """
     Creates SlantingTree with provided classifier.
     Raises a ValueError exception if provided parameters are incorrect.
     :param classification_method: tuple consisting of string containing name of classification algorithm
     and its parameters (None for default ones)
     """
     BinaryTree.__init__(self)
     self.classifier = classifiers.classifier_object(classification_method)
     self._point_generation_method = point_generation_method
예제 #2
0
 def __init__(self,
              clustering_method=("spectral", None),
              classification_method=("svm", None)):
     """
     Creates BalancedTree using provided clustering and classification methods.
     Raises a ValueError exception if provided parameters are incorrect.
     :param clustering_method: tuple consisting of string containing name of clustering algorithm
     and its parameters (None for default ones)
     :param classification_method: tuple consisting of string containing name of classification algorithm
     and its parameters (None for default ones)
     """
     BinaryTree.__init__(self)
     self.clustering = classifiers.clustering_object(clustering_method)
     self.classifier = classifiers.classifier_object(classification_method)