21 using namespace shogun;
32 init(pre_svm, B_param);
41 SG_DEBUG(
"deleting DomainAdaptationSVMLinear\n");
84 SG_ERROR(
"presvm bias not set to zero");
88 SG_ERROR(
"feature types do not agree");
105 SG_ERROR(
"Number of training vectors does not match number of labels\n");
106 tmp_data = train_data;
115 std::vector<float64_t> lin_term = std::vector<float64_t>(num_training_points);
124 SG_DEBUG(
"pre-computing linear term from presvm\n");
127 for (int32_t i=0; i!=num_training_points; i++)
159 bool success =
false;
217 for (int32_t i=0; i!=num_examples; i++)
virtual float64_t get_B()
virtual float64_t get_label(int32_t i)
virtual EFeatureType get_feature_type()=0
bool set_label(int32_t idx, float64_t label)
The class Labels models labels, i.e. class assignments of objects.
virtual int32_t get_num_vectors() const =0
void set_linear_term(SGVector< float64_t > linear_term)
virtual bool is_presvm_sane()
virtual CDotFeatures * get_features()
Features that support dot products among other operations.
virtual CLinearMachine * get_presvm()
void add(bool *param, const char *name, const char *description="")
Class SGObject is the base class of all shogun objects.
virtual bool train_machine(CDotFeatures *data=NULL)
class to implement LibLinear
float64_t get_label(int32_t idx)
virtual CLabels * get_labels()
Class LinearMachine is a generic interface for all kinds of linear machines like classifiers.
virtual void set_train_factor(float64_t factor)
virtual ~CDomainAdaptationSVMLinear()
void init(CLinearMachine *presvm, float64_t B)
virtual bool train_machine(CFeatures *data=NULL)
virtual float64_t get_train_factor()
void set_bias(float64_t b)
L2 regularized linear SVM with L1-loss using dual coordinate descent.
void set_liblinear_solver_type(LIBLINEAR_SOLVER_TYPE st)
virtual CLabels * apply()
CDomainAdaptationSVMLinear()