Biogeme: Python Library
2.5
|
Functions | |
def | cnl.cnl_avail (V, availability, nests, choice) |
Implements the cross-nested logit model as a MEV model. More... | |
def | cnl.logcnl_avail (V, availability, nests, choice) |
Implements the log of the cross-nested logit model as a MEV model. More... | |
def | cnl.cnlmu (V, availability, nests, choice, bmu) |
Implements the cross-nested logit model as a MEV model with the homogeneity parameters is explicitly involved. More... | |
def | cnl.logcnlmu (V, availability, nests, choice, bmu) |
Implements the log of the cross-nested logit model as a MEV model with the homogeneity parameters is explicitly involved. More... | |
def | logit.logit_av_scale (V, availability, choice, group, scale) |
Compute the logit choice probability with utilities scaled according to the group. More... | |
def | logit.logit (V, choice) |
Compute the logit choice probability, where all alternatives are available. More... | |
def | logit.logit_scale (V, choice, group, scale) |
Compute the logit choice probability with utilities scaled according to the group. More... | |
def | mev.mev (V, Gi, av, choice) |
Choice probability for a MEV model. More... | |
def | mev.logmev (V, Gi, av, choice) |
Log of the choice probability for a MEV model. More... | |
def | mev.mev_selectionBias (V, Gi, av, correction, choice) |
Choice probability for a MEV model, including the correction for endogenous sampling as proposed by Bierlaire, Bolduc and McFadden (2008). More... | |
def | mev.logmev_selectionBias (V, Gi, av, correction, choice) |
Log of choice probability for a MEV model, including the correction for endogenous sampling as proposed by Bierlaire, Bolduc and McFadden (2008). More... | |
def | nested.getMevForNested (V, availability, nests) |
Implements the MEV generating function for the nested logit model. More... | |
def | nested.nested (V, availability, nests, choice) |
Implements the nested logit model as a MEV model. More... | |
def | nested.lognested (V, availability, nests, choice) |
Implements the log of a nested logit model as a MEV model. More... | |
def | nested.nestedMevMu (V, availability, nests, choice, mu) |
Implements the nested logit model as a MEV model, where mu is also a parameter, if the user wants to test different normalization schemes. More... | |
def | nested.lognestedMevMu (V, availability, nests, choice, mu) |
Implements the log of the nested logit model as a MEV model, where mu is also a parameter, if the user wants to test different normalization schemes. More... | |
def cnl.cnl_avail | ( | V, | |
availability, | |||
nests, | |||
choice | |||
) |
Implements the cross-nested logit model as a MEV model.
V | A dictionary mapping each alternative id with the expression of the utility function. |
availability | A dictionary mapping each alternative id with its availability condition. |
nests | A tuple containing as many items as nests. Each item is also a tuple containing two items:
|
def cnl.cnlmu | ( | V, | |
availability, | |||
nests, | |||
choice, | |||
bmu | |||
) |
Implements the cross-nested logit model as a MEV model with the homogeneity parameters is explicitly involved.
V | A dictionary mapping each alternative id with the expression of the utility function. |
availability | A dictionary mapping each alternative id with its availability condition. |
nests | A tuple containing as many items as nests. Each item is also a tuple containing two items:
|
bmu | Homogeneity parameter . |
def nested.getMevForNested | ( | V, | |
availability, | |||
nests | |||
) |
Implements the MEV generating function for the nested logit model.
V | A dictionary mapping each alternative id with the expression of the utility function. |
availability | A dictionary mapping each alternative id with its availability condition. |
nests | A tuple containing as many items as nests. Each item is also a tuple containing two items:
|
where is the (only) nest containing alternative , and is the MEV generating function.
def cnl.logcnl_avail | ( | V, | |
availability, | |||
nests, | |||
choice | |||
) |
Implements the log of the cross-nested logit model as a MEV model.
V | A dictionary mapping each alternative id with the expression of the utility function. |
availability | A dictionary mapping each alternative id with its availability condition. |
nests | A tuple containing as many items as nests. Each item is also a tuple containing two items:
|
def cnl.logcnlmu | ( | V, | |
availability, | |||
nests, | |||
choice, | |||
bmu | |||
) |
Implements the log of the cross-nested logit model as a MEV model with the homogeneity parameters is explicitly involved.
V | A dictionary mapping each alternative id with the expression of the utility function. |
availability | A dictionary mapping each alternative id with its availability condition. |
nests | A tuple containing as many items as nests. Each item is also a tuple containing two items:
|
bmu | Homogeneity parameter . |
def logit.logit | ( | V, | |
choice | |||
) |
Compute the logit choice probability, where all alternatives are available.
V | A dictionary mapping each alternative id with the expression of the utility function. |
choice | expression producing the id of the chosen alternative. |
def logit.logit_av_scale | ( | V, | |
availability, | |||
choice, | |||
group, | |||
scale | |||
) |
Compute the logit choice probability with utilities scaled according to the group.
V | A dictionary mapping each alternative id with the expression of the utility function. |
availability | A dictionary mapping each alternative id with its availability condition. |
choice | expression producing the id of the chosen alternative. |
group | id of the group, or market segment. |
scale | A dictionary mapping each group id with the expression providing the corresponding scale. |
where is 1 if alternative is available, 0 otherwise, and is the scale parameter associated with group .
def logit.logit_scale | ( | V, | |
choice, | |||
group, | |||
scale | |||
) |
Compute the logit choice probability with utilities scaled according to the group.
V | A dictionary mapping each alternative id with the expression of the utility function. |
choice | expression producing the id of the chosen alternative. |
group | id of the group, or market segment. |
scale | A dictionary mapping each group id with the expression providing the corresponding scale. |
where is the scale parameter associated with group .
def mev.logmev | ( | V, | |
Gi, | |||
av, | |||
choice | |||
) |
Log of the choice probability for a MEV model.
V | A dictionary mapping each alternative id with the expression of the utility function. |
Gi | A dictionary mapping each alternative id with the function where is the MEV generating function. If an alternative is not available, then . |
av | A dictionary mapping each alternative id with its availability condition. |
choice | Expression producing the id of the chosen alternative. |
def mev.logmev_selectionBias | ( | V, | |
Gi, | |||
av, | |||
correction, | |||
choice | |||
) |
Log of choice probability for a MEV model, including the correction for endogenous sampling as proposed by Bierlaire, Bolduc and McFadden (2008).
V | A dictionary mapping each alternative id with the expression of the utility function. |
Gi | A dictionary mapping each alternative id with the function where is the MEV generating function. |
av | A dictionary mapping each alternative id with its availability condition. |
correction | A dictionary mapping each alternative id with the expression of the correction. Typically, it is a value, or a parameter to be estimated. |
choice | Expression producing the id of the chosen alternative. |
def nested.lognested | ( | V, | |
availability, | |||
nests, | |||
choice | |||
) |
Implements the log of a nested logit model as a MEV model.
V | A dictionary mapping each alternative id with the expression of the utility function. |
availability | A dictionary mapping each alternative id with its availability condition. |
nests | A tuple containing as many items as nests. Each item is also a tuple containing two items:
|
choice | expression producing the id of the chosen alternative. |
def nested.lognestedMevMu | ( | V, | |
availability, | |||
nests, | |||
choice, | |||
mu | |||
) |
Implements the log of the nested logit model as a MEV model, where mu is also a parameter, if the user wants to test different normalization schemes.
V | A dictionary mapping each alternative id with the expression of the utility function. |
availability | A dictionary mapping each alternative id with its availability condition. |
nests | A tuple containing as many items as nests. Each item is also a tuple containing two items:
|
choice | expression producing the id of the chosen alternative. |
mu | expression producing the value of the top-level scale parameter. |
where is the (only) nest containing alternative , and is the MEV generating function.
def mev.mev | ( | V, | |
Gi, | |||
av, | |||
choice | |||
) |
Choice probability for a MEV model.
V | A dictionary mapping each alternative id with the expression of the utility function. |
Gi | A dictionary mapping each alternative id with the function where is the MEV generating function. If an alternative is not available, then . |
av | A dictionary mapping each alternative id with its availability condition. |
choice | Expression producing the id of the chosen alternative. |
def mev.mev_selectionBias | ( | V, | |
Gi, | |||
av, | |||
correction, | |||
choice | |||
) |
Choice probability for a MEV model, including the correction for endogenous sampling as proposed by Bierlaire, Bolduc and McFadden (2008).
V | A dictionary mapping each alternative id with the expression of the utility function. |
Gi | A dictionary mapping each alternative id with the function where is the MEV generating function. |
av | A dictionary mapping each alternative id with its availability condition. |
correction | A dictionary mapping each alternative id with the expression of the correction. Typically, it is a value, or a parameter to be estimated. |
choice | Expression producing the id of the chosen alternative. |
def nested.nested | ( | V, | |
availability, | |||
nests, | |||
choice | |||
) |
Implements the nested logit model as a MEV model.
V | A dictionary mapping each alternative id with the expression of the utility function. |
availability | A dictionary mapping each alternative id with its availability condition. |
nests | A tuple containing as many items as nests. Each item is also a tuple containing two items:
|
choice | expression producing the id of the chosen alternative. |
def nested.nestedMevMu | ( | V, | |
availability, | |||
nests, | |||
choice, | |||
mu | |||
) |
Implements the nested logit model as a MEV model, where mu is also a parameter, if the user wants to test different normalization schemes.
V | A dictionary mapping each alternative id with the expression of the utility function. |
availability | A dictionary mapping each alternative id with its availability condition. |
nests | A tuple containing as many items as nests. Each item is also a tuple containing two items:
|
choice | expression producing the id of the chosen alternative. |
mu | expression producing the value of the top-level scale parameter. |
where is the (only) nest containing alternative , and is the MEV generating function.