__init__.py 1.01 KB
Newer Older
wxchan's avatar
wxchan committed
1
2
3
4
5
6
7
# coding: utf-8
"""LightGBM, Light Gradient Boosting Machine.

Contributors: https://github.com/Microsoft/LightGBM/graphs/contributors
"""
from __future__ import absolute_import

8
from .basic import Booster, Dataset
9
10
11
from .callback import (early_stopping, print_evaluation, record_evaluation,
                       reset_parameter)
from .engine import cv, train
Guolin Ke's avatar
Guolin Ke committed
12
import os
13

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

Guolin Ke's avatar
Guolin Ke committed
23
24
25
version = '2.0.1'
if os.path.isfile('./VERSION.txt'):
    version = open('./VERSION.txt').read().strip()
wxchan's avatar
wxchan committed
26

Guolin Ke's avatar
Guolin Ke committed
27
__version__ = version
wxchan's avatar
wxchan committed
28

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