Crate xgboost_sys[][src]

Structs

XGBoostBatchCSR

\brief Mini batch used in XGBoost Data Iteration

_G_fpos64_t
_G_fpos_t
_IO_FILE
_IO_FILE_plus
_IO_jump_t
_IO_marker
__fsid_t
__mbstate_t
__va_list_tag

Constants

BUFSIZ
EOF
FILENAME_MAX
FOPEN_MAX
INT16_MAX
INT16_MIN
INT32_MAX
INT32_MIN
INT8_MAX
INT8_MIN
INTPTR_MAX
INTPTR_MIN
INT_FAST16_MAX
INT_FAST16_MIN
INT_FAST32_MAX
INT_FAST32_MIN
INT_FAST8_MAX
INT_FAST8_MIN
INT_LEAST16_MAX
INT_LEAST16_MIN
INT_LEAST32_MAX
INT_LEAST32_MIN
INT_LEAST8_MAX
INT_LEAST8_MIN
L_ctermid
L_tmpnam
PTRDIFF_MAX
PTRDIFF_MIN
P_tmpdir
SEEK_CUR
SEEK_END
SEEK_SET
SIG_ATOMIC_MAX
SIG_ATOMIC_MIN
SIZE_MAX
TMP_MAX
UINT16_MAX
UINT32_MAX
UINT8_MAX
UINTPTR_MAX
UINT_FAST16_MAX
UINT_FAST32_MAX
UINT_FAST8_MAX
UINT_LEAST16_MAX
UINT_LEAST32_MAX
UINT_LEAST8_MAX
WINT_MAX
WINT_MIN
_ATFILE_SOURCE
_BITS_TYPESIZES_H
_BITS_TYPES_H
_BITS_WCHAR_H
_DEFAULT_SOURCE
_FEATURES_H
_G_BUFSIZ
_G_HAVE_MMAP
_G_HAVE_MREMAP
_G_IO_IO_FILE_VERSION
_G_config_h
_IOFBF
_IOLBF
_IONBF
_IOS_APPEND
_IOS_ATEND
_IOS_BIN
_IOS_INPUT
_IOS_NOCREATE
_IOS_NOREPLACE
_IOS_OUTPUT
_IOS_TRUNC
_IO_BAD_SEEN
_IO_BOOLALPHA
_IO_BUFSIZ
_IO_CURRENTLY_PUTTING
_IO_DEC
_IO_DELETE_DONT_CLOSE
_IO_DONT_CLOSE
_IO_EOF_SEEN
_IO_ERR_SEEN
_IO_FIXED
_IO_FLAGS2_MMAP
_IO_FLAGS2_NOTCANCEL
_IO_FLAGS2_USER_WBUF
_IO_HEX
_IO_INTERNAL
_IO_IN_BACKUP
_IO_IS_APPENDING
_IO_IS_FILEBUF
_IO_LEFT
_IO_LINE_BUF
_IO_LINKED
_IO_MAGIC
_IO_MAGIC_MASK
_IO_NO_READS
_IO_NO_WRITES
_IO_OCT
_IO_RIGHT
_IO_SCIENTIFIC
_IO_SHOWBASE
_IO_SHOWPOINT
_IO_SHOWPOS
_IO_SKIPWS
_IO_STDIO
_IO_TIED_PUT_GET
_IO_UNBUFFERED
_IO_UNIFIED_JUMPTABLES
_IO_UNITBUF
_IO_UPPERCASE
_IO_USER_BUF
_IO_USER_LOCK
_OLD_STDIO_MAGIC
_POSIX_C_SOURCE
_POSIX_SOURCE
_STDC_PREDEF_H
_STDINT_H
_STDIO_H
_SYS_CDEFS_H
__FD_SETSIZE
__FILE_defined
__GLIBC_MINOR__
__GLIBC__
__GNUC_VA_LIST
__GNU_LIBRARY__
__INO_T_MATCHES_INO64_T
__OFF_T_MATCHES_OFF64_T
__STDC_IEC_559_COMPLEX__
__STDC_IEC_559__
__STDC_ISO_10646__
__STDC_NO_THREADS__
__SYSCALL_WORDSIZE
__USE_ATFILE
__USE_FORTIFY_LEVEL
__USE_ISOC11
__USE_ISOC95
__USE_ISOC99
__USE_MISC
__USE_POSIX
__USE_POSIX2
__USE_POSIX199309
__USE_POSIX199506
__USE_POSIX_IMPLICITLY
__USE_XOPEN2K
__USE_XOPEN2K8
__WORDSIZE
__WORDSIZE_TIME64_COMPAT32
____FILE_defined
____mbstate_t_defined
__codecvt_result___codecvt_error
__codecvt_result___codecvt_noconv
__codecvt_result___codecvt_ok
__codecvt_result___codecvt_partial

