File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 88
99
1010from .approximator import Approximator
11+ from .model_comparison_approximator import ModelComparisonApproximator
1112
1213
1314class ApproximatorEnsemble (Approximator ):
@@ -115,6 +116,19 @@ def estimate(
115116 estimates [approx_name ] = approximator .estimate (conditions = conditions , split = split , ** kwargs )
116117 return estimates
117118
119+ def predict (
120+ self ,
121+ * ,
122+ conditions : Mapping [str , np .ndarray ],
123+ probs : bool = True ,
124+ ** kwargs ,
125+ ) -> dict [str , np .ndarray ]:
126+ predictions = {}
127+ for approx_name , approximator in self .approximators .items ():
128+ if isinstance (approximator , ModelComparisonApproximator ):
129+ predictions [approx_name ] = approximator .predict (conditions = conditions , probs = probs , ** kwargs )
130+ return predictions
131+
118132 def _has_obj_method (self , obj , name ):
119133 method = getattr (obj , name , None )
120134 return callable (method )
You can’t perform that action at this time.
0 commit comments