Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bt enhance #83

Merged
merged 9 commits into from
Apr 15, 2020
Merged

Bt enhance #83

merged 9 commits into from
Apr 15, 2020

Conversation

wangzhishi
Copy link
Contributor

@wangzhishi wangzhishi commented Apr 14, 2020

resolve #79;
fix #82

  • now in-sample predictions and scores can be calculated by setting insample_predict = True and retrieved by .get_insample_predictions and get_insample_scores.
  • fitted model objects can be retrieved in .get_fitted_models
  • Per Edwin, add train_end date to _predicted_df when data_col is available; add n_splits to score_df. As such, unit test for backtest is updated to be passed for such additional columns.
  • demo illustration given in examples/Backtest_Orbit_Model.ipynb

@@ -340,7 +348,7 @@ def _set_score(self, response_col, predicted_col='prediction', metrics=None,
"""
# TODO: not sure should we restrict use of groupby
# groupby is controlled internally with include_steps
groupby = ['steps'] if include_steps else None
groupby = ['df_key', 'steps'] if include_steps else ['df_key']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the values of column ['df_key'] holding? Could you give an example?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically, now in _score_df and _predicted_df we have df_key (either train or test) to indicate the data source. I also gave examples in the backtest notebook.

@edwinnglabs
Copy link
Collaborator

Looks good to me. Just leave a small comment.

Copy link
Collaborator

@steveyang90 steveyang90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

auto_scale=True with regressors errors out Include meta data in backtest.py
3 participants