From 39b71c17a7eddd722f71f82cd358c9a50995a7db Mon Sep 17 00:00:00 2001 From: brotherzhafif Date: Sat, 19 Oct 2024 20:36:58 +0700 Subject: [PATCH] refactor: Changing Weird Class Names --- Calculations.py | 2 +- Summary.py => Data.py | 0 FrequencyTable.py | 16 ++++++++-------- Pythistic-PYPI | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) rename Summary.py => Data.py (100%) diff --git a/Calculations.py b/Calculations.py index df69cf3..a73030b 100644 --- a/Calculations.py +++ b/Calculations.py @@ -1,4 +1,4 @@ -class Describe: +class Calculate: @staticmethod def mean(dataset): return sum(dataset) / len(dataset) diff --git a/Summary.py b/Data.py similarity index 100% rename from Summary.py rename to Data.py diff --git a/FrequencyTable.py b/FrequencyTable.py index c2f5ba3..7e37013 100644 --- a/FrequencyTable.py +++ b/FrequencyTable.py @@ -1,6 +1,6 @@ import numpy as np -from Calculations import Describe -from Summary import Result +from Calculations import Calculate +from Data import Result class Classify: def __init__(self, dataset): @@ -18,12 +18,12 @@ def __init__(self, dataset): def _calculate_statistics(self): self.sum = sum(self.dataset) - self.mean = Describe.mean(self.dataset) - self.median = Describe.median(self.dataset) - self.variance = Describe.variance(self.dataset, self.mean) - self.deviation = Describe.standard_deviation(self.variance) - self.skewness = Describe.skewness(self.dataset, self.mean, self.deviation) - self.kurtosis = Describe.kurtosis(self.dataset, self.mean, self.deviation) + self.mean = Calculate.mean(self.dataset) + self.median = Calculate.median(self.dataset) + self.variance = Calculate.variance(self.dataset, self.mean) + self.deviation = Calculate.standard_deviation(self.variance) + self.skewness = Calculate.skewness(self.dataset, self.mean, self.deviation) + self.kurtosis = Calculate.kurtosis(self.dataset, self.mean, self.deviation) def _calculate_classes(self): self.classes = 1 + (3.222 * np.log10(self.length)) diff --git a/Pythistic-PYPI b/Pythistic-PYPI index 52658b8..81ae6f2 160000 --- a/Pythistic-PYPI +++ b/Pythistic-PYPI @@ -1 +1 @@ -Subproject commit 52658b8930a95f0fa36f4b788b3f412b4af2f8a2 +Subproject commit 81ae6f279a13d5bc7664313adedcff587a1d5ce3