public class GLMUtils
extends java.lang.Object
Constructor and Description |
---|
GLMUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addOneRow2ScoringHistory(water.util.TwoDimTable glmSc1,
water.util.TwoDimTable earlyStopSc2,
int glmColSize,
int earlyStopColSize,
int glmRowIndex,
int earlyStopRowIndex,
int rowIndex,
boolean addGlmSC,
boolean addEarlyStopSC,
java.util.List<java.lang.Integer> earlyStopColIndices,
water.util.TwoDimTable combined,
int overlapSize) |
static water.fvec.Frame |
buildRIDFrame(GLMModel.GLMParameters parms,
water.fvec.Frame train,
water.fvec.Frame RIDFrame) |
static double |
calSmoothNess(double[][] beta,
double[][][] penaltyMatrix,
int[][] gamColIndices) |
static double |
calSmoothNess(double[] beta,
double[][][] penaltyMatrix,
int[][] gamColIndices) |
static water.util.TwoDimTable |
combineScoringHistory(water.util.TwoDimTable glmSc1,
water.util.TwoDimTable earlyStopSc2) |
static water.util.TwoDimTable |
combineTableContents(water.util.TwoDimTable glmSc1,
water.util.TwoDimTable earlyStopSc2,
water.util.TwoDimTable combined,
java.util.List<java.lang.Integer> earlyStopColIndices,
int indexOfIter,
int indexOfIterEarlyStop,
int overlapSize) |
static GLM.GLMGradientInfo |
copyGInfo(GLM.GLMGradientInfo ginfo) |
static water.fvec.Frame |
expandedCatCS(water.fvec.Frame beta_constraints,
GLMModel.GLMParameters parms) |
static int[][] |
extractAdaptedFrameIndices(water.fvec.Frame adaptFrame,
java.lang.String[][] gamColnames,
int numOffset)
From the gamColnames, this method attempts to translate to the column indices in adaptFrame.
|
static boolean |
findEnumInBetaCS(water.fvec.Frame betaCS,
GLMModel.GLMParameters parms) |
static java.lang.String[] |
genDfbetasNames(GLMModel model) |
static java.lang.String[] |
generateRowHeaders(water.util.TwoDimTable glmSc1,
water.util.TwoDimTable earlyStopSc2,
int glmIterIndex,
int earlyStopIterIndex) |
static GLMModel.GLMParameters[] |
genGLMParameters(GLMModel.GLMParameters parms,
java.lang.String[] validPreds,
java.lang.String[] predictorNames) |
static double[] |
genNewBeta(int newBetaLength,
double[] beta,
double[] stdErr) |
static boolean |
notZeroLambdas(double[] lambdas) |
static void |
removePredictors(GLMModel.GLMParameters parms,
water.fvec.Frame train) |
static void |
removeRedCols(double[] row2Array,
double[] reducedArray,
double[] stdErr) |
static void |
updateGradGam(double[] gradient,
double[][][] penalty_mat,
int[][] gamBetaIndices,
double[] beta,
int[] activeCols) |
static void |
updateGradGamMultinomial(double[][] gradient,
double[][][] penaltyMat,
int[][] gamBetaIndices,
double[][] beta) |
public static int[][] extractAdaptedFrameIndices(water.fvec.Frame adaptFrame, java.lang.String[][] gamColnames, int numOffset)
adaptFrame
- gamColnames
- public static GLMModel.GLMParameters[] genGLMParameters(GLMModel.GLMParameters parms, java.lang.String[] validPreds, java.lang.String[] predictorNames)
public static void removePredictors(GLMModel.GLMParameters parms, water.fvec.Frame train)
public static water.fvec.Frame expandedCatCS(water.fvec.Frame beta_constraints, GLMModel.GLMParameters parms)
public static boolean findEnumInBetaCS(water.fvec.Frame betaCS, GLMModel.GLMParameters parms)
public static GLM.GLMGradientInfo copyGInfo(GLM.GLMGradientInfo ginfo)
public static water.util.TwoDimTable combineScoringHistory(water.util.TwoDimTable glmSc1, water.util.TwoDimTable earlyStopSc2)
public static java.lang.String[] generateRowHeaders(water.util.TwoDimTable glmSc1, water.util.TwoDimTable earlyStopSc2, int glmIterIndex, int earlyStopIterIndex)
public static water.util.TwoDimTable combineTableContents(water.util.TwoDimTable glmSc1, water.util.TwoDimTable earlyStopSc2, water.util.TwoDimTable combined, java.util.List<java.lang.Integer> earlyStopColIndices, int indexOfIter, int indexOfIterEarlyStop, int overlapSize)
public static void addOneRow2ScoringHistory(water.util.TwoDimTable glmSc1, water.util.TwoDimTable earlyStopSc2, int glmColSize, int earlyStopColSize, int glmRowIndex, int earlyStopRowIndex, int rowIndex, boolean addGlmSC, boolean addEarlyStopSC, java.util.List<java.lang.Integer> earlyStopColIndices, water.util.TwoDimTable combined, int overlapSize)
public static void updateGradGam(double[] gradient, double[][][] penalty_mat, int[][] gamBetaIndices, double[] beta, int[] activeCols)
public static void updateGradGamMultinomial(double[][] gradient, double[][][] penaltyMat, int[][] gamBetaIndices, double[][] beta)
public static double calSmoothNess(double[] beta, double[][][] penaltyMatrix, int[][] gamColIndices)
public static double calSmoothNess(double[][] beta, double[][][] penaltyMatrix, int[][] gamColIndices)
beta
- multinomial number of class by number of predictorspenaltyMatrix
- gamColIndices
- public static java.lang.String[] genDfbetasNames(GLMModel model)
public static double[] genNewBeta(int newBetaLength, double[] beta, double[] stdErr)
public static void removeRedCols(double[] row2Array, double[] reducedArray, double[] stdErr)
public static water.fvec.Frame buildRIDFrame(GLMModel.GLMParameters parms, water.fvec.Frame train, water.fvec.Frame RIDFrame)
public static boolean notZeroLambdas(double[] lambdas)