TermBuilder.init_scale()#
- TermBuilder.init_scale(scale, term_name)[source]#
Initializes a scale variable with a term-related name.
- Parameters:
scale (
Var|ScaleIG|float|Literal['default'] |VarIGPrior) – Scale object.term_name (
str) – Name of the term this scale corresponds to. If you supply aliesel.model.Var, you can use the place- holder{x}in its name to allow this method to fill in theterm_name.
- Return type:
Notes
The behavior depends on the type of the
scaleargument.- If it is
"default", the return will be created based on the default_scale_fnargument supplied to the TermBuilder upon initialization.
- If it is
- If it is a
VarIGPrior, the return will be
scale = sqrt(var), wherevar ~ InverseGamma(concentration, scale), with concentration and scale given by theVarIGPriorobject. For most terms, this will mean that a fitting Gibbs sampler can be automatically set up forvar. The exceptions to this rule areta(),tf(), andtx().
- If it is a
- If it is a
float, the return will belsl.Var.new_valueholding this float.
- If it is a
- If it is a
liesel.model.Varobject, the return will be this object. If you supply a
liesel.model.Var, you can use the place- holder{x}in its name to allow this method to fill in an automatically generated name based on theterm_name.
- If it is a