Github user myui commented on a diff in the pull request:

    https://github.com/apache/incubator-hivemall/pull/149#discussion_r200590772
  
    --- Diff: core/src/main/java/hivemall/fm/FactorizationMachineUDTF.java ---
    @@ -283,9 +293,16 @@ public void process(Object[] args) throws 
HiveException {
             }
     
             ++_t;
    -        recordTrain(x, y);
    -        boolean adaptiveRegularization = (_va_rand != null) && _t >= 
_validationThreshold;
    -        train(x, y, adaptiveRegularization);
    +
    +        boolean validation = false;
    +        if ((_va_rand != null) && _t >= _validationThreshold) {
    +            final float rnd = _va_rand.nextFloat();
    +            validation = rnd < _validationRatio;
    +        }
    +
    +        recordTrain(x, y, validation);
    +
    +        train(x, y, validation);
    --- End diff --
    
    Validation examples are fixed in this implementation. Also, not using 
non-validation examples for regularization is a bad strategy.


---

Reply via email to