Skip to content

Commit

Permalink
iterate c-1 times
Browse files Browse the repository at this point in the history
  • Loading branch information
Reckony committed Oct 9, 2023
1 parent 1f68337 commit 44a6cfa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/apouey_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def get_apouey_index(categories: int, responses: typing.List[int]) -> float:
"Category out of range. Please use category within range 3-10."
)
resp_cumulative_proportions = _get_cumulative_proportions(
_get_resp_proportions(categories, responses)
_get_proportions(categories, responses)
)
sum_fc_alpha = 0
for category in range(1, categories + 1):
for category in range(1, categories - 1):
fc = resp_cumulative_proportions[category]
sum_fc_alpha += abs(fc - 0.5) ** ALPHA_LOOKUP_TABLE[categories]

Expand All @@ -32,7 +32,7 @@ def get_apouey_index(categories: int, responses: typing.List[int]) -> float:
return round(result, 2)


def _get_resp_proportions(categories: int, responses: typing.List[int]) -> dict:
def _get_proportions(categories: int, responses: typing.List[int]) -> dict:
proportions_dict = {}
responses_num = len(responses)
for category in range(1, categories + 1):
Expand Down

0 comments on commit 44a6cfa

Please sign in to comment.