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

com.expleague.ml.cli.builders.methods.grid.GridBuilder Maven / Gradle / Ivy

package com.expleague.ml.cli.builders.methods.grid;

import com.expleague.commons.func.Factory;
import com.expleague.ml.data.set.VecDataSet;
import com.expleague.ml.BFGrid;
import com.expleague.ml.GridTools;

/**
 * User: qdeee
 * Date: 03.09.14
 */
public class GridBuilder implements Factory {
  BFGrid cooked;
  int binsCount = 32;
  VecDataSet dataSet;

  public void setGrid(final BFGrid cooked) {
    this.cooked = cooked;
  }

  public void setBinsCount(final int binsCount) {
    this.binsCount = binsCount;
  }

  public void setDataSet(final VecDataSet dataSet) {
    this.dataSet = dataSet;
  }

  @Override
  public BFGrid create() {
    if (cooked == null) {
      cooked = GridTools.medianGrid(dataSet, binsCount);
    }
    return cooked;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy