-
Notifications
You must be signed in to change notification settings - Fork 228
[MRG] Metric Learning Tutorial Notebook #27
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
[MRG] Metric Learning Tutorial Notebook #27
Conversation
Very cool! I think this would fit nicely in Some of the code in the notebook can be cleaned up, and it might be better to use an alternate dataset to really show how the methods differ. Some of the papers have illustrative examples that we might be able to use. The one big omission from the notebook is how you might specify constraints manually for each method. (Rather than just using the _Supervised variants.) This might be a bit harder to show clearly, but I think it's worthwhile. |
Could you mention which part exactly could be cleaned up? I like the idea of specifying constraints manually, I'll add what I can regarding that to the notebook. Edit: On that note, is there an example or documentation for specifying constraints? |
Regarding code cleanup, you keep reassigning the The docs aren't very clear about manual constraint specification yet, but the docstrings for each method should give you a starting point. For example, |
TODO:
Just some notes for myself. I'll get to this soon :) |
This is looking good! A few lines of description about each method will be nice, as well as a mention that (for the most part) we follow scikit-learn conventions. It might also be good to explain why running the same learner multiple times might not always give the same results. The current API for the supervised methods hides all of the randomness, which might be confusing to a new user. |
Added descriptions and links for all the algorithms, and mentioned about scikit-learn and using random seeds. Only have to do the manual constraints bit, just going to spend some time coming up with a good example for it. |
@perimosocordiae, apart from ITML and LSML all the methods use labels as a way to supervise the learning, right? So the example of manual constraints, it's only for them, right? edit: Ah, I noticed the connectivity graph for SDML and chunks for RCA too. |
@perimosocordiae I'm done with the tutorial! |
Great, thanks! This will be a useful resource for people new to the project. |
Awesome! It would be better if we include the associated .py file as part of the test suite. |
We could have an automated test run |
I haven't made an associated .py file, but could if needed; but I think adding it to the TravisCI tests would be better, right? |
CJ's idea sounds good without the need to maintain a separate py file. Yeah it would be better to continuously test it, which is critical for future users. |
@perimosocordiae , thought this might be handy in visualising what the algorithms are doing. It's very useful for me, so I thought I'd clean up the code I have and make a notebook.
Let me know if this is ok, and whether you might want more things added to this.
Once #26 is completed, we can change this later to reflect
fit_transform
as well.Edit: also wanted to know where the right place for this would be, whether in the
examples
folder or in thedocs
folder.