Skip to content

Commit

Permalink
refactor: Changing Weird Class Names
Browse files Browse the repository at this point in the history
  • Loading branch information
brotherzhafif committed Oct 19, 2024
1 parent 04f1ddc commit 39b71c1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Calculations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Describe:
class Calculate:
@staticmethod
def mean(dataset):
return sum(dataset) / len(dataset)
Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions FrequencyTable.py
Original file line number Diff line number Diff line change
@@ -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):
Expand All @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion Pythistic-PYPI
Submodule Pythistic-PYPI updated from 52658b to 81ae6f

0 comments on commit 39b71c1

Please sign in to comment.