cforest2sas: Export a random forest to SAS

Description Usage Arguments Details Examples

Description

Generate SAS DATA step code to predict the values of a random forest from the party package.

Usage

1
cforest2sas(fit, name = "prediction", drop = TRUE)

Arguments

fit

a random forest trained using cforest

name

the name of the variable in which to store the prediction

drop

whether to drop the variables for the individual trees

Details

Unordered factors are supported, while ordered factors and missing values are not supported.

cforest2sas averages the predictions of the trees like randomForest, while cforest averages observation weights.

Examples

1
2
3
4
5
require(party)
iris.ct <- cforest(Species ~ .,data = iris,
   controls = cforest_unbiased(ntree=5, mtry=2))
iris.sas <- cforest2sas(iris.ct)
cat(iris.sas, file="iris.sas")

az0/mlmeta documentation built on May 11, 2019, 4:15 p.m.