Statics

_IO_2_1_stderr_
_IO_2_1_stdin_
_IO_2_1_stdout_
stderr
stdin
stdout
sys_errlist
sys_nerr

Functions

RabitAllreduce

\brief perform in-place allreduce, on sendrecvbuf this function is NOT thread-safe

RabitBroadcast

\brief broadcast an memory region to all others from root

RabitCheckPoint

\brief checkpoint the model, meaning we finished a stage of execution every time we call check point, there is a version number which will increase by one

RabitFinalize

\brief finalize the rabit engine, call this function after you finished all jobs.

RabitGetProcessorName

\brief get name of processor \param out_name hold output string \param out_len hold length of output string \param max_len maximum buffer length of input

RabitGetRank

\brief get rank of current process

RabitGetWorldSize

\brief get total number of process

RabitInit

\brief intialize the rabit module, call this once before using anything The additional arguments is not necessary. Usually rabit will detect settings from environment variables. \param argc number of arguments in argv \param argv the array of input arguments

RabitIsDistributed

\brief get rank of current process

RabitLinkTag

\brief a Dummy function, used to cause force link of C API into the DLL. \code // force link rabit C API library. static int must_link_rabit_ = RabitLinkTag(); \endcode \return a dummy integer.

RabitLoadCheckPoint

\brief load latest check point \param out_global_model hold output of serialized global_model \param out_global_len the output length of serialized global model \param out_local_model hold output of serialized local_model, can be NULL \param out_local_len the output length of serialized local model, can be NULL

RabitTrackerPrint

\brief print the msg to the tracker, this function can be used to communicate the information of the progress to the user who monitors the tracker \param msg the message to be printed

RabitVersionNumber

\return version number of current stored model, which means how many calls to CheckPoint we made so far

XGBGetLastError

\brief get string message of the last error

XGBRegisterLogCallback

\brief register callback function for LOG(INFO) messages -- helpful messages that are not errors. Note: this function can be called by multiple threads. The callback function will run on the thread that registered it \return 0 for success, -1 for failure

XGBoosterBoostOneIter

\brief update the model, by directly specify gradient and second order gradient, this can be used to replace UpdateOneIter, to support customized loss function \param handle handle \param dtrain training data \param grad gradient statistics \param hess second order gradient statistics \param len length of grad/hess array \return 0 when success, -1 when failure happens

XGBoosterCreate

\brief create xgboost learner \param dmats matrices that are set to be cached \param len length of dmats \param out handle to the result booster \return 0 when success, -1 when failure happens

XGBoosterDumpModel

\brief dump model, return array of strings representing model dump \param handle handle \param fmap name to fmap can be empty string \param with_stats whether to dump with statistics \param out_len length of output array \param out_dump_array pointer to hold representing dump of each model \return 0 when success, -1 when failure happens

XGBoosterDumpModelEx

\brief dump model, return array of strings representing model dump \param handle handle \param fmap name to fmap can be empty string \param with_stats whether to dump with statistics \param format the format to dump the model in \param out_len length of output array \param out_dump_array pointer to hold representing dump of each model \return 0 when success, -1 when failure happens

