predict.uforest: Predict method for uforest fits.

View source: R/uforest.R

predict.uforestR Documentation

Predict method for uforest fits.

Description

Obtains predictions from a fitted uforest object.

Usage

## S3 method for class 'uforest'
predict(object, newdata, ntrees = NULL, type = "uplift",
  agg.fun = "mean", ...)

Arguments

object

A fitted object inheriting from uforest.

newdata

A data frame to predict on.

ntrees

Number of trees used in prediction. All fitted trees are used by default.

type

The type of predictions required. Only uplift predictions are allowed.

agg.fun

The function used to combine the predictions from the individual trees. Must be functions that operate on a vector and produce a single value, as "mean" and "median" do. It may be a user-defined function.

...

Additional arguments passed to agg.fun.

Value

A numeric vector of predictions.

Author(s)

Leo Guelman leo.guelman@gmail.com

See Also

uforest.


leoguelman/uplift2 documentation built on April 15, 2022, 4:34 a.m.