linking white paper and lower case irt model selection

This commit is contained in:
brmnjsh 2023-10-26 15:09:58 +00:00
parent 433879c205
commit 2984f18f9f
4 changed files with 6 additions and 3 deletions

View File

@ -21,7 +21,7 @@ class ItemInformationFunction():
return (self.model_data.a_param * q *
(p - self.model_data.c_param)**2) / (p * (
(1 - self.model_data.c_param)**2))
elif self.model_data.model == 'RASCH':
elif self.model_data.model == 'rasch':
p = Rasch(self.model_data, kwargs).result()
q = 1 - p
return p * q

View File

@ -11,7 +11,7 @@ class ItemResponseFunction():
def calculate(self, **kwargs):
if self.model_data.model == '3PL':
return ThreeParameterLogistic(self.model_data, kwargs).result()
elif self.model_data.model == 'RASCH':
elif self.model_data.model == 'rasch':
return Rasch(self.model_data, kwargs).result()
else:
raise ItemGenerationError("irt model not supported or provided")

View File

@ -5,6 +5,9 @@ from lib.irt.models.base import *
class Rasch(Base):
def result(self):
# contains the primary Rasch function, determining the probably of an inidividual
# that an individual at a certain theta would get a particular question correct
# https://edres.org/irt/baker/chapter6.pdf
return (1 / (1 + self.e(-1 * (self.theta - self.b_param))))
@classmethod

View File

@ -1,6 +1,6 @@
import json, random, io, logging
from pulp import LpProblem, LpVariable, LpMinimize, LpMaximize, LpAffineExpression, LpConstraint, LpStatus, lpSum
from pulp import LpProblem, LpVariable, LpMinimize, LpStatus, lpSum
from lib.application_configs import ApplicationConfigs
from helpers import aws_helper, tar_helper, csv_helper, service_helper, solver_helper