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

Replace an undocumented example by a cookbook page #3000

Open
karlnapf opened this issue Feb 22, 2016 · 12 comments
Open

Replace an undocumented example by a cookbook page #3000

karlnapf opened this issue Feb 22, 2016 · 12 comments

Comments

@karlnapf
Copy link
Member

karlnapf commented Feb 22, 2016

Add a single page in the cookbook, replacing a python/octave/ ... example.

The patch should contain 3 changes

  • added .rst file
  • added .sg file
  • remove .py, .m, ... files

See https://github.com/shogun-toolbox/docs/blob/master/EXAMPLES.md and https://github.com/shogun-toolbox/docs/blob/master/DEVELOPING.md for instructions.

NOTE: There are many many of those, so this needs many people solving small pieces

@karlnapf karlnapf changed the title Replace a python example by a cookbook page Replace an undocumented example by a cookbook page Feb 24, 2016
@ballardt
Copy link
Contributor

ballardt commented Mar 7, 2016

Ok, I've given it a shot for the Gaussian Naive Bayes example. I'm new to Shogun (and ML in general), so I would really appreciate it if someone could give it a quick look and let me know if everything looks ok.

https://github.com/tbskm/gaussianNaiveBayes-cookbook

@karlnapf
Copy link
Member Author

karlnapf commented Mar 7, 2016

Hi there,
great, these are exactly the two files we need. Please send a Pull request against the cookbook feature branch (link above) rather than posting the files here. I will review it in there then.

A note for the others -- there are many more examples to go

@sanuj
Copy link
Contributor

sanuj commented Mar 8, 2016

@karlnapf I tried to build the cookbook in doc/cookbook/build by doing cmake .. and make cookbook. I tried the same in shogun's build dir also. Here is the error gist.
cmake -DBUILD_META_EXAMPLES .. is also not working. What am I missing?

@karlnapf
Copy link
Member Author

This is just the link checker failing, are you online?
Also pull the latest version, it works on my machine

@ballardt
Copy link
Contributor

Hmm, pretty sure I would have been online, but I'm using a stock Broadcom card that frequently acts up with Linux, so my connection probably went down at some point.
Btw I've been busy with some school assignments, but I should be able to remove those unnecessary bits from the cookbook page either today or tomorrow. 
Thanks!

_____________________________

From: Heiko Strathmann [email protected]
Sent: Thursday, March 10, 2016 7:20 AM
Subject: Re: [shogun] Replace an undocumented example by a cookbook page (#3000)
To: shogun-toolbox/shogun [email protected]
Cc: Trevor Ballard [email protected]

This is just the link checker failing, are you online?
Also pull the latest version, it works on my machine


Reply to this email directly or view it on GitHub.

@sanuj
Copy link
Contributor

sanuj commented Mar 10, 2016

@karlnapf It works now after pulling the latest version. Although cmake -DBUILD_META_EXAMPLES .. is still not working. The cookbook looks pretty neat.

@karlnapf
Copy link
Member Author

@tbskm I like the gaussian naive bayes example! Will merge soon.

@karlnapf
Copy link
Member Author

@sanuj lets not discuss this here ... irc maybe?

@eleninisioti
Copy link

Hello, I'm working on replacing "converter_multidimensionalscaling_modular.py" with a meta example and a cookbook page.

I have created a "converter" subdirectory under "examples/meta/src" and am thinking of adding a "Feature Transformations" (inspired from "converter") field in index.rst. Truth is that MDS is a general technique that can be applied for visualization, dimensionality reduction or feature extraction, so I'm skeptical about the correct name, do you have any suggestions?

I also have a problem with this line of code
return numpy.linalg.norm(distance_matrix_after-distance_matrix_before)/numpy.linalg.norm(distance_matrix_before) < 1e-6

How should this appear in the .sg file? Building as
bool output = ((numpy.linalg.norm(distance_matrix_after-distance_matrix_before) / numpy.linalg.norm(distance_matrix_before)) < 1e-6) shows that the math operators are not used correctly. Any resources on this? To my knowledge no existing example uses a math operator other than =.

@karlnapf
Copy link
Member Author

All good. I commented that we will not have this norm comparison in the output. That is unit testing material and the meta examples just store the results, so just remove the line

@karlnapf
Copy link
Member Author

Whoops. Re-opening as there are lots of python example still.

No need for cookbook rst pages for the remaining distance examples. A meta example is fine.

@karlnapf
Copy link
Member Author

#4047

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

No branches or pull requests

4 participants