23 :
CSVM(C, k, NULL), model(NULL)
40 struct svm_node* x_space;
45 x_space=SG_MALLOC(
struct svm_node, 2*
problem.l);
47 for (int32_t i=0; i<
problem.l; i++)
51 x_space[2*i+1].index=-1;
54 int32_t weights_label[2]={-1,+1};
57 param.svm_type=ONE_CLASS;
58 param.kernel_type = LINEAR;
71 param.weight_label = weights_label;
72 param.weight = weights;
75 const char* error_msg = svm_check_parameter(&
problem,&
param);
87 int32_t num_sv=
model->l;
93 for (int32_t i=0; i<num_sv; i++)
101 svm_destroy_model(
model);
virtual bool init(CFeatures *lhs, CFeatures *rhs)
float64_t m_max_train_time
virtual int32_t get_num_vec_lhs()
void set_bias(float64_t bias)
bool set_alpha(int32_t idx, float64_t val)
void set_objective(float64_t v)
bool set_support_vector(int32_t idx, int32_t val)
virtual ~CLibSVMOneClass()
all of classes and functions are contained in the shogun namespace
The class Features is the base class of all feature objects.
A generic Support Vector Machine Interface.
virtual bool train_machine(CFeatures *data=NULL)
bool create_new_model(int32_t num)