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

increase the default epochs to 1000 for linear regression #394

Merged
merged 2 commits into from
Aug 8, 2022

Conversation

Zhangxunmt
Copy link
Collaborator

Signed-off-by: Xun Zhang xunzh@amazon.com

Description

Increase the number of iteration for epochs to improve convergence of linear regression.

Issues Resolved

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Xun Zhang <xunzh@amazon.com>
@Zhangxunmt Zhangxunmt requested a review from a team August 5, 2022 20:18
ylwu-amzn
ylwu-amzn previously approved these changes Aug 5, 2022
@@ -58,7 +58,7 @@ public class LinearRegression implements Trainable, Predictable {
//RMSProp
private static final double DEFAULT_DECAY_RATE = 0.9;

private static final int DEFAULT_EPOCHS = 10;
private static final int DEFAULT_EPOCHS = 1000;
private static final int DEFAULT_INTERVAL = -1;
private static final int DEFAULT_BATCH_SIZE = 1;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you help fix the hard coded issue in line 203

LinearSGDTrainer linearSGDTrainer = new LinearSGDTrainer(objective, optimiser, epochs, DEFAULT_INTERVAL, DEFAULT_BATCH_SIZE, seed);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, do you mean DEFAULT_INTERVAL, DEFAULT_BATCH_SIZE, seed these 3 hard coded ones?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes

Signed-off-by: Xun Zhang <xunzh@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2022

Codecov Report

Merging #394 (a1ce465) into main (23cbbb4) will not change coverage.
The diff coverage is n/a.

❗ Current head a1ce465 differs from pull request most recent head 6a69747. Consider uploading reports for the commit 6a69747 to get more accurate results

@@            Coverage Diff            @@
##               main     #394   +/-   ##
=========================================
  Coverage     91.43%   91.43%           
  Complexity      528      528           
=========================================
  Files            59       59           
  Lines          1529     1529           
  Branches        122      122           
=========================================
  Hits           1398     1398           
  Misses           89       89           
  Partials         42       42           
Flag Coverage Δ
ml-commons 91.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@ylwu-amzn ylwu-amzn left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the change!

@Zhangxunmt Zhangxunmt merged commit b760180 into opensearch-project:main Aug 8, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 8, 2022
* increase the default epochs to 1000 for linear regression

Signed-off-by: Xun Zhang <xunzh@amazon.com>

* make more parameters configuration in linear regression

Signed-off-by: Xun Zhang <xunzh@amazon.com>
(cherry picked from commit b760180)
Zhangxunmt added a commit that referenced this pull request Aug 8, 2022
* increase the default epochs to 1000 for linear regression

Signed-off-by: Xun Zhang <xunzh@amazon.com>

* make more parameters configuration in linear regression

Signed-off-by: Xun Zhang <xunzh@amazon.com>
(cherry picked from commit b760180)

Co-authored-by: Xun Zhang <xunzh@amazon.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 8, 2022
* increase the default epochs to 1000 for linear regression

Signed-off-by: Xun Zhang <xunzh@amazon.com>

* make more parameters configuration in linear regression

Signed-off-by: Xun Zhang <xunzh@amazon.com>
(cherry picked from commit b760180)
Zhangxunmt added a commit that referenced this pull request Aug 8, 2022
* increase the default epochs to 1000 for linear regression

Signed-off-by: Xun Zhang <xunzh@amazon.com>

* make more parameters configuration in linear regression

Signed-off-by: Xun Zhang <xunzh@amazon.com>
(cherry picked from commit b760180)

Co-authored-by: Xun Zhang <xunzh@amazon.com>
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