@@ -73,7 +73,7 @@ def main(par):
7373 if dataset_id not in DATASET_GROUPS :
7474 raise ValueError (f"Dataset { dataset_id } not found in DATASET_GROUPS" )
7575
76- anchor_cols = DATASET_GROUPS [dataset_id ]. get ( 'anchors' , [ 'donor_id' , 'plate_name' ])
76+ anchor_cols = DATASET_GROUPS [dataset_id ][ 'anchors' ]
7777 print (f"Using anchor variables: { anchor_cols } " )
7878
7979 # Manage layer
@@ -115,7 +115,7 @@ def main(par):
115115 gene_mask = np .logical_or (np .any (A , axis = 1 ), np .any (A , axis = 0 ))
116116 in_degrees = np .sum (A != 0 , axis = 0 )
117117 out_degrees = np .sum (A != 0 , axis = 1 )
118- idx = np .argsort (np .maximum (out_degrees , in_degrees ))[:- 1000 ]
118+ idx = np .argsort (np .maximum (out_degrees , in_degrees ))[:- 2000 ]
119119 gene_mask [idx ] = False
120120 X = X [:, gene_mask ]
121121 X = X .toarray () if isinstance (X , csr_matrix ) else X
@@ -142,9 +142,9 @@ def main(par):
142142 X_test = X [~ mask , :]
143143
144144 # Standardize features
145- # scaler = StandardScaler()
146- # X_train = scaler.fit_transform(X_train)
147- # X_test = scaler.transform(X_test)
145+ scaler = StandardScaler ()
146+ X_train = scaler .fit_transform (X_train )
147+ X_test = scaler .transform (X_test )
148148
149149 for j in tqdm .tqdm (range (X_train .shape [1 ])):
150150
@@ -178,7 +178,7 @@ def main(par):
178178 baseline_scores .append (np .mean (coefs ))
179179 scores = np .array (scores )
180180 baseline_scores = np .array (baseline_scores )
181-
181+ reg3_lift = np . mean ( scores ) / ( np . mean ( baseline_scores ) + 1e-6 )
182182 p_value = wilcoxon (baseline_scores , scores , alternative = "greater" ).pvalue
183183 p_value = max (p_value , 1e-300 )
184184
@@ -189,7 +189,8 @@ def main(par):
189189
190190 # Return results as DataFrame
191191 results = {
192- 'regression_3' : [final_score ]
192+ 'reg3_precision' : [reg3_lift ],
193+ 'reg3_balanced' : [final_score ]
193194 }
194195
195196 df_results = pd .DataFrame (results )
0 commit comments