How to use the lale.operators.make_operator function in lale

To help you get started, we’ve selected a few lale examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github IBM / lale / lale / lib / autogen / kernel_ridge.py View on Github external
'$schema': 'http://json-schema.org/draft-04/schema#',
    'description': 'Combined schema for expected data and hyperparameters.',
    'documentation_url': 'https://scikit-learn.org/0.20/modules/generated/sklearn.kernel_ridge.KernelRidge#sklearn-kernel_ridge-kernelridge',
    'type': 'object',
    'tags': {
        'pre': [],
        'op': ['estimator'],
        'post': []},
    'properties': {
        'hyperparams': _hyperparams_schema,
        'input_fit': _input_fit_schema,
        'input_predict': _input_predict_schema,
        'output_predict': _output_predict_schema},
}
lale.docstrings.set_docstrings(KernelRidgeImpl, _combined_schemas)
KernelRidge = lale.operators.make_operator(KernelRidgeImpl, _combined_schemas)
github IBM / lale / lale / lib / autogen / gaussian_nb.py View on Github external
'documentation_url': 'https://scikit-learn.org/0.20/modules/generated/sklearn.naive_bayes.GaussianNB#sklearn-naive_bayes-gaussiannb',
    'type': 'object',
    'tags': {
        'pre': [],
        'op': ['estimator'],
        'post': []},
    'properties': {
        'hyperparams': _hyperparams_schema,
        'input_fit': _input_fit_schema,
        'input_predict': _input_predict_schema,
        'output_predict': _output_predict_schema,
        'input_predict_proba': _input_predict_proba_schema,
        'output_predict_proba': _output_predict_proba_schema},
}
lale.docstrings.set_docstrings(GaussianNBImpl, _combined_schemas)
GaussianNB = lale.operators.make_operator(GaussianNBImpl, _combined_schemas)
github IBM / lale / lale / lib / lale / hyperopt_regressor.py View on Github external
'type': 'array', 'items': {'type': 'number'}}

_combined_schemas = {
    'documentation_url': 'https://lale.readthedocs.io/en/latest/modules/lale.lib.lale.hyperopt_regressor.html',
    'type': 'object',
    'tags': {
        'pre': [],
        'op': ['estimator'],
        'post': []},
    'properties': {
        'hyperparams': _hyperparams_schema,
        'input_fit': _input_fit_schema,
        'input_predict': _input_predict_schema,
        'output': _output_predict_schema}}

HyperoptRegressor = lale.operators.make_operator(HyperoptRegressorImpl, _combined_schemas)

if __name__ == '__main__':
    from lale.lib.lale import ConcatFeatures
    from lale.lib.sklearn import Nystroem, PCA, RandomForestRegressor
    from sklearn.metrics import r2_score
    pca = PCA(n_components=3)
    nys = Nystroem(n_components=3)
    concat = ConcatFeatures()
    rf = RandomForestRegressor()

    trainable = (pca & nys) >> concat >> rf
    #trainable = nys >>rf
    import sklearn.datasets
    from lale.helpers import cross_val_score
    diabetes = sklearn.datasets.load_diabetes()
    X, y = sklearn.utils.shuffle(diabetes.data, diabetes.target, random_state=42)
github IBM / lale / lale / lib / imblearn / edited_nearest_neighbours.py View on Github external
'properties': {
    'hyperparams': _hyperparams_schema,
    'input_fit': _input_fit_schema,
    'input_transform': _input_transform_schema,
    'output_transform': _output_transform_schema,
    'input_predict': _input_predict_schema,
    'output_predict': _output_predict_schema,
    'input_predict_proba': _input_predict_proba_schema,
    'output_predict_proba': _output_predict_proba_schema,
    'input_decision_function': _input_decision_function_schema,
    'output_decision_function': _output_decision_function_schema
}}

lale.docstrings.set_docstrings(EditedNearestNeighboursImpl, _combined_schemas)

