22 lines
490 B
R
22 lines
490 B
R
% Generated by roxygen2 (4.0.1): do not edit by hand
|
|
\name{xgb.load}
|
|
\alias{xgb.load}
|
|
\title{Load xgboost model from binary file}
|
|
\usage{
|
|
xgb.load(modelfile)
|
|
}
|
|
\arguments{
|
|
\item{modelfile}{the name of the binary file.}
|
|
}
|
|
\description{
|
|
Load xgboost model from the binary model file
|
|
}
|
|
\examples{
|
|
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]))
|
|
}
|
|
|