setRandomForestQuantileRegressor: Create setting for RandomForestQuantileRegressor with python...

Description Usage Arguments Details Examples

View source: R/RandomForestQuantileRegressor.R

Description

Create setting for RandomForestQuantileRegressor with python scikit-garden (skgarden.quantile.RandomForestQuantileRegressor) #' @description This creates a setting for fitting a RandomForestQuantileRegressor model. You need skgarden python install. To install this open your command line and type: conda install -c conda-forge scikit-garden

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
setRandomForestQuantileRegressor(
  nEstimators = c(100),
  criterion = "mse",
  maxFeatures = -1,
  maxDepth = 4,
  minSamplesSplit = 2,
  minSamplesLeaf = 1,
  minWeightFractionLeaf = 0,
  maxLeafNodes = NULL,
  bootstrap = TRUE,
  oobScore = FALSE,
  warmStart = FALSE,
  seed = NULL,
  quiet = F
)

Arguments

nEstimators

(int default:100) The number of trees in the forest.

criterion

(string default="mse")) The function to measure the quality of a split. Supported criteria are "mse" for the mean squared error, which is equal to variance reduction as feature selection criterion, and "mae" for the mean absolute error.

maxFeatures

(int default: -1) The number of features to consider when looking for the best split. If -1 then use sqrt of total number of features.

maxDepth

(int default:4) The maximum depth of the tree. If None, then nodes are expanded until all leaves are pure or until all leaves contain less than minSamplesSplit samples.

minSamplesSplit

An integer specifying min samples per tree split (complexity)

minSamplesLeaf

An integer specifying min samples per leaf (complexity)

minWeightFractionLeaf

Lookup

maxLeafNodes

(int) Grow trees with maxLeafNodes in best-first fashion. Best nodes are defined as relative reduction in impurity. If None then unlimited number of leaf nodes.

bootstrap

(boolean default:TRUE) Whether bootstrap samples are used when building trees.

oobScore

(boolean default:FALSE) Whether to use out-of-bag samples to estimate the R^2 on unseen data.

warmStart

(boolean default:FALSE) When set to True, reuse the solution of the previous call to fit and add more estimators to the ensemble, otherwise, just fit a whole new forest.

seed

will add

quiet

will add

Details

Pick the hyper-parameters you want to do a grid search for

Examples

1
2
3
4
5
## Not run: 
rfQR <- setRandomForestQuantileRegressor(nEstimators =c(10,50,100),
 maxDepth=c(4,10,17), seed = 2)

## End(Not run)

hxia/plp-git-demo documentation built on March 19, 2021, 1:54 a.m.