/ self.samples_seen) / self.samples_seen
if self.samples_seen > 1 and sd_squared >= 0:
mean = self.sum_of_attribute_values[i] / self.samples_seen
sd = np.sqrt(sd_squared)
normalized_sample.append((X[i] - mean) / (3 * sd))
else:
normalized_sample.append(0.0)
if self.samples_seen > 1:
After Change
else:
normalized_sample.append(0.0)
else:
normalized_sample.append(0.0)
if self.samples_seen > 1:
normalized_sample.append(1.0) // Value to be multiplied with the constant factor
else:
normalized_sample.append(0.0)