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

Method get_decision_function

dlib/svm/rls.h:139–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137 }
138
139 decision_function<linear_kernel<matrix<double,0,1> > > get_decision_function (
140 ) const
141 {
142 // make sure requires clause is not broken
143 DLIB_ASSERT(get_w().size() != 0,
144 "\t decision_function rls::get_decision_function()"
145 << "\n\t invalid arguments were given to this function"
146 << "\n\t get_w().size(): " << get_w().size()
147 << "\n\t this: " << this
148 );
149
150 decision_function<linear_kernel<matrix<double,0,1> > > df;
151 df.alpha.set_size(1);
152 df.basis_vectors.set_size(1);
153 df.b = 0;
154 df.alpha = 1;
155 df.basis_vectors(0) = w;
156
157 return df;
158 }
159
160 friend inline void serialize(const rls& item, std::ostream& out)
161 {

Callers 2

test_rlsFunction · 0.45
mainFunction · 0.45

Calls 2

sizeMethod · 0.45
set_sizeMethod · 0.45

Tested by 1

test_rlsFunction · 0.36