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

clean up language error and fluffy comments #3633

Merged
merged 1 commit into from Feb 19, 2017

Conversation

MikeLing
Copy link
Contributor

This pr is about fixing language error and fluffy comments in this pr #3608. For more information, see @karlnapf 's comments in #3608 (review)

Copy link
Member

@karlnapf karlnapf left a comment

Choose a reason for hiding this comment

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

Pls more care and cleanups.
This is a good exercise to produce good API docs, so lets iterate a bit.

Thanks for putting the effort into it

* The BruteKNNSolver class is a solver class which inherit from KNNSolver class. It will use brute way
* to classify the object which mean compare the object against all training objects for each prediction.
* The BruteKNNSolver class is a solver class and it use brute way to classify the object,
* which means test points are compared to all training data for each prediction.
Copy link
Member

Choose a reason for hiding this comment

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

can you pls use the one I wrote in the comment?

"Test points are compared to all training data for each prediction."

* The CoverTreeKNNSolver class is a solver class which inherit from KNNSolver class.
* It use the cover tree to speed up the nearest neighbor search and you can find more
* detail information on https://en.wikipedia.org/wiki/Cover_tree
* The CoverTreeKNNSolver class is a solver class.
Copy link
Member

Choose a reason for hiding this comment

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

No need for the first sentence (also in the other places)

* It use the cover tree to speed up the nearest neighbor search and you can find more
* detail information on https://en.wikipedia.org/wiki/Cover_tree
* The CoverTreeKNNSolver class is a solver class.
* It use the cover tree to speed up the nearest neighbor searching process.
Copy link
Member

Choose a reason for hiding this comment

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

Mistakes:

  • It uses (third person verbs have an s!)
  • It uses cover trees, or it uses the cover tree algorithm
  • .... to speed up the nearest neighbour search process (not searching process) ... Also it is not a search process, so rather write: to speed up the nearest neighbour computation

It uses cover

