@@ -393,18 +393,24 @@ def commit(self):
393393 self .Outputs .correlations .send (None )
394394 return
395395
396- attrs = [ContinuousVariable ("Correlation" ), ContinuousVariable ("FDR" )]
396+ attrs = [ContinuousVariable ("Correlation" ),
397+ ContinuousVariable ("uncorrected p" ),
398+ ContinuousVariable ("FDR" )]
397399 metas = [StringVariable ("Feature 1" ), StringVariable ("Feature 2" )]
398400 domain = Domain (attrs , metas = metas )
399401 model = self .vizrank .rank_model
400- x = np .array ([[float (model .data (model .index (row , 0 ), role ))
401- for role in (Qt .DisplayRole , CorrelationRank .PValRole )]
402- for row in range (model .rowCount ())])
403- x [:, 1 ] = FDR (list (x [:, 1 ]))
402+ count = model .rowCount ()
403+ index = model .index
404+ corr = np .array ([float (index (row , 0 ).data ())
405+ for row in range (count )])
406+ p = np .array ([index (row , 0 ).data (CorrelationRank .PValRole )
407+ for row in range (count )])
408+ fdr = FDR (p )
409+ x = np .vstack ((corr , p , fdr )).T
404410 # pylint: disable=protected-access
405- m = np .array ([[a .name for a in model . data ( model . index ( row , 0 ),
406- CorrelationRank ._AttrRole )]
407- for row in range (model . rowCount () )], dtype = object )
411+ m = np .array ([[a .name
412+ for a in index ( row , 0 ). data ( CorrelationRank ._AttrRole )]
413+ for row in range (count )], dtype = object )
408414 corr_table = Table (domain , x , metas = m )
409415 corr_table .name = "Correlations"
410416
0 commit comments