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

Adding sample weight and keras test to R-Square #564

Closed
wants to merge 1 commit into from

Conversation

SSaishruthi
Copy link
Contributor

@SSaishruthi SSaishruthi commented Oct 3, 2019

Added:

  1. Sample Weight parameter
  2. Keras test

@Squadrick Can you please take a look at it?

Copy link
Member

@seanpmorgan seanpmorgan left a comment

Choose a reason for hiding this comment

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

Thanks @SSaishruthi looks good! Please see the attached comments.

Comment on lines -84 to -85
if __name__ == '__main__':
tf.test.main()
Copy link
Member

@seanpmorgan seanpmorgan Oct 23, 2019

Choose a reason for hiding this comment

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

Why remove this?

@@ -51,7 +51,7 @@ def __init__(self, name='r_square', dtype=tf.float32):
self.res = self.add_weight("residual", initializer="zeros")
self.count = self.add_weight("count", initializer="zeros")

def update_state(self, y_true, y_pred):
def update_state(self, y_true, y_pred, sample_weight=None):
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now, we are adding it to be done. Will create a new PR with implementation for the same.

@gabrieldemarmiesse
Copy link
Member

I'll close this pull request as it has been inactive for a while now. Feel free to comment if you want me to reopen the pull request.

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

Successfully merging this pull request may close these issues.

4 participants