Learn R Programming

DSWE (version 1.6.1)

BayesTreePCFit: Tree based power curve estimate

Description

Tree based power curve estimate

Usage

BayesTreePCFit(trainX, trainY, testX, nTree = 50)

Value

a vector or numeric predictions on user provided test data

Arguments

trainX

a matrix or dataframe to be used in modelling

trainY

a numeric or vector as a target

testX

a matrix or dataframe, to be used in computing the predictions

nTree

a numeric value specifying number of trees to be constructed in model

Examples

Run this code

data = data1
trainX = as.matrix(data[c(1:100),2])
trainY = data[c(1:100),7]
testX = as.matrix(data[c(100:110),2])

Bart_prediction = BayesTreePCFit(trainX, trainY, testX)

Run the code above in your browser using DataLab