Skip to content

Commit

Permalink
use target_col in conformity scores (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoralez authored May 16, 2023
1 parent d4f16cc commit 95129e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mlforecast/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def _conformity_scores(
for model in self.models.keys():
# compute absolute error for each model
cv_results[model] = np.abs(cv_results[model] - cv_results[target_col])
return cv_results.drop("y", axis=1)
return cv_results.drop(columns=target_col)

def fit(
self,
Expand Down
2 changes: 1 addition & 1 deletion nbs/forecast.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@
" for model in self.models.keys():\n",
" # compute absolute error for each model\n",
" cv_results[model] = np.abs(cv_results[model] - cv_results[target_col])\n",
" return cv_results.drop('y', axis=1)\n",
" return cv_results.drop(columns=target_col)\n",
"\n",
" def fit(\n",
" self,\n",
Expand Down

0 comments on commit 95129e3

Please sign in to comment.