Open MarIniOnz opened 4 months ago
@MarIniOnz Could you add an example for a medrecord with one or two nodes of what the output should look like exactly? :)
MedRecord with nodes: Node1. Attributes: gender: "female", age: 21 Node2. Attributes: gender: "male, age: 45
medrecord.nodes_attributes([node1, node2]) Either: polars dataframe gender age female 21 male 45
or np.array(["female", "male"], [21,45])
or medrecord.nodes_attributes([node1, node2,], hot_encoding= "gender") np.array([0,1], [21,45])
Can be fixed after #146
We should adapt this function from the matching file and make it a feature of MedRecord instead.
What is needed?
Special considerations:
`
def _preprocess_data( self, *, medrecord: MedRecord, control_group: Set[NodeIndex], treated_group: Set[NodeIndex], essential_covariates: MedRecordAttributeInputList, one_hot_covariates: MedRecordAttributeInputList, ) -> Tuple[pl.DataFrame, pl.DataFrame]: """ Prepared the data for the matching algorithms.
`