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

Method set_lambda

dlib/svm/pegasos.h:126–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124 }
125
126 void set_lambda (
127 scalar_type lambda_
128 )
129 {
130 // make sure requires clause is not broken
131 DLIB_ASSERT(0 < lambda_,
132 "\tvoid svm_pegasos::set_lambda(lambda_)"
133 << "\n\t invalid inputs were given to this function"
134 << "\n\t lambda_: " << lambda_
135 );
136 lambda_c1 = lambda_;
137 lambda_c2 = lambda_;
138
139 max_wnorm = 1/std::sqrt(std::min(lambda_c1, lambda_c2));
140 clear();
141 }
142
143 void set_lambda_class1 (
144 scalar_type lambda_

Callers

nothing calls this directly

Calls 3

minFunction · 0.70
sqrtFunction · 0.50
clearFunction · 0.50

Tested by

no test coverage detected