23 lines
753 B
Python
23 lines
753 B
Python
from lib.irt.item_information_function import ItemInformationFunction
|
|
|
|
|
|
class TestInformationFunction():
|
|
|
|
def __init__(self, irt_model):
|
|
self.irt_model = irt_model
|
|
self.iif = ItemInformationFunction(irt_model)
|
|
|
|
# determins the amount of information
|
|
# at a certain theta (ability level) of the sum of a question set correct
|
|
# detailed further on page 166, equation 4 here:
|
|
# https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5978482/pdf/10.1177_0146621615613308.pdf
|
|
def calculate(self, items, **kwargs):
|
|
sum = 0
|
|
|
|
for item in items:
|
|
result = self.iif.calculate(b_param=item.b_param,
|
|
theta=kwargs['theta'])
|
|
sum += result
|
|
|
|
return sum
|