XGBoosterDumpModelExWithFeatures

\brief dump model, return array of strings representing model dump \param handle handle \param fnum number of features \param fname names of features \param ftype types of features \param with_stats whether to dump with statistics \param format the format to dump the model in \param out_len length of output array \param out_models pointer to hold representing dump of each model \return 0 when success, -1 when failure happens

XGBoosterDumpModelWithFeatures

\brief dump model, return array of strings representing model dump \param handle handle \param fnum number of features \param fname names of features \param ftype types of features \param with_stats whether to dump with statistics \param out_len length of output array \param out_models pointer to hold representing dump of each model \return 0 when success, -1 when failure happens

XGBoosterEvalOneIter

\brief get evaluation statistics for xgboost \param handle handle \param iter current iteration rounds \param dmats pointers to data to be evaluated \param evnames pointers to names of each data \param len length of dmats \param out_result the string containing evaluation statistics \return 0 when success, -1 when failure happens

XGBoosterFree

\brief free obj in handle \param handle handle to be freed \return 0 when success, -1 when failure happens

XGBoosterGetAttr

\brief Get string attribute from Booster. \param handle handle \param key The key of the attribute. \param out The result attribute, can be NULL if the attribute do not exist. \param success Whether the result is contained in out. \return 0 when success, -1 when failure happens

XGBoosterGetAttrNames

\brief Get the names of all attribute from Booster. \param handle handle \param out_len the argument to hold the output length \param out pointer to hold the output attribute stings \return 0 when success, -1 when failure happens

XGBoosterGetModelRaw

\brief save model into binary raw bytes, return header of the array user must copy the result out, before next xgboost call \param handle handle \param out_len the argument to hold the output length \param out_dptr the argument to hold the output data pointer \return 0 when success, -1 when failure happens

XGBoosterLoadModel

\brief load model from existing file \param handle handle \param fname file name \return 0 when success, -1 when failure happens

XGBoosterLoadModelFromBuffer

\brief load model from in memory buffer \param handle handle \param buf pointer to the buffer \param len the length of the buffer \return 0 when success, -1 when failure happens

XGBoosterLoadRabitCheckpoint

\brief Initialize the booster from rabit checkpoint. This is used in distributed training API. \param handle handle \param version The output version of the model. \return 0 when success, -1 when failure happens

XGBoosterPredict

\brief make prediction based on dmat \param handle handle \param dmat data matrix \param option_mask bit-mask of options taken in prediction, possible values 0:normal prediction 1:output margin instead of transformed value 2:output leaf index of trees instead of leaf value, note leaf index is unique per tree 4:output feature contributions to individual predictions \param ntree_limit limit number of trees used for prediction, this is only valid for boosted trees when the parameter is set to 0, we will use all the trees \param out_len used to store length of returning result \param out_result used to set a pointer to array \return 0 when success, -1 when failure happens

XGBoosterSaveModel

\brief save model into existing file \param handle handle \param fname file name \return 0 when success, -1 when failure happens

XGBoosterSaveRabitCheckpoint

\brief Save the current checkpoint to rabit. \param handle handle \return 0 when success, -1 when failure happens

XGBoosterSetAttr

\brief Set or delete string attribute.

XGBoosterSetParam

\brief set parameters \param handle handle \param name parameter name \param value value of parameter \return 0 when success, -1 when failure happens

XGBoosterUpdateOneIter

\brief update the model in one round using dtrain \param handle handle \param iter current iteration rounds \param dtrain training data \return 0 when success, -1 when failure happens

XGDMatrixCreateFromCSC

\deprecated \brief create a matrix content from CSC format \param col_ptr pointer to col headers \param indices findex \param data fvalue \param nindptr number of rows in the matrix + 1 \param nelem number of nonzero elements in the matrix \param out created dmatrix \return 0 when success, -1 when failure happens

XGDMatrixCreateFromCSCEx

