Package hivemall.io.WeightValue

Examples of hivemall.io.WeightValue.WeightValueParamsF2


            // x_{t,i} = 0
            model.delete(x);
        } else {
            // x_{t,i} = -sign(u_{t,i}) * \frac{\eta t}{\sqrt{G_{t,ii}}}(|u_{t,i}|/t - \lambda)
            float weight = -1.f * sign * eta * t * meansOfGradients / (float) Math.sqrt(sum_sqgrad);
            IWeightValue new_w = new WeightValueParamsF2(weight, scaled_sum_sqgrad, scaled_sum_grad);
            model.set(x, new_w);
        }
    }
View Full Code Here


                / (old_scaled_sum_sqgrad * scaling + eps))
                * gradient;
        float new_sum_squared_delta_x = (decay * old_sum_squared_delta_x)
                + ((1.f - decay) * dx * dx);
        float new_w = old_w + (dx * xi);
        return new WeightValueParamsF2(new_w, new_scaled_sum_sq_grad, new_sum_squared_delta_x);
    }
View Full Code Here

        if(i >= size) {
            return null;
        }
        if(sum_of_squared_gradients != null) {
            if(sum_of_squared_delta_x != null) {
                return (T) new WeightValueParamsF2(weights[i], sum_of_squared_gradients[i], sum_of_squared_delta_x[i]);
            } else if(sum_of_gradients != null) {
                return (T) new WeightValueParamsF2(weights[i], sum_of_squared_gradients[i], sum_of_gradients[i]);
            } else {
                return (T) new WeightValueParamsF1(weights[i], sum_of_squared_gradients[i]);
            }
        } else if(covars != null) {
            return (T) new WeightValueWithCovar(weights[i], covars[i]);
View Full Code Here

        if(i >= size) {
            return null;
        }
        if(sum_of_squared_gradients != null) {
            if(sum_of_squared_delta_x != null) {
                return (T) new WeightValueParamsF2(getWeight(i), sum_of_squared_gradients[i], sum_of_squared_delta_x[i]);
            } else if(sum_of_gradients != null) {
                return (T) new WeightValueParamsF2(getWeight(i), sum_of_squared_gradients[i], sum_of_gradients[i]);
            } else {
                return (T) new WeightValueParamsF1(getWeight(i), sum_of_squared_gradients[i]);
            }
        } else if(covars != null) {
            return (T) new WeightValueWithCovar(getWeight(i), getCovar(i));
View Full Code Here

TOP

Related Classes of hivemall.io.WeightValue.WeightValueParamsF2

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.