class documentation

Form for the riskpredictor dashboard page.

Via this form a user can enter a diagnosis and have the web app compute the marginalized risk for every LNL covered by the model.

Conceptually, this form is similar to the DataexplorerForm in that it is always bound either to initial data or to whatever the user entered in the dashboard.

Using this form's cleaned_data attribute, the compute_risks class ultimately computes the posterior state distributions for the given diagnosis using the defined model.

Class Method from_initial Create a form instance with the initial form data.
Method __init__ Initialize the form and add the fields for the lymph node levels.
Method add_lnl_fields Add the fields for the lymph node levels defined in the trained model.
Method add_midext_field Add the field for the midline status.
Method add_t_stage_field Add the field for the T stage with the choices being defined in the model.
Method clean_midext For now, the midline extension cannot be unknown (value of 0).
Method get_lnls Get the lymph node levels from the model.
Class Variable sensitivity The sensitivity of the entered diagnosis.
Class Variable specificity The specificity of the entered diagnosis.
Instance Variable checkpoint Undocumented
Instance Variable model Undocumented
@classmethod
def from_initial(cls: type[T], checkpoint: CheckpointModel) -> T:

Create a form instance with the initial form data.

def __init__(self, *args, checkpoint: CheckpointModel | None = None, **kwargs):

Initialize the form and add the fields for the lymph node levels.

def add_lnl_fields(self):

Add the fields for the lymph node levels defined in the trained model.

def add_midext_field(self):

Add the field for the midline status.

def add_t_stage_field(self):

Add the field for the T stage with the choices being defined in the model.

def clean_midext(self) -> bool:

For now, the midline extension cannot be unknown (value of 0).

def get_lnls(self) -> dict[str, graph.LymphNodeLevel]:

Get the lymph node levels from the model.

sensitivity =

The sensitivity of the entered diagnosis.

specificity =

The specificity of the entered diagnosis.

checkpoint =

Undocumented

model =

Undocumented