irt-service/app/lib/irt/item_response_function.py

13 lines
367 B
Python

from models.three_parameter_logitistc import ThreeParameterLogistic
class ItemResponseFunction():
def __init__(self, irt_model):
self.model_data = irt_model
def calculate(self, **kwargs):
if self.model_data.model == '3PL':
return ThreeParameterLogistic.new(self.model_data, kwargs).result
else:
# potentially error out
return None