important change to regrank interface, need some more test
This commit is contained in:
@@ -7,37 +7,51 @@
|
||||
* use c style interface
|
||||
*/
|
||||
#include "../booster/xgboost_data.h"
|
||||
/*! \brief type of row entry */
|
||||
typedef xgboost::booster::FMatrixS::REntry XGEntry;
|
||||
|
||||
/*!
|
||||
* \brief create a data matrix
|
||||
* \return a new data matrix
|
||||
*/
|
||||
void* XGDMatrixCreate(void);
|
||||
/*!
|
||||
* \brief free space in data matrix
|
||||
*/
|
||||
void XGDMatrixFree(void *handle);
|
||||
/*!
|
||||
* \brief load a data matrix from text file or buffer(if exists)
|
||||
* \param handle a instance of data matrix
|
||||
* \param fname file name
|
||||
*/
|
||||
void XGDMatrixLoad(void *handle, const char *fname);
|
||||
/*!
|
||||
* \brief load a data matrix into binary file
|
||||
* \param handle a instance of data matrix
|
||||
* \param fname file name
|
||||
*/
|
||||
void XGDMatrixSaveBinary( void *handle, const char *fname );
|
||||
/*!
|
||||
* \brief add row
|
||||
* \param handle a instance of data matrix
|
||||
* \param fname file name
|
||||
* \return a new data matrix
|
||||
*/
|
||||
//void XGDMatrixPush( void *handle, const std::pair<int,> );
|
||||
extern "C"{
|
||||
/*! \brief type of row entry */
|
||||
typedef xgboost::booster::FMatrixS::REntry XGEntry;
|
||||
|
||||
/*!
|
||||
* \brief create a data matrix
|
||||
* \return a new data matrix
|
||||
*/
|
||||
void* XGDMatrixCreate(void);
|
||||
/*!
|
||||
* \brief free space in data matrix
|
||||
*/
|
||||
void XGDMatrixFree(void *handle);
|
||||
/*!
|
||||
* \brief load a data matrix from text file or buffer(if exists)
|
||||
* \param handle a instance of data matrix
|
||||
* \param fname file name
|
||||
* \param silent print statistics when loading
|
||||
*/
|
||||
void XGDMatrixLoad(void *handle, const char *fname, int silent);
|
||||
/*!
|
||||
* \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
|
||||
*/
|
||||
void XGDMatrixSaveBinary(void *handle, const char *fname, int silent);
|
||||
/*!
|
||||
* \brief add row
|
||||
* \param handle a instance of data matrix
|
||||
* \param fname file name
|
||||
* \return a new data matrix
|
||||
*/
|
||||
void XGDMatrixPush(void *handle, const XGEntry *data, int len);
|
||||
|
||||
/*!
|
||||
* \brief create a booster
|
||||
*/
|
||||
void* XGBoostCreate(void);
|
||||
|
||||
/*!
|
||||
* \brief create a booster
|
||||
*/
|
||||
void* XGBoost(void);
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user