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

Class::method need to be refactored #5049

Open
LiuYuHui opened this issue Jun 1, 2020 · 2 comments
Open

Class::method need to be refactored #5049

LiuYuHui opened this issue Jun 1, 2020 · 2 comments

Comments

@LiuYuHui
Copy link
Contributor

LiuYuHui commented Jun 1, 2020

The current shogun Machine class store the label and the features, this implementation makes the class became stateful, it is great that refactor the Machine class and the derived class to became stateless.
The basic idea is that find all the method that accesses m_labels/m_features and use the parameters passed in instead.
here is all the class::method needs to be refactored, those methods are found by this libtooling script.

@karlnapf
Copy link
Member

karlnapf commented Jun 1, 2020

This actually doesn't look that bad...everything is in the lines of train_machine, solver, objective and therefore will be easy as the refactor only needs to pass the labels to the method as a parameter. These methods typically don't rely on the machine being stateful but simple read the labels field

@gf712
Copy link
Member

gf712 commented Jun 1, 2020

@karlnapf this is just for classifiers, there should be more coming up soon.

@LiuYuHui LiuYuHui changed the title Class::method need to be reactored Class::method need to be refactored Jun 1, 2020
@gf712 gf712 added this to the Shogun 7.0.0 milestone Jun 4, 2020
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

3 participants