37 #ifndef SHARK_ALGORITHMS_REGULARIZATIONNETWORKTRAINER_H 38 #define SHARK_ALGORITHMS_REGULARIZATIONNETWORKTRAINER_H 85 template <
class InputType>
97 : base_type(kernel, 1.0 / betaInv, false, unconstrained)
102 {
return "RegularizationNetworkTrainer"; }
106 {
return 1.0 / this->
C(); }
109 { this->
C() = 1.0 / betaInv; }
113 {
return this->
C(); }
116 { this->
C() =
beta; }
123 RealMatrix V = createBatch<RealVector>(dataset.
labels().elements());
124 RealVector
mean = sum_rows(V)/V.size1();
125 noalias(V) -= blas::repeat(mean,V.size1());
129 noalias(svm.
alpha()) = inv(M,blas::symm_semi_pos_def()) % V;
131 noalias(svm.
alpha()) = inv(M,blas::symm_pos_def()) % V;
132 noalias(svm.
offset()) = mean;
139 #define GaussianProcessTrainer RegularizationNetworkTrainer