bayesTops: Train a BayesToPs model for regression.

Description Usage Arguments Value

Description

Train a BayesToPs model for regression.

Usage

1
2
3
4
5
6
7
bayesTops(x, y, initialPrior, normalise = TRUE,
  features2norm = names(x), normaliseY = TRUE, decay = 0.1,
  blrResVariance = 1, modelSelection = "Bayes factors",
  propagatePosterior = TRUE, weightsMethod = "mean",
  metric_createTree = "rmse", metric_finalWeights = "rmse",
  maxDepthTree = 10, maxSizeSlices = 500, maxSplitValueTested = 50,
  minSizeLeaf = 1, minNbObsV2 = 1, printProgress = TRUE)

Arguments

x

A DataFrame with n rows and p columns

y

A vector of length n with the labels

initialPrior

A list with an attribute mean (vector of length p) and an attribute variance (square matrix of dimension p). It's the initial prior to be used on the root of the tree.

normalise

a boolean, if TRUE (default) then the data is normalised beforehand.

features2norm

vector containing the columns to normalise. Ignored if normalise=FALSE.

normaliseY

a boolean, if TRUE (default), then the response variable is also normalised. Ignored if normalise=FALSE.

decay

a float between 0 and 1 fixing the decay parameter.

blrResVariance

a float representing the residual variance in the Bayesian Linear Model fitted at each node.

modelSelection

one of "Bayes factors" or "Validation", describe the model selection method used to divide the nodes.

propagatePosterior

a boolean, if TRUE (default), the posterior distribution is propagated to the child nodes, otherwise initialPrior is used as prior.

weightsMethod

one of "lm", "validation", "bayes", "leaf only" or "mean" (default). Decided how to find the final weight of the predictor in each leaf.

metric_createTree

one of "auc", "rmse" (default), "r2" or "mae". The metric used to evaluate the performance of the models when building the tree.

metric_finalWeights

one of "auc", "rmse" (default), "r2" or "mae". The metric used to evaluate the performance of the models when fitting the final weights.

maxDepthTree

int limiting the depth of the tree (default to 10).

maxSizeSlices

int limiting the maximum number of observations to consider when computing the joint marginal likelihood at a node (default to 500).

maxSplitValueTested

int limiting the number of split value to test at each node (default to 50).

minSizeLeaf

int fixing the minimum number of observations from the training set in a leaf (default to 1).

minNbObsV2

int, only if weightsMethod="validation".

printProgress

boolean, if TRUE (default), the progress of the tree will be displayed.

Value

A trained BayesToPs model


Llannelongue/BayesToPsR documentation built on May 30, 2019, 1:35 p.m.