def __init__(self, targets=None, dtype=np.int64): super().__init__() if targets is not None: self.n_targets = len(targets) else: self.n_targets = 0 self.confusion_matrix = ConfusionMatrix(self.n_targets, dtype) self.last_true_label = None self.last_prediction = None self.last_sample = None self.sample_count = 0 self.majority_classifier = 0 self.correct_no_change = 0 self.targets = targets
def __init__(self, targets=None, dtype=np.int64, window_size=200): super().__init__() if targets is not None: self.n_targets = len(targets) else: self.n_targets = 0 self.confusion_matrix = ConfusionMatrix(self.n_targets, dtype) self.last_class = None self.targets = targets self.window_size = window_size self.true_labels = FastBuffer(window_size) self.predictions = FastBuffer(window_size) self.temp = 0 self.last_prediction = None self.last_true_label = None self.last_sample = None self.majority_classifier = 0 self.correct_no_change = 0 self.majority_classifier_correction = FastBuffer(window_size) self.correct_no_change_correction = FastBuffer(window_size)