lale.sklearn_compat module¶
-
class
lale.sklearn_compat.DefaultsVisitor[source]¶ Bases:
lale.util.Visitor.Visitor-
visitPlannedIndividualOp(op: lale.operators.IndividualOp) → Dict[str, Any]¶
-
visitPlannedPipeline(op: lale.operators.PlannedPipeline) → Dict[str, Any]¶
-
visitTrainableIndividualOp(op: lale.operators.IndividualOp) → Dict[str, Any]¶
-
visitTrainablePipeline(op: lale.operators.PlannedPipeline) → Dict[str, Any]¶
-
visitTrainedIndividualOp(op: lale.operators.IndividualOp) → Dict[str, Any]¶
-
visitTrainedPipeline(op: lale.operators.PlannedPipeline) → Dict[str, Any]¶
-
-
class
lale.sklearn_compat.WithoutGetParams(base)[source]¶ Bases:
objectThis wrapper forwards everything except “get_attr” to what it is wrapping
-
lale.sklearn_compat.make_sklearn_compat(op: lale.operators.Operator) → lale.sklearn_compat.SKlearnCompatWrapper[source]¶ Top level function for providing compatibiltiy with sklearn operations This returns a wrapper around the provided sklearn operator graph which can be passed to sklearn methods such as clone and GridSearchCV The wrapper may modify the wrapped lale operator/pipeline as part of providing compatibility with these methods. After the sklearn operation is complete, SKlearnCompatWrapper.to_lale() can be called to recover the wrapped lale operator for future use
-
lale.sklearn_compat.nest_all_HPparams(name: str, grids: List[Dict[str, V]]) → List[Dict[str, V]][source]¶ Given the name of an operator in a pipeline, this transforms every key(parameter name) in the grids to use the operator name as a prefix (separated by __). This is the convention in scikit-learn pipelines.
-
lale.sklearn_compat.partition_sklearn_params(d: Dict[str, Any]) → Dict[str, Dict[str, Any]][source]¶