\brief create a matrix content from CSC format \param col_ptr pointer to col headers \param indices findex \param data fvalue \param nindptr number of rows in the matrix + 1 \param nelem number of nonzero elements in the matrix \param num_row number of rows; when it's set to 0, then guess from data \param out created dmatrix \return 0 when success, -1 when failure happens

XGDMatrixCreateFromCSR

\deprecated \brief create a matrix content from CSR format \param indptr pointer to row headers \param indices findex \param data fvalue \param nindptr number of rows in the matrix + 1 \param nelem number of nonzero elements in the matrix \param out created dmatrix \return 0 when success, -1 when failure happens

XGDMatrixCreateFromCSREx

\brief create a matrix content from CSR format \param indptr pointer to row headers \param indices findex \param data fvalue \param nindptr number of rows in the matrix + 1 \param nelem number of nonzero elements in the matrix \param num_col number of columns; when it's set to 0, then guess from data \param out created dmatrix \return 0 when success, -1 when failure happens

XGDMatrixCreateFromDT

\brief create matrix content from python data table \param data pointer to pointer to column data \param feature_stypes pointer to strings \param nrow number of rows \param ncol number columns \param out created dmatrix \param nthread number of threads (up to maximum cores available, if <=0 use all cores) \return 0 when success, -1 when failure happens

XGDMatrixCreateFromDataIter

\brief Create a DMatrix from a data iterator. \param data_handle The handle to the data. \param callback The callback to get the data. \param cache_info Additional information about cache file, can be null. \param out The created DMatrix \return 0 when success, -1 when failure happens.

XGDMatrixCreateFromFile

\brief load a data matrix \param fname the name of the file \param silent whether print messages during loading \param out a loaded data matrix \return 0 when success, -1 when failure happens

XGDMatrixCreateFromMat

\brief create matrix content from dense matrix \param data pointer to the data space \param nrow number of rows \param ncol number columns \param missing which value to represent missing value \param out created dmatrix \return 0 when success, -1 when failure happens

XGDMatrixCreateFromMat_omp

\brief create matrix content from dense matrix \param data pointer to the data space \param nrow number of rows \param ncol number columns \param missing which value to represent missing value \param out created dmatrix \param nthread number of threads (up to maximum cores available, if <=0 use all cores) \return 0 when success, -1 when failure happens

XGDMatrixFree

\brief free space in data matrix \return 0 when success, -1 when failure happens

XGDMatrixGetFloatInfo

\brief get float info vector from matrix \param handle a instance of data matrix \param field field name \param out_len used to set result length \param out_dptr pointer to the result \return 0 when success, -1 when failure happens

XGDMatrixGetUIntInfo

\brief get uint32 info vector from matrix \param handle a instance of data matrix \param field field name \param out_len The length of the field. \param out_dptr pointer to the result \return 0 when success, -1 when failure happens

XGDMatrixNumCol

\brief get number of columns \param handle the handle to the DMatrix \param out The output of number of columns \return 0 when success, -1 when failure happens

XGDMatrixNumRow

\brief get number of rows. \param handle the handle to the DMatrix \param out The address to hold number of rows. \return 0 when success, -1 when failure happens

XGDMatrixSaveBinary

\brief load a data matrix into binary file \param handle a instance of data matrix \param fname file name \param silent print statistics when saving \return 0 when success, -1 when failure happens

XGDMatrixSetFloatInfo

\brief set float vector to a content in info \param handle a instance of data matrix \param field field name, can be label, weight \param array pointer to float vector \param len length of array \return 0 when success, -1 when failure happens

XGDMatrixSetGroup

\brief set label of the training matrix \param handle a instance of data matrix \param group pointer to group size \param len length of array \return 0 when success, -1 when failure happens

XGDMatrixSetUIntInfo

\brief set uint32 vector to a content in info \param handle a instance of data matrix \param field field name \param array pointer to unsigned int vector \param len length of array \return 0 when success, -1 when failure happens

