35 init(pre_svm, B_param);
44 SG_DEBUG(
"deleting DomainAdaptationSVMLinear\n")
87 SG_ERROR(
"presvm bias not set to zero")
91 SG_ERROR(
"feature types do not agree")
106 SG_ERROR(
"DomainAdaptationSVMLinear requires binary labels\n")
114 SG_ERROR(
"Number of training vectors does not match number of labels\n")
126 std::vector<float64_t> lin_term = std::vector<float64_t>(num_training_points);
135 SG_DEBUG(
"pre-computing linear term from presvm\n")
138 for (int32_t i=0; i!=num_training_points; i++)
172 bool success =
false;
229 for (int32_t i=0; i!=num_examples; i++)
virtual float64_t get_value(int32_t idx)
virtual CBinaryLabels * apply_binary(CFeatures *data=NULL)
virtual float64_t get_B()
virtual ELabelType get_label_type() const =0
virtual int32_t get_num_labels() const
The class Labels models labels, i.e. class assignments of objects.
virtual int32_t get_num_vectors() const =0
virtual bool is_presvm_sane()
virtual CDotFeatures * get_features()
Features that support dot products among other operations.
virtual CLinearMachine * get_presvm()
virtual bool train_machine(CFeatures *data=NULL)
void add(bool *param, const char *name, const char *description="")
Class SGObject is the base class of all shogun objects.
void set_linear_term(const SGVector< float64_t > linear_term)
This class provides an interface to the LibLinear library for large- scale linear learning focusing o...
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)
all of classes and functions are contained in the shogun namespace
The class Features is the base class of all feature objects.
virtual float64_t get_bias()
virtual bool train_machine(CFeatures *data=NULL)
virtual float64_t get_train_factor()
Binary Labels for binary classification.
virtual void set_bias(float64_t b)
L2 regularized linear SVM with L1-loss using dual coordinate descent.
bool has_property(EFeatureProperty p) const
void set_liblinear_solver_type(LIBLINEAR_SOLVER_TYPE st)
virtual CBinaryLabels * apply_binary(CFeatures *data=NULL)
virtual EFeatureType get_feature_type() const =0
CDomainAdaptationSVMLinear()