EditedNearestNeighbours = lale.operators.make_operator(EditedNearestNeighboursImpl, _combined_schemas)
github IBM / lale / lale / lib / sklearn / nystroem.py View on Github external
""",
    'documentation_url': 'https://lale.readthedocs.io/en/latest/modules/lale.lib.sklearn.nystroem.html',
    'type': 'object',
    'tags': {
        'pre': ['~categoricals'],
        'op': ['transformer'],
        'post': []},
    'properties': {
        'hyperparams': _hyperparams_schema,
        'input_fit': _input_fit_schema,
        'input_transform': _input_transform_schema,
        'output_transform': _output_transform_schema}}

lale.docstrings.set_docstrings(NystroemImpl, _combined_schemas)

Nystroem = lale.operators.make_operator(NystroemImpl, _combined_schemas)
github IBM / lale / lale / lib / autogen / bayesian_ridge.py View on Github external
'$schema': 'http://json-schema.org/draft-04/schema#',
    'description': 'Combined schema for expected data and hyperparameters.',
    'documentation_url': 'https://scikit-learn.org/0.20/modules/generated/sklearn.linear_model.BayesianRidge#sklearn-linear_model-bayesianridge',
    'type': 'object',
    'tags': {
        'pre': [],
        'op': ['estimator'],
        'post': []},
    'properties': {
        'hyperparams': _hyperparams_schema,
        'input_fit': _input_fit_schema,
        'input_predict': _input_predict_schema,
        'output_predict': _output_predict_schema},
}
lale.docstrings.set_docstrings(BayesianRidgeImpl, _combined_schemas)
BayesianRidge = lale.operators.make_operator(BayesianRidgeImpl, _combined_schemas)
github IBM / lale / lale / lib / autogen / linear_svc.py View on Github external
'documentation_url': 'https://scikit-learn.org/0.20/modules/generated/sklearn.svm.LinearSVC#sklearn-svm-linearsvc',
    'type': 'object',
    'tags': {
        'pre': [],
        'op': ['estimator'],
        'post': []},
    'properties': {
        'hyperparams': _hyperparams_schema,
        'input_fit': _input_fit_schema,
        'input_predict': _input_predict_schema,
        'output_predict': _output_predict_schema,
        'input_decision_function': _input_decision_function_schema,
        'output_decision_function': _output_decision_function_schema},
}
lale.docstrings.set_docstrings(LinearSVCImpl, _combined_schemas)
LinearSVC = lale.operators.make_operator(LinearSVCImpl, _combined_schemas)
github IBM / lale / lale / lib / autoai_libs / tam.py View on Github external
.. _`autoai_libs`: https://pypi.org/project/autoai-libs""",
    'documentation_url': 'https://lale.readthedocs.io/en/latest/modules/lale.lib.autoai_libs.tam.html',
    'type': 'object',
    'tags': {
        'pre': [],
        'op': ['transformer'],
        'post': []},
    'properties': {
        'hyperparams': _hyperparams_schema,
        'input_fit': _input_fit_schema,
        'input_transform': _input_transform_schema,
        'output_transform': _output_transform_schema}}

lale.docstrings.set_docstrings(TAMImpl, _combined_schemas)

TAM = lale.operators.make_operator(TAMImpl, _combined_schemas)
github IBM / lale / lale / lib / autogen / ridge_classifier_cv.py View on Github external
'documentation_url': 'https://scikit-learn.org/0.20/modules/generated/sklearn.linear_model.RidgeClassifierCV#sklearn-linear_model-ridgeclassifiercv',
    'type': 'object',
    'tags': {
        'pre': [],
        'op': ['estimator'],
        'post': []},
    'properties': {
        'hyperparams': _hyperparams_schema,
        'input_fit': _input_fit_schema,
        'input_predict': _input_predict_schema,
        'output_predict': _output_predict_schema,
        'input_decision_function': _input_decision_function_schema,
        'output_decision_function': _output_decision_function_schema},
}
lale.docstrings.set_docstrings(RidgeClassifierCVImpl, _combined_schemas)
RidgeClassifierCV = lale.operators.make_operator(RidgeClassifierCVImpl, _combined_schemas)