xgboost-haskell-0.1.0.0: XGBoost library for Haskell.

Safe HaskellNone
LanguageHaskell2010

ML.DMLC.XGBoost.FFI

Synopsis

Documentation

c_xgDMatrixSetFloatInfo :: DMatrix -> StringPtr -> FloatArray -> Word64 -> IO Int32 Source #

c_xgDMatrixSetUIntInfo :: DMatrix -> StringPtr -> UIntArray -> Word64 -> IO Int32 Source #

c_xgDMatrixGetFloatInfo :: DMatrix -> StringPtr -> Ptr Word64 -> Ptr FloatArray -> IO Int32 Source #

c_xgDMatrixGetUIntInfo :: DMatrix -> StringPtr -> Ptr Word64 -> Ptr UIntArray -> IO Int32 Source #

c_xgBoosterSetParam :: Booster -> StringPtr -> StringPtr -> IO Int32 Source #

c_xgBoosterBoostOneIter :: Booster -> DMatrix -> FloatArray -> FloatArray -> Word64 -> IO Int32 Source #

c_xgBoosterEvalOneIter :: Booster -> Int32 -> DMatrixArray -> StringArray -> Word64 -> Ptr StringPtr -> IO Int32 Source #

c_xgBoosterDumpModel :: Booster -> StringArray -> Int32 -> Ptr Word64 -> Ptr StringArray -> IO Int32 Source #

c_xgBoosterGetAttr :: Booster -> StringPtr -> Ptr StringPtr -> Ptr Int32 -> IO Int32 Source #

c_xgBoosterSetAttr :: Booster -> StringPtr -> StringPtr -> IO Int32 Source #

data FloatInfoField Source #

In XGBoost, the float info is correctly restricted to DMatrix's meta information, namely label and weight.

Ref: https:github.comdmlcxgboostissues1026#issuecomment-199873890.

data UIntInfoField Source #

In XGBoost, the only uint field valid is "root_index".

Ref: https:github.comdmlcxgboostissues1787#issuecomment-261653748.

Constructors

RootIndexInfo 

xgbFromFile Source #

Arguments

:: String

file name

-> Bool

print messages during loading

-> IO DMatrix 

xgbFromMat Source #

Arguments

:: UArray Float

mat

-> Int

rows

-> Int

columns

-> Float

missing value

-> IO DMatrix 

xgbSetFloatInfo Source #

Arguments

:: DMatrix 
-> FloatInfoField

label field

-> UArray Float

info vector

-> IO () 

xgbGetFloatInfo Source #

Arguments

:: DMatrix 
-> FloatInfoField

label field

-> IO (UArray Float)

info vector

xgbSetUIntInfo Source #

Arguments

:: DMatrix 
-> UIntInfoField

label field

-> UArray Word32

info vector

-> IO () 

xgbGetUIntInfo Source #

Arguments

:: DMatrix 
-> UIntInfoField

label field

-> IO (UArray Word32)

info vector

setParam Source #

Arguments

:: Booster 
-> String

Name of parameter.

-> String

Value of parameter.

-> IO () 

updateOneIter Source #

Arguments

:: Booster 
-> Int32

Current iteration rounds

-> DMatrix

Training data

-> IO () 

boostOneIter Source #

Arguments

:: Booster 
-> DMatrix

Training data

-> UArray Float

Gradient statistics

-> UArray Float

Second order gradient statistics, should have the same length with gradient statistics array (but not checked)

-> IO () 

evalOneIter Source #

Arguments

:: Booster 
-> Int32

Current iteration rounds

-> [DMatrix]

Pointers to data to be evaluated

-> [String]

Names of each data, should have the same length with data array (but not checked)

-> IO String

The string containing evaluation statistics

loadModel Source #

Arguments

:: Booster 
-> String

File name

-> IO () 

saveModel Source #

Arguments

:: Booster 
-> String

File name

-> IO () 

loadModelFromBuffer Source #

Arguments

:: Booster 
-> ByteArray

Pointer to buffer

-> Int32 
-> IO () 

loadRabitCheckpoint Source #

Arguments

:: Booster 
-> IO Int32

Return output version of the model