Fit a decision forest classification model.


dfm = decForestCFit( y_train, x_train );
dfm = decForestCFit( y_train, x_train, dfc );


Nx1 vector, or NxK matrix of dependent variables.
NxP matrix of independent variables.
An instance of a dfControl structure containing the following members:
  dfc.numTrees Scalar, number of trees (must be an integer). Default = 100.
  dfc.obsPerTree Scalar, observations per a tree. Default = 1.0.
  dfc.featurePerNode Scalar, number of features considered at a node. Default = nvars/3.
  dfc.maxTreeDepth Scalar, maximum tree depth. Default = unlimited.
  dfc.minObsNode Scalar, minimum observations per node. Default = 1.
  dfc.impurityThreshold Scalar, impurity threshold. Default = 0.
  dfc.oobError Scalar, 1 to compute OOB error, 0 otherwise. Default = 0.
  dfc.variableImpurityMethod Scalar, method of calculating variable importance.
0 = none.
1 = mean decrease in impurity.
2 = mean decrease in accuracy (MDA).
3 = scaled MDA.
Default = 0.
  dfm.varNames p x 1 String array, containing the names of the model predictors.


An instance of a dfModel structure containing the following relevant members:
  dfm.variableImportance Matrix, 1 x p, variable importance measure if computation of variable importance is specified, zero otherwise.
  dfm.oobError Scalar, out-of-bag error if OOB error computation is specified, zero otherwise.
  dfm.numClasses Scalar, number of classes if classification model, zero otherwise.
  dfm.varNames p x 1 String array, containing the names of the model predictors.


The dfModel structure contains a fourth, internally used member, opaqueModel, which contains model details used by decForestPredict.

See also

decForestPredict, decForestRFit

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 30 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy