gluonts.torch.distributions.distribution_output 模块#
- class gluonts.torch.distributions.distribution_output.BetaOutput(beta: float = 0.0)[source]#
- 基类: - gluonts.torch.distributions.distribution_output.DistributionOutput- args_dim: Dict[str, int] = {'concentration0': 1, 'concentration1': 1}#
 - distr_cls#
- torch.distributions.beta.Beta 的别名 
 - classmethod domain_map(concentration1: torch.Tensor, concentration0: torch.Tensor)[source]#
- 将参数转换为正确的形状和域。 - 域取决于分布的类型,而正确的形状是通过重塑尾部轴来获得的,以使返回的张量定义了具有正确 event_shape 的分布。 
 - property event_shape: Tuple#
- 与输出对象兼容的每个独立事件的形状。 
 - in_features: int#
 - property value_in_support: float#
- 一个浮点值,可用于计算相应输出的损失。 - 默认为 0.0。 
 
- class gluonts.torch.distributions.distribution_output.DistributionOutput(beta: float = 0.0)[source]#
- 基类: - gluonts.torch.distributions.output.Output- 给定网络输出,用于构建分布的类。 - args_dim: Dict[str, int]#
 - distr_cls: type#
 - distribution(distr_args, loc: Optional[torch.Tensor] = None, scale: Optional[torch.Tensor] = None) torch.distributions.distribution.Distribution[source]#
- 给定构造函数参数集合以及可选的 scale 张量,构造关联的分布。 - 参数
- distr_args – 底层 Distribution 类型的构造函数参数。 
- loc – 可选张量,形状与结果分布的 batch_shape+event_shape 相同。 
- scale – 可选张量,形状与结果分布的 batch_shape+event_shape 相同。 
 
 
 - domain_map(*args: torch.Tensor)[source]#
- 将参数转换为正确的形状和域。 - 域取决于分布的类型,而正确的形状是通过重塑尾部轴来获得的,以使返回的张量定义了具有正确 event_shape 的分布。 
 - property event_dim: int#
- 事件维度数,即此对象构建的分布的 event_shape 元组的长度。 
 - property forecast_generator: gluonts.model.forecast_generator.ForecastGenerator#
 - in_features: int#
 - loss(target: torch.Tensor, distr_args: Tuple[torch.Tensor, ...], loc: Optional[torch.Tensor] = None, scale: Optional[torch.Tensor] = None) torch.Tensor[source]#
- 给定网络输出,计算目标数据的损失。 - 参数
- target – 用于计算损失的目标时间序列的值。 
- distr_args – 可用于构建输出分布的参数。 
- loc – 分布的位置参数,可选。 
- scale – 分布的尺度参数,可选。 
 
- 返回
- 损失值,与 target 的形状相同。 
- 返回类型
- loss_values 
 
 
- class gluonts.torch.distributions.distribution_output.GammaOutput(beta: float = 0.0)[source]#
- 基类: - gluonts.torch.distributions.distribution_output.DistributionOutput- args_dim: Dict[str, int] = {'concentration': 1, 'rate': 1}#
 - distr_cls#
- torch.distributions.gamma.Gamma 的别名 
 - classmethod domain_map(concentration: torch.Tensor, rate: torch.Tensor)[source]#
- 将参数转换为正确的形状和域。 - 域取决于分布的类型,而正确的形状是通过重塑尾部轴来获得的,以使返回的张量定义了具有正确 event_shape 的分布。 
 - property event_shape: Tuple#
- 与输出对象兼容的每个独立事件的形状。 
 - in_features: int#
 - property value_in_support: float#
- 一个浮点值,可用于计算相应输出的损失。 - 默认为 0.0。 
 
- class gluonts.torch.distributions.distribution_output.LaplaceOutput(beta: float = 0.0)[source]#
- 基类: - gluonts.torch.distributions.distribution_output.DistributionOutput- args_dim: Dict[str, int] = {'loc': 1, 'scale': 1}#
 - distr_cls#
- torch.distributions.laplace.Laplace 的别名 
 - classmethod domain_map(loc: torch.Tensor, scale: torch.Tensor)[source]#
- 将参数转换为正确的形状和域。 - 域取决于分布的类型,而正确的形状是通过重塑尾部轴来获得的,以使返回的张量定义了具有正确 event_shape 的分布。 
 - property event_shape: Tuple#
- 与输出对象兼容的每个独立事件的形状。 
 - in_features: int#
 
- class gluonts.torch.distributions.distribution_output.NormalOutput(beta: float = 0.0)[source]#
- 基类: - gluonts.torch.distributions.distribution_output.DistributionOutput- args_dim: Dict[str, int] = {'loc': 1, 'scale': 1}#
 - distr_cls#
- torch.distributions.normal.Normal 的别名 
 - classmethod domain_map(loc: torch.Tensor, scale: torch.Tensor)[source]#
- 将参数转换为正确的形状和域。 - 域取决于分布的类型,而正确的形状是通过重塑尾部轴来获得的,以使返回的张量定义了具有正确 event_shape 的分布。 
 - property event_shape: Tuple#
- 与输出对象兼容的每个独立事件的形状。 
 - in_features: int#
 
- class gluonts.torch.distributions.distribution_output.PoissonOutput(beta: float = 0.0)[source]#
- 基类: - gluonts.torch.distributions.distribution_output.DistributionOutput- args_dim: Dict[str, int] = {'rate': 1}#
 - distr_cls#
- torch.distributions.poisson.Poisson 的别名 
 - distribution(distr_args, loc: Optional[torch.Tensor] = None, scale: Optional[torch.Tensor] = None) torch.distributions.distribution.Distribution[source]#
- 给定构造函数参数集合以及可选的 scale 张量,构造关联的分布。 - 参数
- distr_args – 底层 Distribution 类型的构造函数参数。 
- loc – 可选张量,形状与结果分布的 batch_shape+event_shape 相同。 
- scale – 可选张量,形状与结果分布的 batch_shape+event_shape 相同。 
 
 
 - classmethod domain_map(rate: torch.Tensor)[source]#
- 将参数转换为正确的形状和域。 - 域取决于分布的类型,而正确的形状是通过重塑尾部轴来获得的,以使返回的张量定义了具有正确 event_shape 的分布。 
 - property event_shape: Tuple#
- 与输出对象兼容的每个独立事件的形状。 
 - in_features: int#