Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype DMatrix = DMatrix (Ptr ())
- type DMatrixArray = Ptr DMatrix
- newtype Booster = Booster (Ptr ())
- newtype DataIter = DataIter (Ptr ())
- newtype DataHolder = DataHolder (Ptr ())
- newtype XGBoostBatchCSR = XGBoostBatchCSR (Ptr ())
- type XGBCallbackSetData = Ptr ()
- type XGBCallbackDataIterNext = Ptr ()
- c_xgbGetLastError :: IO StringPtr
- c_xgDMatrixCreateFromFile :: StringPtr -> Int32 -> Ptr DMatrix -> IO Int32
- c_xgDMatrixCreateFromDataIter :: DataIter -> XGBCallbackDataIterNext -> StringPtr -> Ptr DMatrix -> IO Int32
- c_xgDMatrixCreateFromMat :: FloatArray -> Word64 -> Word64 -> CFloat -> Ptr DMatrix -> IO Int32
- c_xgDMatrixFree :: DMatrix -> IO Int32
- c_xgDMatrixSaveBinary :: DMatrix -> StringPtr -> Int32 -> IO Int32
- c_xgDMatrixSetFloatInfo :: DMatrix -> StringPtr -> FloatArray -> Word64 -> IO Int32
- c_xgDMatrixSetUIntInfo :: DMatrix -> StringPtr -> UIntArray -> Word64 -> IO Int32
- c_xgDMatrixGetFloatInfo :: DMatrix -> StringPtr -> Ptr Word64 -> Ptr FloatArray -> IO Int32
- c_xgDMatrixGetUIntInfo :: DMatrix -> StringPtr -> Ptr Word64 -> Ptr UIntArray -> IO Int32
- c_xgDMatrixNumRow :: DMatrix -> Ptr Word64 -> IO Int32
- c_xgDMatrixNumCol :: DMatrix -> Ptr Word64 -> IO Int32
- c_xgBoosterCreate :: DMatrixArray -> Word64 -> Ptr Booster -> IO Int32
- c_xgBoosterFree :: Booster -> IO Int32
- c_xgBoosterSetParam :: Booster -> StringPtr -> StringPtr -> IO Int32
- c_xgBoosterUpdateOneIter :: Booster -> Int32 -> DMatrix -> IO Int32
- c_xgBoosterBoostOneIter :: Booster -> DMatrix -> FloatArray -> FloatArray -> Word64 -> IO Int32
- c_xgBoosterEvalOneIter :: Booster -> Int32 -> DMatrixArray -> StringArray -> Word64 -> Ptr StringPtr -> IO Int32
- c_xgBoosterPredict :: Booster -> DMatrix -> Int32 -> Int32 -> Ptr Word64 -> Ptr FloatArray -> IO Int32
- c_xgBoosterLoadModel :: Booster -> StringPtr -> IO Int32
- c_xgBoosterSaveModel :: Booster -> StringPtr -> IO Int32
- c_xgBoosterLoadModelFromBuffer :: Booster -> ByteArray -> Word64 -> IO Int32
- c_xgBoosterGetModelRaw :: Booster -> Ptr Word64 -> Ptr ByteArray -> IO Int32
- c_xgBoosterDumpModel :: Booster -> StringArray -> Int32 -> Ptr Word64 -> Ptr StringArray -> IO Int32
- c_xgBoosterGetAttr :: Booster -> StringPtr -> Ptr StringPtr -> Ptr Int32 -> IO Int32
- c_xgBoosterSetAttr :: Booster -> StringPtr -> StringPtr -> IO Int32
- c_xgBoosterGetAttrNames :: Booster -> Ptr Word64 -> Ptr StringArray -> IO Int32
- c_xgBoosterLoadRabitCheckpoint :: Booster -> Ptr Int32 -> IO Int32
- c_xgBoosterSaveRabitCheckpoint :: Booster -> IO Int32
- data FloatInfoField
- data UIntInfoField = RootIndexInfo
- data PredictMask
- guard_ffi :: IO Int32 -> IO ()
- xgbGetLastError :: IO String
- xgbFromFile :: String -> Bool -> IO DMatrix
- xgbFromDataIter :: DataIter -> XGBCallbackDataIterNext -> String -> IO DMatrix
- xgbFromMat :: UArray Float -> Int -> Int -> Float -> IO DMatrix
- dmatrixFree :: DMatrix -> IO ()
- xgbSetFloatInfo :: DMatrix -> FloatInfoField -> UArray Float -> IO ()
- xgbGetFloatInfo :: DMatrix -> FloatInfoField -> IO (UArray Float)
- xgbGetLabel :: DMatrix -> IO (UArray Float)
- xgbGetWeight :: DMatrix -> IO (UArray Float)
- xgbGetBaseMargin :: DMatrix -> IO (UArray Float)
- xgbSetLabel :: DMatrix -> UArray Float -> IO ()
- xgbSetWeight :: DMatrix -> UArray Float -> IO ()
- xgbSetBaseMargin :: DMatrix -> UArray Float -> IO ()
- xgbSetUIntInfo :: DMatrix -> UIntInfoField -> UArray Word32 -> IO ()
- xgbGetUIntInfo :: DMatrix -> UIntInfoField -> IO (UArray Word32)
- xgbMatRow :: DMatrix -> IO Integer
- xgbMatCol :: DMatrix -> IO Integer
- xgbBooster :: [DMatrix] -> IO Booster
- boosterFree :: Booster -> IO ()
- setParam :: Booster -> String -> String -> IO ()
- updateOneIter :: Booster -> Int32 -> DMatrix -> IO ()
- boostOneIter :: Booster -> DMatrix -> UArray Float -> UArray Float -> IO ()
- evalOneIter :: Booster -> Int32 -> [DMatrix] -> [String] -> IO String
- boosterPredict :: Booster -> DMatrix -> [PredictMask] -> Int32 -> IO (UArray Float)
- loadModel :: Booster -> String -> IO ()
- saveModel :: Booster -> String -> IO ()
- loadModelFromBuffer :: Booster -> ByteArray -> Int32 -> IO ()
- getBoosterAttr :: Booster -> String -> IO String
- setBoosterAttr :: Booster -> String -> String -> IO ()
- getAttrNames :: Booster -> IO [String]
- loadRabitCheckpoint :: Booster -> IO Int32
- saveRabitCheckpoint :: Booster -> IO ()
Documentation
type DMatrixArray = Ptr DMatrix Source #
newtype DataHolder Source #
DataHolder (Ptr ()) |
newtype XGBoostBatchCSR Source #
XGBoostBatchCSR (Ptr ()) |
type XGBCallbackSetData = Ptr () Source #
type XGBCallbackDataIterNext = Ptr () Source #
c_xgbGetLastError :: IO StringPtr Source #
c_xgDMatrixCreateFromDataIter :: DataIter -> XGBCallbackDataIterNext -> StringPtr -> Ptr DMatrix -> IO Int32 Source #
c_xgDMatrixCreateFromMat :: FloatArray -> Word64 -> Word64 -> CFloat -> Ptr DMatrix -> IO Int32 Source #
c_xgDMatrixGetFloatInfo :: DMatrix -> StringPtr -> Ptr Word64 -> Ptr FloatArray -> IO Int32 Source #
c_xgBoosterCreate :: DMatrixArray -> Word64 -> Ptr Booster -> 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_xgBoosterPredict :: Booster -> DMatrix -> Int32 -> Int32 -> Ptr Word64 -> Ptr FloatArray -> IO Int32 Source #
c_xgBoosterDumpModel :: Booster -> StringArray -> Int32 -> Ptr Word64 -> Ptr StringArray -> 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.
data PredictMask Source #
xgbFromDataIter :: DataIter -> XGBCallbackDataIterNext -> String -> IO DMatrix Source #
dmatrixFree :: DMatrix -> IO () Source #
:: DMatrix | |
-> FloatInfoField | label field |
-> UArray Float | info vector |
-> IO () |
:: DMatrix | |
-> FloatInfoField | label field |
-> IO (UArray Float) | info vector |
:: DMatrix | |
-> UIntInfoField | label field |
-> UArray Word32 | info vector |
-> IO () |
:: DMatrix | |
-> UIntInfoField | label field |
-> IO (UArray Word32) | info vector |
boosterFree :: Booster -> IO () Source #
boosterPredict :: Booster -> DMatrix -> [PredictMask] -> Int32 -> IO (UArray Float) Source #
saveRabitCheckpoint :: Booster -> IO () Source #