srendle / libfm

Library for factorization machines
GNU General Public License v3.0
1.49k stars 414 forks source link

Use defined constants instead of hardcoding magic numbers #16

Open benmccann opened 8 years ago

benmccann commented 8 years ago

fm_learn_sgd_element.h and fm_learn_sgd_element_adapt_reg.h have code like if (task == 0) {.

fm_learn_sgd.h does this in a much cleaner way: if (task == TASK_REGRESSION ) {

These enum constants should be used throughout