28 using namespace shogun;
72 SG_ERROR(
"Specified features are not of type CStreamingDotFeatures\n")
93 t = 1 / (eta0 * lambda);
95 SG_INFO(
"lambda=%f, epochs=%d, eta0=%f\n", lambda, epochs, eta0)
105 bool is_log_loss =
false;
124 if (z < 1 || is_log_loss)
131 if (use_regularized_bias)
132 bias *= 1 - eta * lambda * bscale;
133 bias += etd * y * bscale;
141 r = pow(1 - eta * lambda, skip);
190 if (n>=max_vec_num || m > 1000)
194 SG_PRINT(
"Online SGD calibrated using %d vectors.\n", n)
200 skip = (int32_t) ((16 * n * c_dim) / r);
202 SG_INFO(
"using %d examples. skip=%d bscale=%.6f\n", n, skip, bscale)
207 void COnlineSVMSGD::init()
220 use_regularized_bias=
false;
233 m_parameters->
add(&use_bias,
"use_bias",
"Indicates if bias is used.");
234 m_parameters->
add(&use_regularized_bias,
"use_regularized_bias",
"Indicates if bias is regularized.");