Skip to content

Commit

Permalink
Fix error message in CrossFitEstimator (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescMartiEscofetQC authored May 6, 2024
1 parent 060e2d9 commit b969203
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metalearners/cross_fit_estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ def _predict_in_sample(
if len(X) != sum(len(fold) for fold in self._test_indices):
raise ValueError(
"Trying to predict in-sample on data that is unlike data encountered in training."
f"Training data included {len(self._test_indices)} observations while prediction "
f"data includes {len(X)} observations."
f"Training data included {sum(len(fold) for fold in self._test_indices)} "
f"observations while prediction data includes {len(X)} observations."
)
n_outputs = self._n_outputs(method)
predictions = self._initialize_prediction_tensor(
Expand Down

0 comments on commit b969203

Please sign in to comment.