Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'$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)
'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)
'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)
'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)
""",
'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)
'$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)
'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)
.. _`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)
'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)