lale.lib.lale.topk_voting_classifier module

class lale.lib.lale.topk_voting_classifier.TopKVotingClassifier(*, estimator=None, optimizer=None, args_to_optimizer=None, k=10)

Bases: PlannedIndividualOp

This operator creates a voting ensemble from top k performing pipelines from the given planned pipeline.

This documentation is auto-generated from JSON schemas.

Parameters
  • estimator (union type, not for optimizer, default None) –

    Planned Lale individual operator or pipeline.

    • operator of None

    • or None

  • optimizer (union type, optional, not for optimizer, default None) –

    Optimizer class to be used during the two stages of optimization.

    Default of None uses Hyperopt internally. Currently, only Hyperopt is supported as an optimizer.

    • operator of None

    • or None

  • args_to_optimizer (union type, optional, not for optimizer, default None) –

    Dictionary of keyword arguments required to be used for the given optimizer

    as applicable for the given task. For example, max_evals, cv, scoring etc. for Hyperopt. If None, default values for the optimizer would be used.

    • dict

    • or None

  • k (integer, >=1, optional, not for optimizer, default 10) –

    Number of top pipelines to be used for the voting ensemble. If the number of

    successful trials of the optimizer are less than k, the ensemble will use only successful trials.

fit(X, y=None, **fit_params)

Train the operator.

Note: The fit method is not available until this operator is trainable.

Once this method is available, it will have the following signature:

Parameters
  • X (any type) –

  • y (any type) –

predict(X, **predict_params)

Make predictions.

Note: The predict method is not available until this operator is trained.

Once this method is available, it will have the following signature:

Parameters

X (any type) –

Returns

result

Return type

any type