functionlogit2D
Mapping two continuous inputs to a binary output through a 2-dimension logistic relation
Extends from Modelica.Icons.Function (Icon for functions).
Information
This function generates a random binary variable with two inputs x1
and x2 from a 2-dimension logistic relation.
The probability of being 1 is calculated from the inputs x1 and
x2 from a 2D logistic relation with three predefined parameters
A (mutiplier for x1), B (mutiplier for
x2) and C (intercept). Then a random generator
generates the output, which should be a binary variable.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | x1 | The first input variable | |
| Real | x2 | The second input variable | |
| Real | A | 1.0 | Parameter defining the 2D logistic relation: mutiplier for the first input |
| Real | B | 1.0 | Parameter defining the 2D logistic relation: mutiplier for the second input |
| Real | C | 1.0 | Parameter defining the 2D logistic relation: intercept |
| Integer[Modelica.Math.Random.Generators.Xorshift1024star.nState] | stateIn | State of the random number generator |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | y | Binary variable | |
| Integer[Modelica.Math.Random.Generators.Xorshift1024star.nState] | stateOut | New state of the random number generator |
Revisions
-
December 6, 2024, by Michael Wetter:
Refactored implementation of random number calculations, transfering the local state of the random number generator from one call to the next.
This is for #4069. -
July 20, 2018, by Zhe Wang:
First implementation.