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

Port all existing (python, libshogun) examples to meta examples #3555

Open
karlnapf opened this issue Nov 18, 2016 · 18 comments
Open

Port all existing (python, libshogun) examples to meta examples #3555

karlnapf opened this issue Nov 18, 2016 · 18 comments

Comments

@karlnapf
Copy link
Member

karlnapf commented Nov 18, 2016

#3000 is the full thing, example and cookbook page

This task is simple copy paste: Just take any of the existing python examples examples/uncodcumented/python_modular and create a meta example that does the same thing.

Remove the old example afterwards

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

This is a great task to get started with Shogun's examples, very easy.

There are a few hundred examples, so lots to do :)

@karlnapf karlnapf added this to the Shogun 6.0 milestone Nov 18, 2016
@souravsingh
Copy link
Contributor

@karlnapf I would like to take a stab at the issue.

@karlnapf
Copy link
Member Author

Yeah sure, as said, there is hundreds

@karlnapf
Copy link
Member Author

This is still really important

@spothound
Copy link
Contributor

I have write a post in my blog commenting things I've seen while creating the example I've just submitted. If someone trying to add samples can find it useful I would be delighted :)

@karlnapf
Copy link
Member Author

karlnapf commented Feb 2, 2018

Great! :)

Keep in mind also that make meta_examples parses and translates all meta examples found by cmake (if you added a new one you have to rerun cmake), and that build_cpp_meta_examples builds the cpp versions of them, and finally, ctest -R generated_cpp-binary-linear_support_vector_machine runs your example. If you want more details on how it is executed, append a -V

@karlnapf
Copy link
Member Author

There are still more examples to port as of early 2019: see examples/undocumented/python

@taichi-yagami
Copy link

@karlnapf I wish to work on making meta examples for remaining py files mentioned in examples/uncodcumented/python directory, I wanted to know that whether there are any documentation / tutorial/ blogs on how to convert those py file into and meta example, and how it works.

@karlnapf
Copy link
Member Author

karlnapf commented Mar 6, 2019

There is a readme

@taichi-yagami
Copy link

@karlnapf Ok I will take this task of building meta example for remaining python files.

@karlnapf
Copy link
Member Author

We will need to port all examples in examples/undocumented/python/*.py to the new meta example system, using factories and base types rather than specialised types (i.e. using Machine m = machine("LibSVM") rather than LibSVM m = LibSVM(), and using m.apply().get("labels") rather than m.apply_binary().get_labels()

ktiefe pushed a commit to ktiefe/shogun that referenced this issue Jul 30, 2019
@Hephaestus12
Copy link
Contributor

There is a readme

Where is this readme available?
Also since we are no longer writing cookbook pages (.rst) files do we still need to comment sections on the meta example (.sg) files?

@vigsterkr
Copy link
Member

@Hephaestus12 i'm not so sure where did you read about not writing cookbook pages.... yes you need to comment the sections.
please check out our documentation and you'll find answers to most of your questions; if not please create an issue (https://github.com/shogun-toolbox/shogun/blob/develop/doc/readme/EXAMPLES.md#automatically-generated-examples-)

@Hephaestus12
Copy link
Contributor

@vigsterkr Sorry, I was referring to the distance examples, it was mentioned here: #3000 (comment)
Anyway, thanks for the help :)

@vigsterkr
Copy link
Member

@Hephaestus12 that's a specific case...

@festusojo123
Copy link

Wanted to upload .sg and .rst files for the Linear Time MMD example but couldn't make a new branch to start the patch. Also, is trying to make files for the exampes on the cookbook site still a good initial patch, or are there any others that you'd recommend that are new from the 2017 "getting started" page? Thanks1

@vigsterkr
Copy link
Member

@festusojo123 plz read about how to submit your first PR on github (search for manual on the internet)

@Khalifa1997
Copy link
Contributor

Khalifa1997 commented Mar 28, 2020

@karlnapf There are many cases where labels would be generated using np.random how do you suggest going about those cases

@karlnapf
Copy link
Member Author

Load a dataset instead. We have many, check the other examples

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

8 participants