Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why return “1/(1+exp(-t))” in the ffm_predict.cpp ? #30

Closed
zceng opened this issue Apr 15, 2018 · 0 comments
Closed

Why return “1/(1+exp(-t))” in the ffm_predict.cpp ? #30

zceng opened this issue Apr 15, 2018 · 0 comments

Comments

@zceng
Copy link

zceng commented Apr 15, 2018

I'm confused about the last line of "ffm_predict.cpp":

ffm_float ffm_predict(ffm_node *begin, ffm_node *end, ffm_model &model) {
    ffm_float r = 1;
    if(model.normalization) {
        r = 0;
        for(ffm_node *N = begin; N != end; N++)
            r += N->v*N->v; 
        r = 1/r;
    }
    ffm_float t = wTx(begin, end, r, model);
    return 1/(1+exp(-t));
}

After reading the paper, "Field-aware Factorization Machines for CTR Prediction" , I think the predict value is the variable "t" , but the return of this function is "1/(1+expp(-t))" . Could you answer my doubt ?

@zceng zceng changed the title Why use “1/(1+exp(-t))” in the ffm_predict.cpp ? Why return “1/(1+exp(-t))” in the ffm_predict.cpp ? Apr 15, 2018
@zceng zceng closed this as completed Apr 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant