Medial Code Documentation
|
Data Structures | |
class | _InnerPredictor |
class | _TempFile |
class | Booster |
class | Dataset |
class | LightGBMError |
Functions | |
_load_lib () | |
_safe_call (ret) | |
is_numeric (obj) | |
is_numpy_1d_array (data) | |
is_1d_list (data) | |
list_to_1d_numpy (data, dtype=np.float32, name='list') | |
cfloat32_array_to_numpy (cptr, length) | |
cfloat64_array_to_numpy (cptr, length) | |
cint32_array_to_numpy (cptr, length) | |
c_str (string) | |
c_array (ctype, values) | |
param_dict_to_str (data) | |
convert_from_sliced_object (data) | |
c_float_array (data) | |
c_int_array (data) | |
_data_from_pandas (data, feature_name, categorical_feature, pandas_categorical) | |
_label_from_pandas (label) | |
_dump_pandas_categorical (pandas_categorical, file_name=None) | |
_load_pandas_categorical (file_name=None, model_str=None) | |
Variables | |
_LIB = _load_lib() | |
tuple | MAX_INT32 = (1 << 31) - 1 |
int | C_API_DTYPE_FLOAT32 = 0 |
int | C_API_DTYPE_FLOAT64 = 1 |
int | C_API_DTYPE_INT32 = 2 |
int | C_API_DTYPE_INT64 = 3 |
int | C_API_IS_ROW_MAJOR = 1 |
int | C_API_PREDICT_NORMAL = 0 |
int | C_API_PREDICT_RAW_SCORE = 1 |
int | C_API_PREDICT_LEAF_INDEX = 2 |
int | C_API_PREDICT_CONTRIB = 3 |
dict | FIELD_TYPE_MAPPER |
dict | PANDAS_DTYPE_MAPPER |
Wrapper for C API of LightGBM.
|
protected |
Load LightGBM library.
|
protected |
Check the return value from C API call. Parameters ---------- ret : int The return value from C API calls.
lightgbm.basic.c_array | ( | ctype, | |
values | |||
) |
Convert a Python array to C array.
lightgbm.basic.c_float_array | ( | data | ) |
Get pointer of float numpy array / list.
lightgbm.basic.c_int_array | ( | data | ) |
Get pointer of int numpy array / list.
lightgbm.basic.c_str | ( | string | ) |
Convert a Python string to C string.
lightgbm.basic.cfloat32_array_to_numpy | ( | cptr, | |
length | |||
) |
Convert a ctypes float pointer array to a numpy array.
lightgbm.basic.cfloat64_array_to_numpy | ( | cptr, | |
length | |||
) |
Convert a ctypes double pointer array to a numpy array.
lightgbm.basic.cint32_array_to_numpy | ( | cptr, | |
length | |||
) |
Convert a ctypes int pointer array to a numpy array.
lightgbm.basic.convert_from_sliced_object | ( | data | ) |
Fix the memory of multi-dimensional sliced object.
lightgbm.basic.is_1d_list | ( | data | ) |
Check whether data is a 1-D list.
lightgbm.basic.is_numeric | ( | obj | ) |
Check whether object is a number or not, include numpy number, etc.
lightgbm.basic.is_numpy_1d_array | ( | data | ) |
Check whether data is a 1-D numpy array.
lightgbm.basic.list_to_1d_numpy | ( | data, | |
dtype = np.float32 , |
|||
name = 'list' |
|||
) |
Convert data to 1-D numpy array.
lightgbm.basic.param_dict_to_str | ( | data | ) |
Convert Python dictionary to string, which is passed to C API.
dict lightgbm.basic.FIELD_TYPE_MAPPER |
dict lightgbm.basic.PANDAS_DTYPE_MAPPER |