Support cross validation of pipeline #4377
Conversation
457aac1
to
f508903
@@ -108,6 +108,11 @@ class CHierarchical : public CDistanceMachine | |||
return false; | |||
} | |||
|
|||
/** TODO: Ensures cluster centers are in lhs of underlying distance |
karlnapf
Jul 31, 2018
Member
could you open an issue with this?
could you open an issue with this?
vinx13
Jul 31, 2018
•
Author
Member
this comment was left before, i just copy-pasted to make the method public
this comment was left before, i just copy-pasted to make the method public
karlnapf
Jul 31, 2018
Member
yeah I know, just so that it is documented. This is a nice entry task
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) |
* and therefore the model anyway | ||
*/ | ||
virtual void store_model_features(); | ||
/** Computes the added bias. The bias is computed |
karlnapf
Jul 31, 2018
Member
wasnt this method remove in develop?
wasnt this method remove in develop?
|
||
void CPipeline::set_store_model_features(bool store_model) | ||
{ | ||
get_machine()->set_store_model_features(store_model); |
karlnapf
Jul 31, 2018
Member
If Pipeline inherits from CMachine, why cant the method be protected?
If Pipeline inherits from CMachine, why cant the method be protected?
vinx13
Jul 31, 2018
Author
Member
it's a protected method from base class, you cannot access it of another instance in the derived class CPipeline
it's a protected method from base class, you cannot access it of another instance in the derived class CPipeline
karlnapf
Jul 31, 2018
Member
sorry of course you are right. friend class?
sorry of course you are right. friend class?
CSGObject* CPipeline::clone() | ||
{ | ||
auto result = CMachine::clone()->as<CPipeline>(); | ||
for (auto&& stage : m_stages) |
karlnapf
Jul 31, 2018
Member
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?
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?
LGTM, apart from this public method that should be at least hidden from swig, or better, not be public. |
767990c
to
1079fb9
Good from my side |
This reverts commit 714d055.
@vigsterkr could you check and merge this? |
store_model_features
in pipeline, which forwards the call to the underlying machine of the pipeline* madestore_model_feature
public, such that as a method of base classCMachine
it is callable from pipelineclone
to make pipeline cloneableget_machine_problem_type