/**
 * Compute dot product between features vector and classifier weights
 */
float dot(float *x, ...) {
    va_list w;
    va_start(w, {{ weights|length }});

    float kernel = 0.0;

    for (uint16_t i = 0; i < {{ weights|length }}; i++) {
        kernel += x[i] * va_arg(w, double);
    }

    return kernel;
}