sum the Item iif and irf as well as the Bundle tif and trf
This commit is contained in:
@ -21,3 +21,19 @@ class Bundle(BaseModel):
|
||||
def trf(self, irt_model: IRTModel, theta: float) -> float:
|
||||
return TestResponseFunction(irt_model).calculate(self.items,
|
||||
theta=theta)
|
||||
|
||||
def tif_sum(self, solver_run):
|
||||
total = 0
|
||||
|
||||
for target in solver_run.objective_function.tcc_targets:
|
||||
total += self.tif(solver_run.irt_model, target.theta)
|
||||
|
||||
return total
|
||||
|
||||
def trf_sum(self, solver_run):
|
||||
total = 0
|
||||
|
||||
for target in solver_run.objective_function.tcc_targets:
|
||||
total += self.trf(solver_run.irt_model, target.theta)
|
||||
|
||||
return total
|
||||
|
Reference in New Issue
Block a user