-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Support cross validation of pipeline #4377
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
Support cross validation of pipeline #4377
Conversation
457aac1 to
f508903
Compare
src/shogun/clustering/Hierarchical.h
Outdated
| return false; | ||
| } | ||
|
|
||
| /** TODO: Ensures cluster centers are in lhs of underlying distance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you open an issue with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this comment was left before, i just copy-pasted to make the method public
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I know, just so that it is documented. This is a nice entry task
|
couldnt we make some friend classes instead of adding the set_store_model features to the interface. This is not meant to be an interface method (definitely not for SWIG, but not even for cpp) |
src/shogun/machine/LinearMachine.h
Outdated
| * and therefore the model anyway | ||
| */ | ||
| virtual void store_model_features(); | ||
| /** Computes the added bias. The bias is computed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wasnt this method remove in develop?
|
|
||
| void CPipeline::set_store_model_features(bool store_model) | ||
| { | ||
| get_machine()->set_store_model_features(store_model); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Pipeline inherits from CMachine, why cant the method be protected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a protected method from base class, you cannot access it of another instance in the derived class CPipeline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry of course you are right. friend class?
| CSGObject* CPipeline::clone() | ||
| { | ||
| auto result = CMachine::clone()->as<CPipeline>(); | ||
| for (auto&& stage : m_stages) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could probably do this via the parameter framework clone, with a few additions for std::types. The class is not serializable anyways.
@lisitsyn what do you think?
karlnapf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, apart from this public method that should be at least hidden from swig, or better, not be public.
767990c to
1079fb9
Compare
karlnapf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good from my side
This reverts commit 714d055.
6a3187f to
c4bbf8d
Compare
|
@vigsterkr could you check and merge this? |
store_model_featuresin pipeline, which forwards the call to the underlying machine of the pipeline* madestore_model_featurepublic, such that as a method of base classCMachineit is callable from pipelinecloneto make pipeline cloneableget_machine_problem_type