Skip to content

Commit

Permalink
these changes could be useful
Browse files Browse the repository at this point in the history
  • Loading branch information
CDonnerer committed Sep 20, 2022
1 parent 539975d commit 1f0feaf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/xgboost_distribution/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,12 @@ def predict(
)
return self._distribution.predict(params)

def virtual_ensemble_predict(self):
def virtual_ensemble_predict(self, X, virtual_model_count: int = 10):
"""Predict using virtual ensembles."""

params = self.predict(X, iteration_range=(0, self.best_iteration + 1))
return params

def save_model(self, fname: Union[str, os.PathLike]) -> None:
# self._distribution class cannot be saved by `super().save_model`, as it
# attempts to call `json.dumps({"_distribution": self._distribution})`
Expand Down

0 comments on commit 1f0feaf

Please sign in to comment.