Skip to content

Commit

Permalink
Function get_dim removed from RiskFunction (will be available in Stru…
Browse files Browse the repository at this point in the history
…cturedModel)
  • Loading branch information
uricamic committed Jun 13, 2012
1 parent d6c2696 commit c504412
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/shogun/so/DualLibQPBMSOSVM.cpp
Expand Up @@ -43,8 +43,8 @@ void CDualLibQPBMSOSVM::set_opitons(float64_t TolRel, float64_t TolAbs, uint32_t

bool CDualLibQPBMSOSVM::train_machine(CFeatures* data)
{
// get dimension of w
uint32_t nDim=m_risk_function->get_w_dim(data);
// get dimension of w
//uint32_t nDim=m_risk_function->get_dim(data); //TODO: get_dim function accessible trough StructuredModel

// call the BMRM solver
bmrm_return_value_T result = svm_bmrm_solver(data, m_w.vector, m_TolRel, m_TolAbs, m_lambda,
Expand Down
4 changes: 2 additions & 2 deletions src/shogun/so/RiskFunction.h
Expand Up @@ -37,10 +37,10 @@ class CRiskFunction : public CSGObject
//virtual void risk(void* data, float64_t* R, SGVector< float64_t > subgrad, SGVector< float64_t > w) = 0;
virtual void risk(void* data, float64_t* R, float64_t* subgrad, float64_t* W) = 0;

/** get the dimension of vector w
/** get the dimension of joint feature vector w
*
*/
virtual uint32_t get_w_dim(void* data) = 0;
//virtual uint32_t get_dim(void* data) = 0; //TODO: Delete, will be accessible from StructuredModel

/** @return name of SGSerializable */
virtual const char* get_name() const { return "RiskFunction"; }
Expand Down
1 change: 0 additions & 1 deletion src/shogun/so/libbmrm.cpp
Expand Up @@ -48,7 +48,6 @@ bmrm_return_value_T svm_bmrm_solver(
libqp_state_T qp_exitflag;
float64_t *b, *beta, *diag_H, sq_norm_W;
float64_t R, *subgrad, *A, QPSolverTolRel, rsum, C = 1.0;
//uint32_t nDim;
uint32_t *I;
uint8_t S = 1;

Expand Down
1 change: 0 additions & 1 deletion src/shogun/so/libbmrm.h
Expand Up @@ -47,7 +47,6 @@ namespace shogun
float64_t lambda,
uint32_t _BufSize,
uint32_t nDim,
//uint32_t (*get_dim)(void*),
CRiskFunction* risk_function
//void (*risk_function)(void*, float64_t*, float64_t*, float64_t*)
);
Expand Down

0 comments on commit c504412

Please sign in to comment.