You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we create a Distribution, we can pretty-print it. This was first developed at #2282, #2447 for ComposedDistribution. But when we print a distribution in dimension 1, then the pretty-print does not show the parameters of the distribution.
Why is this needed?
The parameters are an important part of the distribution. When hidden, lots of informations are lost.
Additional Context
Here is an example:
importopenturnsasotd=ot.Gumbel()
d
This prints:
Gumbel
name=Gumbel
dimension=1
weight=1
range=]-inf (-3.47309), (32.2362) +inf[
description=[X0]
isParallel=true
isCopula=false
We can see the type of distribution, but not its parameters.
Instead, the not-so-pretty print works well:
print(d)
This prints:
Gumbel(beta = 1, gamma = 0)
Analysis
The pretty-print feature of a Distribution is available of the code in DistributionImplementation::repr_html(). The limitation is because none of the implementations overload that pretty-print with their own parameters. This implicit choice was made because the current pretty-print shows the attributes of the class: the parameters are not attributes of this generic class.
The text was updated successfully, but these errors were encountered:
mbaudin47
changed the title
The pretty-print of a Distribution does not show its properties.
The pretty-print of a dimension 1 Distribution does not show its parameter.
May 24, 2024
mbaudin47
changed the title
The pretty-print of a dimension 1 Distribution does not show its parameter.
The pretty-print of a dimension 1 Distribution does not show its parameters
May 24, 2024
mbaudin47
changed the title
The pretty-print of a dimension 1 Distribution does not show its parameters
The pretty-print of a dimension 1-dimension Distribution does not show its parameters
May 24, 2024
What is the idea?
When we create a
Distribution
, we can pretty-print it. This was first developed at #2282, #2447 forComposedDistribution
. But when we print a distribution in dimension 1, then the pretty-print does not show the parameters of the distribution.Why is this needed?
The parameters are an important part of the distribution. When hidden, lots of informations are lost.
Additional Context
Here is an example:
This prints:
Gumbel
We can see the type of distribution, but not its parameters.
Instead, the not-so-pretty print works well:
This prints:
Analysis
The pretty-print feature of a Distribution is available of the code in DistributionImplementation::repr_html(). The limitation is because none of the implementations overload that pretty-print with their own parameters. This implicit choice was made because the current pretty-print shows the attributes of the class: the parameters are not attributes of this generic class.
The text was updated successfully, but these errors were encountered: