private void performUpdate(final Vec x, final double y, final double yHat)
    {
        for(IndexValue iv : x)
        {
            final int j = iv.getIndex();
            w.set(j, 
                    T(w.get(j)+2*learningRate*(y-yHat)*iv.getValue(), 
                    ((time-t[j])/K)*gravity*learningRate,
                    threshold));
            
            t[j] += ((time-t[j])/K)*K;
        }
    }
private void performUpdate ( final Vec x , final double y , final double yHat ) { for ( IndexValue iv : x ) { final int j = iv . getIndex ( ) ; w . set ( j , T ( w . get ( j ) + 2 * learningRate * ( y - yHat ) * iv . getValue ( ) , ( ( time - t [ j ] ) / K ) * gravity * learningRate , threshold ) ) ; t [ j ] += ( ( time - t [ j ] ) / K ) * K ; } }
Performs the sparse update of the weight vector
@param x the input vector
@param y the true value
@param yHat the predicted value