File: __init__.py

package info (click to toggle)
scikit-optimize 0.10.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,672 kB
  • sloc: python: 10,659; javascript: 438; makefile: 136; sh: 6
file content (73 lines) | stat: -rw-r--r-- 1,719 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
"""Scikit-Optimize, or `skopt`, is a simple and efficient library for optimizing (very)
expensive and noisy black-box functions.

It implements
several methods for sequential model-based optimization. `skopt` aims
to be accessible and easy to use in many contexts.
"""

import importlib
import multiprocessing as mp
import platform
import struct
from importlib.metadata import version, PackageNotFoundError


try:
    __version__ = version("scikit-optimize")
except PackageNotFoundError:
    __version__ = '?.?.?'  # Not installed

from . import (
    acquisition,
    benchmarks,
    callbacks,
    learning,
    optimizer,
    sampler,
    space,
)
from .optimizer import (
    dummy_minimize,
    forest_minimize,
    gbrt_minimize,
    gp_minimize,
    Optimizer,
)
from .searchcv import BayesSearchCV
from .space import Space
from .utils import dump, load, expected_minimum, expected_minimum_random_sampling

__all__ = (
    "show_versions",
    "acquisition",
    "benchmarks",
    "callbacks",
    "learning",
    "optimizer",
    "plots",
    "sampler",
    "space",
    "gp_minimize",
    "dummy_minimize",
    "forest_minimize",
    "gbrt_minimize",
    "Optimizer",
    "dump",
    "load",
    "expected_minimum",
    "expected_minimum_random_sampling",
    "BayesSearchCV",
    "Space",
)
_IS_32BIT = 8 * struct.calcsize("P") == 32


def show_versions():
    """Provide useful information, important for bug reports."""
    print('Platform:', platform.platform())
    print('Python:', platform.python_version())
    print('CPU count:', mp.cpu_count())
    print('scikit-optimize', __version__)
    for pkg in ('sklearn', 'numpy', 'scipy'):
        print(f'{pkg}:', importlib.import_module(pkg).__version__)