add remaining constraints
This commit is contained in:
parent
63e5016307
commit
1d9b2c694c
@ -5,5 +5,5 @@ from models.attribute import Attribute
|
||||
|
||||
class Constraint(BaseModel):
|
||||
reference_attribute: Attribute
|
||||
minimum: int
|
||||
maximum: int
|
||||
minimum: float
|
||||
maximum: float
|
||||
|
@ -16,3 +16,15 @@ class Item(BaseModel):
|
||||
|
||||
def irf(self, solver_run, theta):
|
||||
return ItemResponseFunction(solver_run.irt_model).calculate(b_param=self.b_param,theta=theta)
|
||||
|
||||
def get_attribute(self, id, value):
|
||||
for attribute in self.attributes:
|
||||
if attribute.id == id and attribute.value == value:
|
||||
return attribute.value
|
||||
return False
|
||||
|
||||
def attribute_exists(self, id, value):
|
||||
for attribute in self.attributes:
|
||||
if attribute.id == id and attribute.value == value:
|
||||
return True
|
||||
return False
|
Loading…
x
Reference in New Issue
Block a user