__init__.py 1.71 KB
Newer Older
1
2
# import Libraries of other lib packages
import bob.io.base
3

4
5
6
7
# import our own Library
import bob.extension
bob.extension.load_bob_library('bob.learn.boosting', __file__)

8
# versioning
9
10
11
from bob.learn.boosting import version
from bob.learn.boosting.version import module as __version__
from bob.learn.boosting.version import api as __api_version__
12

13
# include loss functions
14
from bob.learn.boosting.LossFunction import LossFunction # Just to get the documentation for it
15
16
17
18
from bob.learn.boosting.ExponentialLoss import ExponentialLoss
from bob.learn.boosting.LogitLoss import LogitLoss
from bob.learn.boosting.TangentialLoss import TangentialLoss
from bob.learn.boosting._library import JesorskyLoss
19
20

# include trainers
21
22
23
from bob.learn.boosting.StumpTrainer import StumpTrainer
from bob.learn.boosting.Boosting import Boosting
from bob.learn.boosting._library import LUTTrainer
24
25

# include machines
26
from bob.learn.boosting._library import WeakMachine, StumpMachine, LUTMachine, BoostedMachine
27
28

# include auxiliary functions
29
from bob.learn.boosting._library import weighted_histogram
30
31
32
33

def get_config():
  """Returns a string containing the configuration information.
  """
34
  return bob.extension.get_config(__name__, version.externals, version.api)
35
36


37
38
39
40
41
42
43
44
45
46
47
48
49
# gets sphinx autodoc done right - don't remove it
def __appropriate__(*args):
  """Says object was actually declared here, an not on the import module.
  Parameters:
    *args: An iterable of objects to modify
  Resolves `Sphinx referencing issues
  <https://github.com/sphinx-doc/sphinx/issues/3048>`
  """
  for obj in args: obj.__module__ = __name__
__appropriate__(
    LossFunction,
    )

50
51
# gets sphinx autodoc done right - don't remove it
__all__ = [_ for _ in dir() if not _.startswith('_')]
52