Skip to content

Conversation

TremaMiguel
Copy link
Contributor

Describe the changes you've made

Reimplement EnsembleForecaster with sktime>=0.7.0

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

@TremaMiguel TremaMiguel requested review from Yard1 and ngupta23 July 23, 2021 23:40
Comment on lines 123 to 129
@property
def _set_weights_none(self):
self.weights = None

@property
def _set_weights_uniform(self):
self.weights = np.ones(len(self.forecasters))
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't those be methods? Is this how sktime does it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sktime original implementation doesn't handle voting method, here I should be changing these to appropiate setter for @property

@property
 def weights(self):
      return self.weights

@weights.setter
def weights(self, value):
    self.weights = value

and then call

elif self.method in self._not_required_weights and self.weights:
        warnings.warn(
            "Unused 'weights' argument. When method='mean' or method='median', 'weights' argument is not provided. Setting weights to `None`"
        )
        self.weights = None

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Yard1 I think we should open a PR to include voting in sktime original implementation, what are your thoughts on this ?

Copy link
Member

Choose a reason for hiding this comment

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

That's a great idea @TremaMiguel

Copy link
Member

@Yard1 Yard1 left a comment

Choose a reason for hiding this comment

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

LGTM!

@ngupta23 ngupta23 merged commit 694061e into ts_sktime_0p7 Jul 27, 2021
@ngupta23 ngupta23 added time_series Topics related to the time series and removed time_series_dev labels Sep 19, 2021
@ngupta23 ngupta23 deleted the ts_blending_sktime_07 branch October 22, 2021 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
time_series Topics related to the time series
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants