Skip to content

Commit

Permalink
remove division by 100
Browse files Browse the repository at this point in the history
  • Loading branch information
Reckony committed Mar 25, 2024
1 parent 45c284c commit 0a08222
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/abul_naga_yalcin_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ def any_index(
ds = info(ds=responses, indicators=categories)

ds = ds["cumulative"]
p_alpha = ds[ds.index < m] / 100
p_beta = ds[ds.index >= m] / 100
p_alpha = ds[ds.index < m]
p_beta = ds[ds.index >= m]

# below median
p_alpha_alpha = p_alpha**alpha
Expand Down
2 changes: 1 addition & 1 deletion src/apouey_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_apouey_index(categories: ArrayLike, responses: Sequence) -> float:
sum_fc_alpha = 0

for category in range(1, number_of_categories):
fc = proportions_info["cumulative"][category] / 100
fc = proportions_info["cumulative"][category]
sum_fc_alpha += abs(fc - 0.5) ** alpha

apouey_index = 1 - (2**alpha) / categories[-2] * sum_fc_alpha
Expand Down

0 comments on commit 0a08222

Please sign in to comment.