added tcc and tif results to form
This commit is contained in:
22
app/helpers/irt_helper.py
Normal file
22
app/helpers/irt_helper.py
Normal file
@ -0,0 +1,22 @@
|
||||
from lib.irt.test_response_function import TestResponseFunction
|
||||
from lib.irt.test_information_function import TestInformationFunction
|
||||
|
||||
from models.target import Target
|
||||
|
||||
def generate_tif_results(items, solver_run):
|
||||
targets = []
|
||||
|
||||
for target in solver_run.objective_function.tif_targets:
|
||||
tif = TestInformationFunction(solver_run.irt_model).calculate(items, theta=target.theta)
|
||||
targets.append(Target(theta=target.theta, value=target.value, result=tif))
|
||||
|
||||
return targets
|
||||
|
||||
def generate_tcc_results(items, solver_run):
|
||||
targets = []
|
||||
|
||||
for target in solver_run.objective_function.tcc_targets:
|
||||
tcc = TestResponseFunction(solver_run.irt_model).calculate(items, theta=target.theta)
|
||||
targets.append(Target(theta=target.theta, value=target.value, result=tcc))
|
||||
|
||||
return targets
|
Reference in New Issue
Block a user