fix NAMESPACE

This commit is contained in:
hetong 2014-08-28 08:16:45 -07:00
parent 73419f6cd7
commit d95bc458e3
10 changed files with 18 additions and 0 deletions

View File

@ -1,2 +1,11 @@
# Generated by roxygen2 (4.0.1): do not edit by hand
export(getinfo)
export(xgb.DMatrix)
export(xgb.DMatrix.save)
export(xgb.dump)
export(xgb.load)
export(xgb.save)
export(xgb.train)
export(xgboost)
exportMethods(predict)

View File

@ -12,6 +12,7 @@ setClass('xgb.DMatrix')
#' iris[,5] <- as.numeric(iris[,5])
#' dtrain <- xgb.DMatrix(as.matrix(iris[,1:4]), label=iris[,5])
#' labels <- getinfo(dtest, "label")
#' @export
#'
getinfo <- function(object, ...){
UseMethod("getinfo")

View File

@ -16,6 +16,7 @@ setClass("xgb.Booster")
#' data(iris)
#' bst <- xgboost(as.matrix(iris[,1:4]),as.numeric(iris[,5]), nrounds = 2)
#' pred <- predict(bst, as.matrix(iris[,1:4]))
#' @export
#'
setMethod("predict", signature = "xgb.Booster",
definition = function(object, newdata, outputmargin = FALSE) {

View File

@ -16,6 +16,7 @@
#' dtrain <- xgb.DMatrix(as.matrix(iris[,1:4]), label=iris[,5])
#' xgb.DMatrix.save(dtrain, 'iris.xgb.DMatrix')
#' dtrain <- xgb.DMatrix('iris.xgb.DMatrix')
#' @export
#'
xgb.DMatrix <- function(data, info = list(), missing = 0, ...) {
if (typeof(data) == "character") {

View File

@ -11,6 +11,7 @@
#' dtrain <- xgb.DMatrix(as.matrix(iris[,1:4]), label=iris[,5])
#' xgb.DMatrix.save(dtrain, 'iris.xgb.DMatrix')
#' dtrain <- xgb.DMatrix('iris.xgb.DMatrix')
#' @export
#'
xgb.DMatrix.save <- function(DMatrix, fname) {
if (typeof(fname) != "character") {

View File

@ -12,6 +12,7 @@
#' data(iris)
#' bst <- xgboost(as.matrix(iris[,1:4]),as.numeric(iris[,5]), nrounds = 2)
#' xgb.dump(bst, 'iris.xgb.model.dump')
#' @export
#'
xgb.dump <- function(model, fname, fmap = "") {
if (class(model) != "xgb.Booster") {

View File

@ -10,6 +10,7 @@
#' xgb.save(bst, 'iris.xgb.model')
#' bst <- xgb.load('iris.xgb.model')
#' pred <- predict(bst, as.matrix(iris[,1:4]))
#' @export
#'
xgb.load <- function(modelfile) {
if (is.null(modelfile))

View File

@ -11,6 +11,7 @@
#' xgb.save(bst, 'iris.xgb.model')
#' bst <- xgb.load('iris.xgb.model')
#' pred <- predict(bst, as.matrix(iris[,1:4]))
#' @export
#'
xgb.save <- function(model, fname) {
if (typeof(fname) != "character") {

View File

@ -57,6 +57,7 @@
#' return(list(metric = "error", value = err))
#' }
#' bst <- xgb.train(param, dtrain, nround = 2, watchlist, logregobj, evalerror)
#' @export
#'
xgb.train <- function(params=list(), dtrain, nrounds, watchlist = list(),
obj = NULL, feval = NULL, ...) {

View File

@ -32,6 +32,7 @@
#' data(iris)
#' bst <- xgboost(as.matrix(iris[,1:4]),as.numeric(iris[,5]), nrounds = 2)
#' pred <- predict(bst, as.matrix(iris[,1:4]))
#' @export
#'
xgboost <- function(data = NULL, label = NULL, params = list(), nrounds,
verbose = 1, ...) {