33 init(pre_svm, B_param);
39 SG_DEBUG(
"deleting DomainAdaptationSVM\n")
45 REQUIRE(pre_svm != NULL,
"Pre SVM should not be null");
67 SG_ERROR(
"presvm has no support vectors, please train first")
71 SG_ERROR(
"presvm bias not set to zero")
75 SG_ERROR(
"kernel types do not agree")
79 SG_ERROR(
"feature types do not agree")
92 SG_ERROR(
"Number of training vectors does not match number of labels\n")
97 SG_ERROR(
"DomainAdaptationSVM requires binary labels\n")
111 for (int32_t i=0; i<num_training_points; i++)
169 for (int32_t i=0; i<num_examples; i++)
180 void CDomainAdaptationSVM::init()
190 "flag to switch off regularization in training.",
MS_AVAILABLE);
193 #endif //USE_SVMLIGHT
virtual bool init(CFeatures *lhs, CFeatures *rhs)
virtual bool is_presvm_sane()
virtual float64_t get_value(int32_t idx)
int32_t get_num_support_vectors()
void init(CSVM *presvm, float64_t B)
virtual ELabelType get_label_type() const =0
The class Labels models labels, i.e. class assignments of objects.
virtual int32_t get_num_labels() const =0
virtual float64_t get_train_factor()
virtual bool train_machine(CFeatures *data=NULL)
virtual CBinaryLabels * apply_binary(CFeatures *data=NULL)
virtual int32_t get_num_vectors() const =0
virtual void set_linear_term(const SGVector< float64_t > linear_term)
float64_t get_label(int32_t idx)
Class SGObject is the base class of all shogun objects.
void set_bias(float64_t bias)
virtual float64_t get_B()
virtual EFeatureType get_feature_type()=0
virtual CSVM * get_presvm()
virtual CLabels * get_labels()
virtual bool train_machine(CFeatures *data=NULL)
virtual void set_train_factor(float64_t factor)
virtual ~CDomainAdaptationSVM()
all of classes and functions are contained in the shogun namespace
virtual EKernelType get_kernel_type()=0
The class Features is the base class of all feature objects.
A generic Support Vector Machine Interface.
Binary Labels for binary classification.
virtual CBinaryLabels * apply_binary(CFeatures *data=NULL)