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

hex.tree.gbm.GBMModel Maven / Gradle / Ivy

There is a newer version: 3.46.0.6
Show newest version
package hex.tree.gbm;

import hex.VarImp;
import hex.genmodel.GenModel;
import hex.tree.SharedTreeModel;
import water.Key;
import water.fvec.Chunk;
import water.util.SB;

public class GBMModel extends SharedTreeModel {

  public static class GBMParameters extends SharedTreeModel.SharedTreeParameters {
    /** Distribution functions.  Note: AUTO will select gaussian for
     *  continuous, and multinomial for categorical response
     *
     *  

TODO: Replace with drop-down that displays different distributions * depending on cont/cat response */ public enum Family { AUTO, bernoulli, multinomial, gaussian } public Family _distribution = Family.AUTO; public float _learn_rate=0.1f; // Learning rate from 0.0 to 1.0 } public static class GBMOutput extends SharedTreeModel.SharedTreeOutput { public GBMOutput( GBM b, double mse_train, double mse_valid ) { super(b,mse_train,mse_valid); } } public GBMModel(Key selfKey, GBMParameters parms, GBMOutput output ) { super(selfKey,parms,output); } /** Bulk scoring API for one row. Chunks are all compatible with the model, * and expect the last Chunks are for the final distribution and prediction. * Default method is to just load the data into the tmp array, then call * subclass scoring logic. */ @Override public double[] score0( Chunk chks[], int row_in_chunk, double[] tmp, double[] preds ) { assert chks.length>=tmp.length; for( int i=0; i





© 2015 - 2025 Weber Informatics LLC | Privacy Policy