hex.genmodel.algos.xgboost

Class XGBoostMojoModel

  • java.lang.Object
    • hex.genmodel.GenModel
      • hex.genmodel.MojoModel
        • hex.genmodel.algos.xgboost.XGBoostMojoModel
  • All Implemented Interfaces:
    hex.genmodel.algos.tree.PlattScalingMojoHelper.MojoModelWithCalibration, hex.genmodel.algos.tree.SharedTreeGraphConverter, hex.genmodel.IGenModel, java.io.Closeable, java.io.Serializable, java.lang.AutoCloseable, water.genmodel.IGeneratedModel
    Direct Known Subclasses:
    XGBoostJavaMojoModel, XGBoostNativeMojoModel


    public abstract class XGBoostMojoModelextends hex.genmodel.MojoModelimplements hex.genmodel.algos.tree.SharedTreeGraphConverter, hex.genmodel.algos.tree.PlattScalingMojoHelper.MojoModelWithCalibration, java.io.Closeable
    "Gradient Boosting Machine" MojoModel
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and TypeField and Description
      java.lang.String_boosterType 
      protected double[]_calib_glm_beta
      GLM's beta used for calibrating output probabilities using Platt Scaling.
      int[]_catOffsets 
      int_cats 
      java.lang.String_featureMap 
      int_ntrees 
      int_nums 
      boolean_sparse 
      boolean_useAllFactorLevels 
      • Fields inherited from class hex.genmodel.MojoModel

        _algoName, _balanceClasses, _category, _defaultThreshold, _h2oVersion, _modelAttributes, _modelClassDistrib, _modelDescriptor, _mojo_version, _nclasses, _nfeatures, _priorClassDistrib, _supervised, _uuid
      • Fields inherited from class hex.genmodel.GenModel

        _domains, _names, _offsetColumn, _responseColumn
    • Constructor Summary

      Constructors 
      Constructor and Description
      XGBoostMojoModel(java.lang.String[] columns, java.lang.String[][] domains, java.lang.String responseColumn) 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      booleancalibrateClassProbabilities(double[] preds) 
      protected voidconstructSubgraph(biz.k11i.xgboost.tree.RegTreeNode[] xgBoostNodes, hex.genmodel.algos.tree.SharedTreeNode sharedTreeNode, int nodeIndex, hex.genmodel.algos.tree.SharedTreeSubgraph sharedTreeSubgraph, boolean[] oneHotEncodedMap, boolean inclusiveNA, java.lang.String[] features) 
      hex.genmodel.algos.tree.SharedTreeGraphconvert(int treeNumber, java.lang.String treeClass, hex.genmodel.algos.tree.ConvertTreeOptions options) 
      double[]getCalibGlmBeta() 
      protected boolean[]markOneHotEncodedCategoricals(java.lang.String[] featureMap) 
      voidpostReadInit() 
      double[]score0(double[] row, double[] preds) 
      static double[]toPreds(double[] in, float[] out, double[] preds, int nclasses, double[] priorClassDistrib, double defaultThreshold) 
      • Methods inherited from class hex.genmodel.MojoModel

        getModelCategory, getUUID, isSupervised, load, load, nclasses, nfeatures
      • Methods inherited from class hex.genmodel.GenModel

        bitSetContains, bitSetIsInRange, convertDouble2Float, correctProbabilities, createAuxKey, features, GBM_rescale, getCategoricalEncoding, getColIdx, getDomainValues, getDomainValues, getDomainValues, getHeader, getModelCategories, getNames, getNumClasses, getNumCols, getNumResponseClasses, getOffsetName, getOrigDomainValues, getOrigNames, getOrigNumCols, getPrediction, getPredsSize, getPredsSize, getResponseIdx, getResponseName, GLM_identityInv, GLM_inverseInv, GLM_logInv, GLM_logitInv, GLM_ologitInv, GLM_tweedieInv, img2pixels, isAutoEncoder, isClassifier, KMeans_closest, KMeans_distance, KMeans_distance, KMeans_distances, Kmeans_preprocessData, Kmeans_preprocessData, KMeans_simplex, log_rescale, mapEnum, nCatFeatures, score0, setCats, setCats, setInput, setInput
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface hex.genmodel.algos.tree.SharedTreeGraphConverter

        convert
      • Methods inherited from interface java.io.Closeable

        close
    • Field Detail

      • _boosterType

        public java.lang.String _boosterType
      • _ntrees

        public int _ntrees
      • _nums

        public int _nums
      • _cats

        public int _cats
      • _catOffsets

        public int[] _catOffsets
      • _useAllFactorLevels

        public boolean _useAllFactorLevels
      • _sparse

        public boolean _sparse
      • _featureMap

        public java.lang.String _featureMap
      • _calib_glm_beta

        protected double[] _calib_glm_beta
        GLM's beta used for calibrating output probabilities using Platt Scaling.
    • Constructor Detail

      • XGBoostMojoModel

        public XGBoostMojoModel(java.lang.String[] columns,                        java.lang.String[][] domains,                        java.lang.String responseColumn)
    • Method Detail

      • postReadInit

        public void postReadInit()
      • score0

        public final double[] score0(double[] row,                             double[] preds)
        Specified by:
        score0 in class hex.genmodel.GenModel
      • toPreds

        public static double[] toPreds(double[] in,                               float[] out,                               double[] preds,                               int nclasses,                               double[] priorClassDistrib,                               double defaultThreshold)
      • getCalibGlmBeta

        public double[] getCalibGlmBeta()
        Specified by:
        getCalibGlmBeta in interface hex.genmodel.algos.tree.PlattScalingMojoHelper.MojoModelWithCalibration
      • calibrateClassProbabilities

        public boolean calibrateClassProbabilities(double[] preds)
        Overrides:
        calibrateClassProbabilities in class hex.genmodel.GenModel
      • constructSubgraph

        protected void constructSubgraph(biz.k11i.xgboost.tree.RegTreeNode[] xgBoostNodes,                                 hex.genmodel.algos.tree.SharedTreeNode sharedTreeNode,                                 int nodeIndex,                                 hex.genmodel.algos.tree.SharedTreeSubgraph sharedTreeSubgraph,                                 boolean[] oneHotEncodedMap,                                 boolean inclusiveNA,                                 java.lang.String[] features)
      • markOneHotEncodedCategoricals

        protected boolean[] markOneHotEncodedCategoricals(java.lang.String[] featureMap)
      • convert

        public hex.genmodel.algos.tree.SharedTreeGraph convert(int treeNumber,                                                       java.lang.String treeClass,                                                       hex.genmodel.algos.tree.ConvertTreeOptions options)
        Specified by:
        convert in interface hex.genmodel.algos.tree.SharedTreeGraphConverter


NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14