@@ -557,28 +557,25 @@ def _get_summary(self) -> DataFrame:
557557 self .learner_info ["status" ] == ModelStatus .SUCCESS
558558 ]
559559 learner_scores = dict (zip (learner_info ["learner_id" ], learner_info ["score" ]))
560-
561- all_covs = self .cov_fixed + self .cov_exploring
562560 # ensemble info
563- # TODO: Isn't this always all covariates? for the super learner?
564561 coef_index = [
565- variables .index (f"{ self .main_param } _{ cov } " ) for cov in all_covs
562+ variables .index (f"{ self .main_param } _{ cov } " ) for cov in self . cov_exploring
566563 ]
567564 coef = self .super_learner .coef [coef_index ]
568565 coef_sd = np .sqrt (np .diag (self .super_learner .vcov )[coef_index ])
569566 # number of models the covariate is present
570567 pct_present = [
571568 (learner_info [f"{ self .main_param } _{ cov } " ] != 0.0 ).sum () / len (learner_info )
572- for cov in all_covs
569+ for cov in self . cov_exploring
573570 ]
574571 # score when only the selected covariate is present
575- single_score = [np . nan ] * len ( self . cov_fixed ) + [
572+ single_score = [
576573 learner_scores .get ((i ,), np .nan ) for i in range (len (self .cov_exploring ))
577574 ]
578575 # average score when selected covariate is present or not
579576 present_score = []
580577 not_present_score = []
581- for cov in all_covs :
578+ for cov in self . cov_exploring :
582579 present_index = learner_info [f"{ self .main_param } _{ cov } " ] != 0.0
583580 ps , nps = 0.0 , 0.0
584581 if any (present_index ):
@@ -590,7 +587,7 @@ def _get_summary(self) -> DataFrame:
590587
591588 df = DataFrame (
592589 {
593- "cov" : all_covs ,
590+ "cov" : self . cov_exploring ,
594591 "coef" : coef ,
595592 "coef_sd" : coef_sd ,
596593 "pct_present" : pct_present ,
0 commit comments