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

Changes in documentation. Rephrasing, fixed examples, standarized notation, etc. #274

Merged
merged 10 commits into from
Jan 20, 2020

Conversation

grudloff
Copy link
Contributor

No description provided.

Copy link
Contributor

@perimosocordiae perimosocordiae left a comment

Choose a reason for hiding this comment

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

Thanks for the improvements, especially the extra doctest examples!

I left a few comments, but overall I'm happy with the change.

doc/supervised.rst Outdated Show resolved Hide resolved
doc/getting_started.rst Outdated Show resolved Hide resolved
doc/index.rst Outdated
@@ -52,7 +52,7 @@ Documentation outline

auto_examples/index

:ref:`genindex` | :ref:`modindex` | :ref:`search`
:ref:`genindex` | :doc:`Modules <./metric_learn>` | :ref:`search`
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this do?

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 some reason, sphinx wasn't creating the modules index so it raised a 404 error. As a quick fix, I replaced it by the modules list (http://contrib.scikit-learn.org/metric-learn/metric_learn.html).

Copy link
Member

Choose a reason for hiding this comment

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

This page is already linked a bit above on the index page, so perhaps we could simply remove it?
Or, fix the problem preventing the generation of this file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not knowledgeable in sphinx so I can't find a quick fix, in the meantime, I will remove it.

Copy link
Member

@bellet bellet left a comment

Choose a reason for hiding this comment

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

Thanks! These are useful changes - you just need to fix a few problems before we can merge

doc/getting_started.rst Show resolved Hide resolved
doc/getting_started.rst Outdated Show resolved Hide resolved
doc/supervised.rst Outdated Show resolved Hide resolved
metric_learn/lsml.py Outdated Show resolved Hide resolved
Comment on lines 65 to 74
>>> from metric_learn import RCA
>>> pairs = [[[1.2, 7.5], [1.3, 1.5]],
>>> [[6.4, 2.6], [6.2, 9.7]],
>>> [[1.3, 4.5], [3.2, 4.6]],
>>> [[6.2, 5.5], [5.4, 5.4]]]
>>> y = [1, 1, -1, -1]
>>> # in this task we want points where the first feature is close to be
>>> # closer to each other, no matter how close the second feature is
>>> rca = RCA()
>>> rca.fit(pairs, y)
Copy link
Member

Choose a reason for hiding this comment

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

This example is wrong: RCA learns from chunks, not from pairs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I took this example from the doc/weakly_supervised.rst RCA section. I will fix them both then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then it would also be necessary to make a new section in Weakly Supervised Metric Learning called "Learning on chunks"? Right now RCA is under "Learning on pairs".

Copy link
Member

Choose a reason for hiding this comment

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

Yes, there is an issue on that, see #237 and comments therein
Since the idea of chunks is very specific to RCA, with a small abuse of language we were considering listing it under the supervised algorithms, even though the supervision is weaker

Copy link
Contributor Author

@grudloff grudloff Jan 16, 2020

Choose a reason for hiding this comment

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

I think that it should be in the weak learners section for consistency's sake, as there is a *_supervised version, even though the supervision is not so weak. Would it be worth it to make a section just for RCA learning on chunks?

Copy link
Member

Choose a reason for hiding this comment

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

Sure, why not, although it is unlikely to apply to another algorithm other than RCA in the future
If you are willing to do this, please go ahead. Probably a separate PR would be best for clarity

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright then, in the meantime I fixed the RCA examples as they are.

README.rst Outdated Show resolved Hide resolved
doc/getting_started.rst Outdated Show resolved Hide resolved
@bellet
Copy link
Member

bellet commented Jan 20, 2020

LGTM! Thanks for the changes and congrats for your first contribution @grudloff :-)

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

Successfully merging this pull request may close these issues.

3 participants