c# kaggle higgs demo drafted
This commit is contained in:
parent
2587da5fea
commit
b208338098
@ -11,15 +11,33 @@ namespace xgboost_sharp_wrapper
|
|||||||
|
|
||||||
public class xgboost
|
public class xgboost
|
||||||
{
|
{
|
||||||
private const string dll_path="..\\x64\\Release\\";
|
private const string dll_path = "..\\x64\\Release\\";
|
||||||
|
|
||||||
[DllImport(dll_path+"xgboost_wrapper.dll", CallingConvention=CallingConvention.Cdecl)]
|
[DllImport(dll_path + "xgboost_wrapper.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern IntPtr XGDMatrixCreateFromFile(string fname, int silent);
|
public static extern IntPtr XGDMatrixCreateFromFile(string fname, int silent);
|
||||||
public IntPtr SharpXGDMatrixCreateFromFile(string fname, int silent)
|
public IntPtr SharpXGDMatrixCreateFromFile(string fname, int silent)
|
||||||
{
|
{
|
||||||
return XGDMatrixCreateFromFile(fname, silent);
|
return XGDMatrixCreateFromFile(fname, silent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \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
|
||||||
|
*/
|
||||||
|
[DllImport(dll_path + "xgboost_wrapper.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void XGDMatrixSetFloatInfo(IntPtr handle, string field, IntPtr array, System.UInt32 len);
|
||||||
|
|
||||||
|
[DllImport(dll_path + "xgboost_wrapper.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void XGBoosterSetParam(IntPtr handle, string name, string value);
|
||||||
|
public void SharpXGBoosterSetParam(IntPtr handle, string name, string value)
|
||||||
|
{
|
||||||
|
XGBoosterSetParam(handle,name,value);
|
||||||
|
}
|
||||||
|
|
||||||
[DllImport(dll_path + "xgboost_wrapper.dll")]
|
[DllImport(dll_path + "xgboost_wrapper.dll")]
|
||||||
public static extern IntPtr XGBoosterCreate(IntPtr[] dmats, System.UInt32 len);
|
public static extern IntPtr XGBoosterCreate(IntPtr[] dmats, System.UInt32 len);
|
||||||
public IntPtr SharpXGBoosterCreate(IntPtr[] dmats, System.UInt32 len)
|
public IntPtr SharpXGBoosterCreate(IntPtr[] dmats, System.UInt32 len)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user