XgbPCFit | R Documentation |
xgboost based power curve modelling
XgbPCFit(
trainX,
trainY,
testX,
max.depth = 8,
eta = 0.25,
nthread = 2,
nrounds = 5
)
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 |
max.depth |
maximum depth of a tree |
eta |
learning rate |
nthread |
This parameter specifies the number of CPU threads that XGBoost |
nrounds |
number of boosting rounds or trees to build |
a vector or numeric predictions on user provided test data
Chen, T., & Guestrin, C. (2016). "XGBoost: A Scalable Tree Boosting System." Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 785-794. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1145/2939672.2939785")}.
data = data1
trainX = as.matrix(data[c(1:100),2])
trainY = data[c(1:100),7]
testX = as.matrix(data[c(101:110),2])
Xgb_prediction = XgbPCFit(trainX, trainY, testX)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.