XGDMatrixSliceDMatrix

\brief create a new dmatrix from sliced content of existing matrix \param handle instance of data matrix to be sliced \param idxset index set \param len length of index set \param out a sliced new matrix \return 0 when success, -1 when failure happens

_IO_feof
_IO_ferror
_IO_flockfile
_IO_free_backup_area
_IO_ftrylockfile
_IO_funlockfile
_IO_getc
_IO_padn
_IO_peekc_locked
_IO_putc
_IO_seekoff
_IO_seekpos
_IO_sgetn
_IO_vfprintf
_IO_vfscanf
__getdelim
__overflow
__uflow
__underflow
clearerr
clearerr_unlocked
ctermid
dprintf
fclose
fdopen
feof
feof_unlocked
ferror
ferror_unlocked
fflush
fflush_unlocked
fgetc
fgetc_unlocked
fgetpos
fgets
fileno
fileno_unlocked
flockfile
fmemopen
fopen
fprintf
fputc
fputc_unlocked
fputs
fread
fread_unlocked
freopen
fscanf
fscanf1
fseek
fseeko
fsetpos
ftell
ftello
ftrylockfile
funlockfile
fwrite
fwrite_unlocked
getc
getc_unlocked
getchar
getchar_unlocked
getdelim
getline
getw
open_memstream
pclose
perror
popen
printf
putc
putc_unlocked
putchar
putchar_unlocked
puts
putw
remove
rename
renameat
rewind
scanf
scanf1
setbuf
setbuffer
setlinebuf
setvbuf
snprintf
sprintf
sscanf
sscanf1
tempnam
tmpfile
tmpnam
tmpnam_r
ungetc
vdprintf
vfprintf
vfscanf
vfscanf1
vprintf
vscanf
vscanf1
vsnprintf
vsprintf
vsscanf
vsscanf1

Type Definitions

BoosterHandle

\brief handle to Booster

DMatrixHandle

\brief handle to DMatrix

DataHolderHandle

\brief handle to a internal data holder.

DataIterHandle

\brief handle to a data iterator

FILE
XGBCallbackDataIterNext

\brief The data reading callback function. The iterator will be able to give subset of batch in the data.

XGBCallbackSetData

\brief Callback to set the data to handle, \param handle The handle to the callback. \param batch The data content to be set.

_IO_lock_t
__FILE
__blkcnt64_t
__blkcnt_t
__blksize_t
__builtin_va_list
__caddr_t
__clock_t
__clockid_t
__codecvt_result
__daddr_t
__dev_t
__fsblkcnt64_t
__fsblkcnt_t
__fsfilcnt64_t
__fsfilcnt_t
__fsword_t
__gid_t
__gnuc_va_list
__id_t
__ino64_t
__ino_t
__int16_t
__int32_t
__int64_t
__int8_t
__intptr_t
__io_close_fn
__io_read_fn
__io_seek_fn
__io_write_fn
__key_t
__loff_t
__mode_t
__nlink_t
__off64_t
__off_t
__pid_t
__qaddr_t
__quad_t
__rlim64_t
__rlim_t
__socklen_t
__ssize_t
__suseconds_t
__syscall_slong_t
__syscall_ulong_t
__time_t
__timer_t
__u_char
__u_int
__u_long
__u_quad_t
__u_short
__uid_t
__uint16_t
__uint32_t
__uint64_t
__uint8_t
__useconds_t
bst_ulong
fpos_t
int_fast16_t
int_fast32_t
int_fast64_t
int_fast8_t
int_least16_t
int_least32_t
int_least64_t
int_least8_t
intmax_t
off_t
rbt_ulong

\brief rabit unsigned long type

uint_fast16_t
uint_fast32_t
uint_fast64_t
uint_fast8_t
uint_least16_t
uint_least32_t
uint_least64_t
uint_least8_t
uintmax_t
va_list

Unions

__mbstate_t__bindgen_ty_1