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

Add cookbook and meta example for Canberra Distance #4138

Merged
merged 5 commits into from Feb 6, 2018

Conversation

syashakash
Copy link
Contributor

Issues #3000, #3555, #4047
All tests passed. No memory leaks found yet.

Canberra Distance
==================

The Canberra distance between vectors P and Q is the similarity as measured by their angle.
Copy link
Member

Choose a reason for hiding this comment

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

by their angle?
it's a weighted manhattan distance...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrected.


.. sgexample:: canberra.sg:create_features

We create an instance of :sgclass:`CCanberraMetric` by passing it :sgclass:`CDenseFeatures`.
Copy link
Member

Choose a reason for hiding this comment

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

you mean something like:
We can create an instance of CanberraMetric by passing two Features objects for which features we would like to measure the pairwise Canberra distances.

Rectify errata
Link CDenseFeatures to its doc page everytime referenced
Final edit
@karlnapf
Copy link
Member

karlnapf commented Feb 2, 2018

I wrote in #3000
"No need for cookbook rst pages for the remaining distance examples. A meta example is fine."
Would you mind removing the cookbook page. The example itself it useful, Thanks for the patch!


#![refresh_distance]
distance.init(features_a, features_b)
RealMatrix distance_matrix_ab = distance.get_distance_matrix()
Copy link
Member

Choose a reason for hiding this comment

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

could you send a PR to data with the integration testing data for this example? And then update this PR with that new data revision?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I will.
First I would add a commit to this PR with removing the cookbook page and then add a commit for data revision.

@karlnapf
Copy link
Member

karlnapf commented Feb 3, 2018

Cool, the page is removed, but I don't see a PR for the data repo and you will also need to update the data submodule in this PR here

@karlnapf
Copy link
Member

karlnapf commented Feb 3, 2018

The PR has merge conflicts, you will need to rebase against the latest develop

@karlnapf
Copy link
Member

karlnapf commented Feb 5, 2018

wrong data submodule revision! Check the diff!

@syashakash
Copy link
Contributor Author

Sorry for the late amend. I hope there are still no merge conflicts and the submodule is the one required. Travis still has one error with the jobs exceeding time limit that means there is some problem with the build, like this would require shortening the build, I guess!

@karlnapf
Copy link
Member

karlnapf commented Feb 6, 2018

Tests passed, integration test included. Merging, and thanks! :)

@karlnapf karlnapf merged commit e01566c into shogun-toolbox:develop Feb 6, 2018
@syashakash syashakash deleted the add-canberra branch February 7, 2018 07:02
ktiefe pushed a commit to ktiefe/shogun that referenced this pull request Jul 30, 2019
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.

None yet

3 participants