com.expleague.ml.cli.builders.methods.impl.GreedyTDBumpyRegionBuilder Maven / Gradle / Ivy
package com.expleague.ml.cli.builders.methods.impl;
import com.expleague.commons.func.Factory;
import com.expleague.ml.BFGrid;
import com.expleague.ml.methods.VecOptimization;
import com.expleague.ml.methods.greedyRegion.GreedyTDBumpyRegion;
/**
* User: noxoomo
*/
public class GreedyTDBumpyRegionBuilder implements Factory {
public static Factory defaultGridBuilder;
private double lambda = 0.02;
private Factory gridBuilder = defaultGridBuilder;
public void setGridBuilder(final Factory gridBuilder) {
this.gridBuilder = gridBuilder;
}
public void setLambda(final double lambda) {
this.lambda = lambda;
}
@Override
public VecOptimization create() {
return new GreedyTDBumpyRegion(gridBuilder.create(), lambda);
}
}