hex.gam.MatrixFrameUtils.AddISGamColumns Maven / Gradle / Ivy
package hex.gam.MatrixFrameUtils;
import hex.genmodel.algos.gam.ISplines;
import water.MRTask;
import water.MemoryManager;
import water.fvec.Chunk;
import water.fvec.Frame;
import water.fvec.NewChunk;
/**
* class to gamified all gam_columns with bs set to 2. For details regarding I-spline, please refer to doc I in
* JIRA: https://h2oai.atlassian.net/browse/PUBDEV-8398. This one performs gamification only.
*/
public class AddISGamColumns extends MRTask {
double[][][] _knotsMat; // knots without duplication for I-spline
int[] _numKnots;
int[] _numBasis;
public int _numGAMCols; // count number of I-Spline gam columns
int[] _gamColsOffsets;
Frame _gamFrame;
int[] _bs; // for I-spline only
int[] _splineOrder; // for I-spline only
int _totGamifiedCols=0;
public int _totGamifiedColCentered=0;
public AddISGamColumns(double[][][] knotsMat, int[] numKnot, int[] bs, int[] splineOrder,
Frame gamColFrames) {
_gamFrame = gamColFrames;
_numGAMCols = gamColFrames.numCols();
_gamColsOffsets = MemoryManager.malloc4(_numGAMCols);
_knotsMat = new double[_numGAMCols][][];
_bs = new int[_numGAMCols];
_splineOrder = new int[_numGAMCols];
_numKnots = new int[_numGAMCols];
_numBasis = new int[_numGAMCols];
int totGamCols = bs.length;
int countIS = 0;
int offset = 0;
for (int index=0; index
© 2015 - 2025 Weber Informatics LLC | Privacy Policy