MCPcopy Create free account
hub / github.com/davisking/dlib / set_lambda_class2

Method set_lambda_class2

dlib/svm/pegasos.h:158–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156 }
157
158 void set_lambda_class2 (
159 scalar_type lambda_
160 )
161 {
162 // make sure requires clause is not broken
163 DLIB_ASSERT(0 < lambda_,
164 "\tvoid svm_pegasos::set_lambda_class2(lambda_)"
165 << "\n\t invalid inputs were given to this function"
166 << "\n\t lambda_: " << lambda_
167 );
168 lambda_c2 = lambda_;
169 max_wnorm = 1/std::sqrt(std::min(lambda_c1, lambda_c2));
170 clear();
171 }
172
173 const scalar_type get_lambda_class1 (
174 ) const

Callers 1

replicate_settingsFunction · 0.80

Calls 3

minFunction · 0.70
sqrtFunction · 0.50
clearFunction · 0.50

Tested by

no test coverage detected