Exemple #1
0
    def reset(self):
        """Resets the KMeans functions and average values.

        Resets: train, predict, avg_iterations, avg_error

        """
        self._init_func()
        if self.draw:
            init_plot()

        self.avg_iterations = 0
        self.avg_error = 0
    def __init__(self, draw, output, k, incremental=True, figsize=(15, 8)):
        self.draw = draw
        self.output = output
        self.k = k
        self.incremental = incremental
        self.avg_iterations = 0
        self.avg_error = 0
        self._init_func()
        self.centroids = None

        if draw:
            init_plot(figsize)
Exemple #3
0
    def __init__(self, draw, output, k, incremental=True, figsize=(15, 8)):
        self.draw = draw
        self.output = output
        self.k = k
        self.incremental = incremental
        self.avg_iterations = 0
        self.avg_error = 0
        self._init_func()
        self.centroids = None

        if draw:
            init_plot(figsize)
    def reset(self):
        """Resets the KMeans functions and average values.

        Resets: train, predict, avg_iterations, avg_error

        """
        self._init_func()
        if self.draw:
            init_plot()

        self.avg_iterations = 0
        self.avg_error = 0