sum the Item iif and irf as well as the Bundle tif and trf
This commit is contained in:
+16
-1
@@ -6,7 +6,6 @@ from models.attribute import Attribute
|
||||
from lib.irt.item_response_function import ItemResponseFunction
|
||||
from lib.irt.item_information_function import ItemInformationFunction
|
||||
|
||||
|
||||
class Item(BaseModel):
|
||||
id: int
|
||||
passage_id: Optional[int]
|
||||
@@ -35,3 +34,19 @@ class Item(BaseModel):
|
||||
) == ref_attribute.value.lower():
|
||||
return True
|
||||
return False
|
||||
|
||||
def iif_sum(self, solver_run):
|
||||
total = 0
|
||||
|
||||
for target in solver_run.objective_function.tif_targets:
|
||||
total += self.iif(solver_run, target.theta)
|
||||
|
||||
return total
|
||||
|
||||
def irf_sum(self, solver_run):
|
||||
total = 0
|
||||
|
||||
for target in solver_run.objective_function.tif_targets:
|
||||
total += self.irf(solver_run, target.theta)
|
||||
|
||||
return total
|
||||
|
||||
Reference in New Issue
Block a user