Ejemplo n.º 1
0
import os
from mindware.components.feature_engineering.transformations.base_transformer import Transformer
from mindware.components.utils.class_loader import find_components, ThirdPartyComponents
"""
Load the buildin classifiers.
"""
generator_directory = os.path.split(__file__)[0]
_generator = find_components(__package__, generator_directory, Transformer)
"""
Load third-party classifiers. 
"""
_addons = ThirdPartyComponents(Transformer)


def add_generator(generator):
    _addons.add_component(generator)
Ejemplo n.º 2
0
import os
from mindware.components.models.base_model import BaseRegressionModel
from mindware.components.utils.class_loader import find_components, ThirdPartyComponents
"""
Load the buildin regressors.
"""
regressors_directory = os.path.split(__file__)[0]
_regressors = find_components(__package__, regressors_directory,
                              BaseRegressionModel)
"""
Load third-party classifiers. 
"""
_addons = ThirdPartyComponents(BaseRegressionModel)


def add_regressor(regressor):
    _addons.add_component(regressor)
Ejemplo n.º 3
0
import os
from collections import OrderedDict
from mindware.components.feature_engineering.transformations.base_transformer import Transformer
from mindware.components.utils.class_loader import find_components, ThirdPartyComponents
"""
Load the buildin classifiers.
"""
balancer_directory = os.path.split(__file__)[0]
_balancer = find_components(__package__, balancer_directory, Transformer)

_imb_balancer = OrderedDict()
# TODO:Verify the effect of smote_balancer
# for key in ['weight_balancer', 'smote_balancer']:
for key in ['weight_balancer']:
    if key in _balancer.keys():
        _imb_balancer[key] = _balancer[key]

_bal_balancer = OrderedDict()
for key in ['weight_balancer']:
    if key in _balancer.keys():
        _bal_balancer[key] = _balancer[key]
"""
Load third-party classifiers. 
"""
_addons = ThirdPartyComponents(Transformer)


def add_balancer(balancer):
    _addons.add_component(balancer)
Ejemplo n.º 4
0
import os
from mindware.components.feature_engineering.transformations.base_transformer import Transformer
from mindware.components.utils.class_loader import find_components, ThirdPartyComponents
"""
Load the buildin classifiers.
"""
rescaler_directory = os.path.split(__file__)[0]
_rescaler = find_components(__package__, rescaler_directory, Transformer)
"""
Load third-party classifiers. 
"""
_addons = ThirdPartyComponents(Transformer)


def add_rescaler(rescaler):
    _addons.add_component(rescaler)
Ejemplo n.º 5
0
import os
from mindware.components.models.base_model import BaseClassificationModel
from mindware.components.utils.class_loader import find_components, ThirdPartyComponents
"""
Load the buildin classifiers.
"""
classifiers_directory = os.path.split(__file__)[0]
_classifiers = find_components(__package__, classifiers_directory,
                               BaseClassificationModel)
"""
Load third-party classifiers. 
"""
_addons = ThirdPartyComponents(BaseClassificationModel)


def add_classifier(classifier):
    _addons.add_component(classifier)
Ejemplo n.º 6
0
import os
from mindware.components.feature_engineering.transformations.base_transformer import Transformer
from mindware.components.utils.class_loader import find_components, ThirdPartyComponents
"""
Load the buildin classifiers.
"""
selector_directory = os.path.split(__file__)[0]
_selector = find_components(__package__, selector_directory, Transformer)
"""
Load third-party classifiers. 
"""
_addons = ThirdPartyComponents(Transformer)


def add_selector(selector):
    _addons.add_component(selector)
Ejemplo n.º 7
0
import os
from mindware.components.feature_engineering.transformations.base_transformer import Transformer
from mindware.components.utils.class_loader import find_components
"""
Load the buildin classifiers.
"""
preprocessor_directory = os.path.split(__file__)[0]
_preprocessor = find_components(__package__, preprocessor_directory,
                                Transformer)

_image_preprocessor = {}
_image_preprocessor['image2vector'] = _preprocessor['image2vector']

_text_preprocessor = {}
for key in ['text2vector', 'text2bertvector']:
    _text_preprocessor[key] = _preprocessor[key]