autoemulate.emulators.conditional_neural_process_attn#
- class AttentiveConditionalNeuralProcess(hidden_dim=64, latent_dim=64, hidden_layers_enc=3, hidden_layers_dec=3, min_context_points=3, max_context_points=10, n_episode=32, max_epochs=100, lr=0.005, batch_size=16, activation=<class 'torch.nn.modules.activation.ReLU'>, optimizer=<class 'torch.optim.adamw.AdamW'>, normalize_y=True, device='cpu', random_state=None, attention=True)[source]#
Bases:
ConditionalNeuralProcess
- set_predict_request(*, return_std='$UNCHANGED$')#
Request metadata passed to the
predict
method.Note that this method is only relevant if
enable_metadata_routing=True
(seesklearn.set_config()
). Please see User Guide on how the routing mechanism works.The options for each parameter are:
True
: metadata is requested, and passed topredict
if provided. The request is ignored if metadata is not provided.False
: metadata is not requested and the meta-estimator will not pass it topredict
.None
: metadata is not requested, and the meta-estimator will raise an error if the user provides it.str
: metadata should be passed to the meta-estimator with this given alias instead of the original name.
The default (
sklearn.utils.metadata_routing.UNCHANGED
) retains the existing request. This allows you to change the request for some parameters and not others.Added in version 1.3.
Note
This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a
Pipeline
. Otherwise it has no effect.