* detail information on https://en.wikipedia.org/wiki/Cover_tree
* The CoverTreeKNNSolver class is a solver class.
* It use the cover tree to speed up the nearest neighbor searching process.
* For more information, see [https://en.wikipedia.org/wiki/Cover_tree]
Copy link
Member

Choose a reason for hiding this comment

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

why the square brackets around the link?

@@ -19,7 +19,7 @@ namespace shogun
* The KDTREEKNNSolver class is a solver class which inherit from KNNSolver class.
* It use a k-d tree (short for k-dimensional tree) to delivery the nearest neighbor searches
* involving the multidimensional search key.
* Check https://en.wikipedia.org/wiki/K-d_tree for more detail about K-D tree.
* For more information, see [https://en.wikipedia.org/wiki/K-d_tree]
Copy link
Member

Choose a reason for hiding this comment

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

see above

@@ -19,7 +19,7 @@ namespace shogun
* The KDTREEKNNSolver class is a solver class which inherit from KNNSolver class.
Copy link
Member

Choose a reason for hiding this comment

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

This stuff needs change as well

* The KNNSolver class is the virtual base class of BruteKNNSolcer, CoverTreeKNNSolver, KDTreeKNNsolver, LSHKNNSolver.
* The KNNSolver class will include most of Variables which been used all the other Solver and methods been used to choose
* the index of the most frequent class.
* The KNNSolver class is the virtual base class of all the other solvers.
Copy link
Member

Choose a reason for hiding this comment

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

"Virtual base class for all KNN solvers"

No need to put the class name in the description of a class, the name is obvious from the API

@@ -16,9 +16,9 @@ namespace shogun
{

/**
* The LSHKNNSolver class is a solver class which inherit from KNNSolver class.
* The LSHKNNSolver class is a solver class.
Copy link
Member

Choose a reason for hiding this comment

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

No need for this,

* It use LSH(short for Locality-sensitive hashing) to do the nearest neighbor search.
* More detail information can be found in https://en.wikipedia.org/wiki/Locality-sensitive_hashing.
* More detailed information can be found in https://en.wikipedia.org/wiki/Locality-sensitive_hashing.
Copy link
Member

Choose a reason for hiding this comment

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

Can you make this unified with above references

For more information, see ...

@MikeLing
Copy link
Contributor Author

Hi @karlnapf, does it look better to you? :)

Copy link
Member

@karlnapf karlnapf left a comment

Choose a reason for hiding this comment

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

Getting better.

Can you research and add the computational complexity of each solver (depending on number of points and dimension) and put them in the description?

@@ -16,8 +16,7 @@ namespace shogun
{

/**
* The BruteKNNSolver class is a solver class which inherit from KNNSolver class. It will use brute way
* to classify the object which mean compare the object against all training objects for each prediction.
* Test points are compared to all training data for each prediction.
Copy link
Member

Choose a reason for hiding this comment

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

Prepend: "Standard KNN solver. "

* The CoverTreeKNNSolver class is a solver class which inherit from KNNSolver class.
* It use the cover tree to speed up the nearest neighbor search and you can find more
* detail information on https://en.wikipedia.org/wiki/Cover_tree
* It uses the cover trees to speed up the nearest neighbour computation.
Copy link
Member

Choose a reason for hiding this comment

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

Cover tree solver. It uses cover trees ...

@@ -16,10 +16,9 @@ namespace shogun
{

/**
* The KDTREEKNNSolver class is a solver class which inherit from KNNSolver class.
* It use a k-d tree (short for k-dimensional tree) to delivery the nearest neighbor searches
* It uses k-d tree (short for k-dimensional tree) to speed up the nearest neighbour computation.
Copy link
Member

Choose a reason for hiding this comment

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

KD-tree solver. I uses kd-trees to speed up....

* The LSHKNNSolver class is a solver class which inherit from KNNSolver class.
* It use LSH(short for Locality-sensitive hashing) to do the nearest neighbor search.
* More detail information can be found in https://en.wikipedia.org/wiki/Locality-sensitive_hashing.
* It uses LSH(short for Locality-sensitive hashing) to do the nearest neighbour computation.
Copy link
Member

Choose a reason for hiding this comment

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

LSH solver.

Copy link
Member

Choose a reason for hiding this comment

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

space between LSH and (

@MikeLing
Copy link
Contributor Author

Hi @karlnapf , I just fix the existing comments. Maybe we could add the computational complexity later?

@karlnapf
Copy link
Member

Ok lets do complexity later

@karlnapf
Copy link
Member

Use git amend to correct commits, now you need to squash them (we want only one)

* involving the multidimensional search key.
* Check https://en.wikipedia.org/wiki/K-d_tree for more detail about K-D tree.
* KD-tree solver. It uses k-d tree (short for k-dimensional tree) to speed up the
* nearest neighbour computation. involving the multidimensional search key.
Copy link
Member

Choose a reason for hiding this comment

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

Sentences start with capital letter. The second sentence misses a subject. I also dont understand what that is supposed to mean

Copy link
Member

Choose a reason for hiding this comment

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

Maybe just remove

* The CoverTreeKNNSolver class is a solver class which inherit from KNNSolver class.
* It use the cover tree to speed up the nearest neighbor search and you can find more
* detail information on https://en.wikipedia.org/wiki/Cover_tree
* Cover tree solver. It uses the cover trees to speed up the nearest neighbour computation.
Copy link
Member

Choose a reason for hiding this comment

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

remove "the"

@MikeLing
Copy link
Contributor Author

@karlnapf I had fix those nits. Thank you for your reviewing :)

Copy link
Member

@karlnapf karlnapf left a comment

Choose a reason for hiding this comment

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

Nice thanks!
you see how minimal, yet much clearer (!), the docs now are? No superfluous words, clear description, nothing redundant, etc

@karlnapf karlnapf merged commit a28c407 into shogun-toolbox:develop Feb 19, 2017
karasikov pushed a commit to karasikov/shogun that referenced this pull request Apr 15, 2017
clean up language error and fluffy comments
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

2 participants