tensorcircuit.applications.ai.ensemble¶

Useful utilities for ensemble

class tensorcircuit.applications.ai.ensemble.bagging[source]¶

Bases: object

__init__() None[source]¶
append(model: Any, model_trained: bool) None[source]¶

Add model to the voting method

compile(**kwargs: Any) None[source]¶
eval(input_data: List[Any], evaluation_method: str = 'acc') float[source]¶

Expect input data to be a 2D array which a 1D array of yTrue followed by a 1D array of yPred is expected to be the components of the 2D array

predict(input_data: Any, voting_policy: str | None = None) Any[source]¶

Input data is expected to be a 2D array that the first layer is different input data (into the trained models)

train(**kwargs: Any) None[source]¶

Train all models in the class, **kwargs expect to receive the argus that can be directly sent to tf.fit Expected to be run after finishing compile