class_docstr: A `Forecast` object that uses a distribution directly.
  
  This can for instance be used to represent marginal probability
  distributions for each time point -- although joint distributions are
  also possible, e.g. when using MultiVariateGaussian).
  
  Parameters
  ----------
  distribution
      Distribution object. This should represent the entire prediction
      length, i.e., if we draw `num_samples` samples from the distribution,
      the sample shape should be
  
          samples = trans_dist.sample(num_samples)
          samples.shape -> (num_samples, prediction_length)
  
  start_date
      start of the forecast
  info
      additional information that the forecaster may provide e.g. estimated
      parameters, number of iterations ran etc.
class_docstr_tok: ["A","`","Forecast","`","object","that","uses","a","distribution","directly",".","This","can","for","instance","be","used","to","represent","marginal","probability","distributions","for","each","time","point","--","although","joint","distributions","are","also","possible",",","e.g",".","when","using","MultiVariateGaussian",")",".","Parameters","--","--","--","--","--","distribution","Distribution","object",".","This","should","represent","the","entire","prediction","length",",","i.e.",",","if","we","draw","`","num_samples","`","samples","from","the","distribution",",","the","sample","shape","should","be","samples","=","trans_dist.sample","(","num_samples",")","samples.shape","-",">","(","num_samples",",","prediction_length",")","start_date","start","of","the","forecast","info","additional","information","that","the","forecaster","may","provide","e.g",".","estimated","parameters",",","number","of","iterations","ran","etc","."]
docstr: Forecast mean.
docstr_tok: ["Forecast","mean","."]
code: def mean(self) -> np.ndarray:
      """
      Forecast mean.
      """
      if self._mean is not None:
          return self._mean
      else:
          _mean = self.distribution.mean.cpu().numpy()
          self._mean = _mean
          return _mean
  
file_path: gluonts/src/gluonts/torch/model/forecast.py
imports: from typing import Dict, Optional, Union
  import numpy
  import pandas
  import torch
  from torch.distributions import Distribution
  from gluonts.model.forecast import Forecast, Quantile, SampleForecast
label_desc: Use image node_id 2 for calling the DistributionForecast obj's underlying member method code with example usage: obj.mean() and returns: self, _mean