added tcc and tif results to form
This commit is contained in:
@ -1,8 +1,24 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import List
|
||||
|
||||
from helpers import irt_helper
|
||||
|
||||
from models.item import Item
|
||||
from models.target import Target
|
||||
|
||||
from lib.irt.test_response_function import TestResponseFunction
|
||||
|
||||
class Form(BaseModel):
|
||||
items: List[Item]
|
||||
cut_score: float
|
||||
tif_results: List[Target]
|
||||
tcc_results: List[Target]
|
||||
|
||||
@classmethod
|
||||
def create(cls, items, solver_run):
|
||||
return cls(
|
||||
items=items,
|
||||
cut_score=TestResponseFunction(solver_run.irt_model).calculate(items, theta=solver_run.theta_cut_score),
|
||||
tif_results=irt_helper.generate_tif_results(items, solver_run),
|
||||
tcc_results=irt_helper.generate_tcc_results(items, solver_run)
|
||||
)
|
||||
|
@ -1,5 +1,7 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional
|
||||
|
||||
class Target(BaseModel):
|
||||
theta: float
|
||||
value: float
|
||||
result: Optional[float]
|
||||
|
Reference in New Issue
Block a user