28 using namespace shogun;
73 SG_ERROR(
"Specified features are not of type CStreamingDotFeatures\n");
94 t = 1 / (eta0 * lambda);
96 SG_INFO(
"lambda=%f, epochs=%d, eta0=%f\n", lambda, epochs, eta0);
106 bool is_log_loss =
false;
125 if (z < 1 || is_log_loss)
132 if (use_regularized_bias)
133 bias *= 1 - eta * lambda * bscale;
134 bias += etd * y * bscale;
142 r = pow(1 - eta * lambda, skip);
191 if (n>=max_vec_num || m > 1000)
195 SG_PRINT(
"Online SGD calibrated using %d vectors.\n", n);
201 skip = (int32_t) ((16 * n * c_dim) / r);
203 SG_INFO(
"using %d examples. skip=%d bscale=%.6f\n", n, skip, bscale);
208 void COnlineSVMSGD::init()
221 use_regularized_bias=
false;
234 m_parameters->
add(&use_bias,
"use_bias",
"Indicates if bias is used.");
235 m_parameters->
add(&use_regularized_bias,
"use_regularized_bias",
"Indicates if bias is regularized.");