linking white paper and lower case irt model selection
This commit is contained in:
parent
433879c205
commit
2984f18f9f
@ -21,7 +21,7 @@ class ItemInformationFunction():
|
|||||||
return (self.model_data.a_param * q *
|
return (self.model_data.a_param * q *
|
||||||
(p - self.model_data.c_param)**2) / (p * (
|
(p - self.model_data.c_param)**2) / (p * (
|
||||||
(1 - self.model_data.c_param)**2))
|
(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()
|
p = Rasch(self.model_data, kwargs).result()
|
||||||
q = 1 - p
|
q = 1 - p
|
||||||
return p * q
|
return p * q
|
||||||
|
@ -11,7 +11,7 @@ class ItemResponseFunction():
|
|||||||
def calculate(self, **kwargs):
|
def calculate(self, **kwargs):
|
||||||
if self.model_data.model == '3PL':
|
if self.model_data.model == '3PL':
|
||||||
return ThreeParameterLogistic(self.model_data, kwargs).result()
|
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()
|
return Rasch(self.model_data, kwargs).result()
|
||||||
else:
|
else:
|
||||||
raise ItemGenerationError("irt model not supported or provided")
|
raise ItemGenerationError("irt model not supported or provided")
|
||||||
|
@ -5,6 +5,9 @@ from lib.irt.models.base import *
|
|||||||
class Rasch(Base):
|
class Rasch(Base):
|
||||||
|
|
||||||
def result(self):
|
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))))
|
return (1 / (1 + self.e(-1 * (self.theta - self.b_param))))
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import json, random, io, logging
|
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 lib.application_configs import ApplicationConfigs
|
||||||
from helpers import aws_helper, tar_helper, csv_helper, service_helper, solver_helper
|
from helpers import aws_helper, tar_helper, csv_helper, service_helper, solver_helper
|
||||||
|
Loading…
x
Reference in New Issue
Block a user