All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.etsy.conjecture.model.ElasticNetOptimizer Maven / Gradle / Ivy

There is a newer version: 0.2.3
Show newest version
package com.etsy.conjecture.model;

import com.etsy.conjecture.data.*;

public class ElasticNetOptimizer extends SGDOptimizer implements LazyVector.UpdateFunction {

    @Override
    public StringKeyedVector getUpdate(LabeledInstance instance) {
        StringKeyedVector gradients = model.getGradients(instance);
        double learningRate = getDecreasingLearningRate(model.epoch);
        gradients.mul(-learningRate);
        return gradients;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy