"vscode:/vscode.git/clone" did not exist on "41ba9e8f00c89d72e5cb71c964722ce1ed4d8445"
__init__.py 1.23 KB
Newer Older
wxchan's avatar
wxchan committed
1
2
3
# coding: utf-8
"""LightGBM, Light Gradient Boosting Machine.

4
Contributors: https://github.com/microsoft/LightGBM/graphs/contributors.
wxchan's avatar
wxchan committed
5
"""
6
from .basic import Booster, Dataset, register_logger
7
8
from .callback import (early_stopping, print_evaluation, record_evaluation,
                       reset_parameter)
9
from .engine import cv, train, CVBooster
10

Guolin Ke's avatar
Guolin Ke committed
11
import os
12

wxchan's avatar
wxchan committed
13
14
15
16
try:
    from .sklearn import LGBMModel, LGBMRegressor, LGBMClassifier, LGBMRanker
except ImportError:
    pass
17
try:
18
19
    from .plotting import (plot_importance, plot_split_value_histogram, plot_metric,
                           plot_tree, create_tree_digraph)
20
21
except ImportError:
    pass
wxchan's avatar
wxchan committed
22
23


24
25
26
dir_path = os.path.dirname(os.path.realpath(__file__))

if os.path.isfile(os.path.join(dir_path, 'VERSION.txt')):
27
28
    with open(os.path.join(dir_path, 'VERSION.txt')) as version_file:
        __version__ = version_file.read().strip()
wxchan's avatar
wxchan committed
29

30
__all__ = ['Dataset', 'Booster', 'CVBooster',
31
           'register_logger',
wxchan's avatar
wxchan committed
32
           'train', 'cv',
33
           'LGBMModel', 'LGBMRegressor', 'LGBMClassifier', 'LGBMRanker',
34
           'print_evaluation', 'record_evaluation', 'reset_parameter', 'early_stopping',
35
           'plot_importance', 'plot_split_value_histogram', 'plot_metric', 'plot_tree', 'create_tree_digraph']