xgboost (version 0.3-0)

xgb.load: Load xgboost model from binary file

Description

Load xgboost model from the binary model file

Usage

xgb.load(modelfile)

Arguments

modelfile
the name of the binary file.

Examples

Run this code
data(iris)
bst <- xgboost(as.matrix(iris[,1:4]),as.numeric(iris[,5]), nrounds = 2)
xgb.save(bst, 'iris.xgb.model')
bst <- xgb.load('iris.xgb.model')
pred <- predict(bst, as.matrix(iris[,1:4]))

Run the code above in your browser using DataLab