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

Implemented margin ranking loss #2264

Merged
merged 33 commits into from Apr 5, 2020

Conversation

AndreiMihalea
Copy link
Contributor

Implemented the margin ranking loss as proposed in the issue #2253 I opened. Can also be related to #2200

@mlpack-bot
Copy link

mlpack-bot bot commented Mar 7, 2020

Thanks for opening your first pull request in this repository! Someone will review it when they have a chance. In the mean time, please be sure that you've handled the following things, to make the review process quicker and easier:

  • All code should follow the style guide
  • Documentation added for any new functionality
  • Tests added for any new functionality
  • Tests that are added follow the testing guide
  • Headers and license information added to the top of any new code files
  • HISTORY.md updated if the changes are big or user-facing
  • All CI checks should be passing

Thank you again for your contributions! 👍

@AndreiMihalea
Copy link
Contributor Author

Forgot to pull the latest update. Will reopen when done.

@AndreiMihalea AndreiMihalea reopened this Mar 7, 2020
@mlpack-bot
Copy link

mlpack-bot bot commented Mar 7, 2020

Thanks for opening your first pull request in this repository! Someone will review it when they have a chance. In the mean time, please be sure that you've handled the following things, to make the review process quicker and easier:

  • All code should follow the style guide
  • Documentation added for any new functionality
  • Tests added for any new functionality
  • Tests that are added follow the testing guide
  • Headers and license information added to the top of any new code files
  • HISTORY.md updated if the changes are big or user-facing
  • All CI checks should be passing

Thank you again for your contributions! 👍

Copy link
Member

@kartikdutt18 kartikdutt18 left a comment

Choose a reason for hiding this comment

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

Hi @AndreiMihalea, Thanks for taking the time to work on this. This looks good to me. Just few minor comments. 👍
Thanks.

@rcurtin
Copy link
Member

rcurtin commented Mar 12, 2020

This code touches the ANN code, and there was recently a big refactoring of the ANN code in #2259, so be sure to merge the master branch into your branch here to make sure that nothing will fail if this PR is merged. 👍 (I'm pasting this message into all possibly relevant PRs.)

typename ThirdInputType,
typename OutputType
>
void Backward(const FirstInputType& x1,
Copy link
Member

Choose a reason for hiding this comment

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

See comment above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Modified with input1 / input2 and target.

@zoq zoq removed the s: unanswered label Mar 17, 2020
@kartikdutt18
Copy link
Member

Hey Andrie, No rush, just wanted your opinion on it. I think @zoq will provide better insight on how you should proceed, till then I would suggest not making any changes incase the current approach makes more sense.

@kartikdutt18
Copy link
Member

As discussed on IRC, I think it's okay to move forward with changes suggested (Take concatenated input), I think that makes the most sense.

@AndreiMihalea
Copy link
Contributor Author

As discussed on IRC, I think it's okay to move forward with changes suggested (Take concatenated input), I think that makes the most sense.

I modified the implementation. Hope it's ok now.

Copy link
Member

@favre49 favre49 left a comment

Choose a reason for hiding this comment

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

Could you also add to HISTORY.md?

AndreiMihalea and others added 4 commits March 31, 2020 18:16
Co-Authored-By: favre49 <40389657+favre49@users.noreply.github.com>
Co-Authored-By: favre49 <40389657+favre49@users.noreply.github.com>
Co-Authored-By: favre49 <40389657+favre49@users.noreply.github.com>
Copy link
Member

@favre49 favre49 left a comment

Choose a reason for hiding this comment

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

This looks good to me, thanks for keeping up with the reviews :)

@kartikdutt18
Copy link
Member

kartikdutt18 commented Apr 2, 2020

Looks good to me as well. Just one last thing, recently we merged #2339, where we templated the return type instead of directly using double. @AndreiMihalea, do you mind changing to that to conform with the rest of the code base. I will post a message in each function that has anything to do with loss functions. I hope that's okay. Thanks a lot. 👍

@kartikdutt18
Copy link
Member

Hey there, This code touches the loss function portion of mlpack's codebase. Recently #2339 was merged where the switch was made to templated return type instead of just using double. So before we merge this, kindly make the changes for the same. I'm pasting this in all relevant PRs. Thanks a lot 👍

@AndreiMihalea
Copy link
Contributor Author

Looks good to me as well. Just one last thing, recently we merged #2339, where we templated the return type instead of directly using double. @AndreiMihalea, do you mind changing to that to conform with the rest of the code base. I will post a message in each function that has anything to do with loss functions. I hope that's okay. Thanks a lot.

Modified it accordingly. Thanks.

@kartikdutt18
Copy link
Member

Great, No more comments from my side. Thanks a lot for the awesome work. 👍

Copy link

@mlpack-bot mlpack-bot bot left a comment

Choose a reason for hiding this comment

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

Second approval provided automatically after 24 hours. 👍

@mlpack-bot
Copy link

mlpack-bot bot commented Apr 3, 2020

Hello there! Thanks for your contribution. I see that this is your first contribution to mlpack. If you'd like to add your name to the list of contributors in src/mlpack/core.hpp and COPYRIGHT.txt and you haven't already, please feel free to push a change to this PR---or, if it gets merged before you can, feel free to open another PR.

In addition, if you'd like some stickers to put on your laptop, I'd be happy to help get them in the mail for you. Just send an email with your physical mailing address to stickers@mlpack.org, and then one of the mlpack maintainers will put some stickers in an envelope for you. It may take a few weeks to get them, depending on your location. 👍

@favre49
Copy link
Member

favre49 commented Apr 5, 2020

All the tests are passing, I think we can merge this now. Thanks for keeping up with the repo changes, and thanks @kartikdutt18 for pointing it out.

@favre49 favre49 merged commit 9d75357 into mlpack:master Apr 5, 2020
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.

None yet

7 participants