50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

FFTrees (version 1.1.8)

predict.FFTrees: Applies an existing FFTrees object to a new (test) data set

Description

Applies an existing FFTrees object to a new (test) data set

Usage

"predict"(object = NULL, data.test = NULL, ...)

Arguments

object
(M) An FFTrees object created from the FFTrees() function.
data.test
(M) A dataframe of test data
...
Additional arguments passed on to predict()

Value

An FFTrees object

Examples

Run this code


  # Create an FFTrees object from 200 cases from thethe breastcancer dataset

  breastcancer.fft <- FFTrees(formula = diagnosis ~.,
                              data = breastcancer[1:300,])

  # Currently the object only contains training data
  breastcancer.fft

  # Now add the rest of the dataset as test data using predict
  #
  breastcancer.fft <- predict(breastcancer.fft,
  data.test = breastcancer[301:nrow(breastcancer),])

  # Now the new data are stored as test data
  breastcancer.fft



Run the code above in your browser using DataLab