Note
This is the documentation for the current state of the development branch of Qiskit Experiments. The documentation or APIs here can change prior to being released.
TrainableDataAction¶
- class TrainableDataAction(validate=True)[source]¶
A base class for data actions that need training.
Note
The parameters of trainable nodes computed during training should be listed in the class method
TrainableDataAction._default_parameters()
. These parameters are initialized at construction time and serialized together with the constructor arguments. All parameters defined inTrainableDataAction._default_parameters()
should be assigned a None value to indicate that the node has not been trained.Parameter values can be updated with the
set_parameters()
method and refer to using theTrainableDataAction.parameters()
method. This is required to correctly JSON serialize and deserialize a trainable node with parameters set during training.Create new node.
- Parameters:
validate (
bool
) – If set to False the DataAction will not validate its input.
Attributes
Return False if the DataAction needs to be trained.
Return the parameters of the trainable node.
Methods
Call the data action of this node on the data.
TrainableDataAction.set_parameters
(**fields)Set parameters for training.
Train a DataAction.
Call the data action of this node on the data.