Training/CV/test sets generation - OK; still need to fix the LR algorithm