construct based irt library and add item response function

This commit is contained in:
Josh Burman
2021-10-29 05:43:32 +00:00
parent 98f316da1e
commit dd3188b798
5 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,13 @@
class ThreeParameterLogistic:
def __init__(self, model_params, kwargs):
self.model_params = model_params
# check if exists, if not error out
self.b_param = kwargs['b_param']
self.e = 2.71828
self.theta = kwargs['theta']
def result(self):
a = self.model_params.a
c = self.model_params.c
return c + (1 - c) * (1 / (1 + e**(-a * (self.theta - self.b_param))))