shogun icon indicating copy to clipboard operation
shogun copied to clipboard

Machine object should return a reference to themselves

Open gf712 opened this issue 4 years ago • 8 comments

Machine object should return a reference to themselves (like in sklearn)

auto machine = pipeline->over(std::make_shared<NormOne>())
                                       ->composite()
                                              ->over(std::make_shared<MulticlassLibLinear>())
            				      ->over(std::make_shared<MulticlassOCAS>())
                        	        ->then(std::make_shared<MeanRule>());

machine->train(train_feats, train_labels);
auto pred = machine->apply_multiclass(test_feats);

should be simply

auto pred = pipeline->over(std::make_shared<NormOne>())
                                 ->composite()
                                          ->over(std::make_shared<MulticlassLibLinear>())
            		                  ->over(std::make_shared<MulticlassOCAS>())
                        	 ->then(std::make_shared<MeanRule>())
                                 ->train(train_feats, train_labels)
                                 ->apply_multiclass(test_feats);

This should be a simple fix in Machine::train signature, but it might break some code..

gf712 avatar Dec 08 '20 13:12 gf712

Hey, I would like to work on this issue :) This is my first contribution so would it be ok if I fix one file and commit it just to make sure it doesn't break any code?

sgayangi avatar Dec 22 '20 11:12 sgayangi

@gf712 This issue seems stale, shall I take it up? I've already done 80% of the work. Some unit tests and integration tests are failing that's all.

jonpsy avatar Dec 30 '20 06:12 jonpsy

@jonpsy great! If you start a PR I can have a look.

gf712 avatar Dec 30 '20 08:12 gf712

Hello everyone. I am a student at the University of Chinese Academy of Sciences, and I am interested in this project. As a newcomer I would like to do something for the communinty, and I noticed that this issue with a "good first issue" label. I am interested in the current status of this issue. Were there any changes? What can I do for now?

Jia1018 avatar Feb 11 '21 02:02 Jia1018

@Jia1018 I've already made the changes in my PR. If you want, you can copy my PR and modify it a bit to answer the build failure. I'll close my PR when you send yours.

jonpsy avatar Feb 11 '21 02:02 jonpsy

@jonpsy ok, thanks a lot! I'll have a try.

Jia1018 avatar Feb 11 '21 03:02 Jia1018

@Jia1018 if this issue is still open I owuld like to give it a shot. I have experience in ml and also practice on Kaggle

rajpratyush avatar Feb 20 '21 14:02 rajpratyush

I would like to work on this issue if it is still open. I have experience in ML and Data Science.

ankit0806 avatar Mar 30 '23 19:03 ankit0806