Var.predict()

Contents

Var.predict()#

Var.predict(samples, newdata=None, chunk_size=64)[source]#

Returns an array of predictions for this variable.

Parameters:
  • samples (Position (dict[str, Any])) – Dictionary of samples at which to evaluate predictions.

  • newdata (Position (dict[str, Any]) | None, default: None) – Dictionary of new data at which to evaluate predictions. The keys should correspond to variable or node names in the model whose values should be set to the given values before evaluating predictions.

  • chunk_size (int | None, default: 64) – Maximum number of flattened samples to evaluate in parallel. Defaults to 64. Pass None to evaluate all samples in parallel. A smaller value reduces the peak memory required for sample-dependent intermediate values, at the potential cost of lower accelerator utilization. It does not reduce the memory required to store the returned predictions.

Return type:

Any