Biogeme: Python Library  2.5
Public Member Functions | Public Attributes | List of all members
bio_expression.bioLogit Class Reference

Class calculating a logit choice probability. More...

Inheritance diagram for bio_expression.bioLogit:
bio_expression.Expression

Public Member Functions

def __init__ (self, util, av, choice)
 
def getExpression (self)
 
- Public Member Functions inherited from bio_expression.Expression
def __init__ (self)
 Constructor.
 
def getExpression (self)
 
def getID (self)
 
def __str__ (self)
 
def __neg__ (self)
 
def __add__ (self, expression)
 
def __radd__ (self, expression)
 
def __sub__ (self, expression)
 
def __rsub__ (self, expression)
 
def __mul__ (self, expression)
 
def __rmul__ (self, expression)
 
def __div__ (self, expression)
 
def __rdiv__ (self, expression)
 
def __truediv__ (self, expression)
 Support for Python version 3.x. More...
 
def __rtruediv__ (self, expression)
 Support for Python version 3.x. More...
 
def __mod__ (self, expression)
 
def __pow__ (self, expression)
 
def __rpow__ (self, expression)
 
def __and__ (self, expression)
 
def __or__ (self, expression)
 
def __eq__ (self, expression)
 
def __ne__ (self, expression)
 
def __le__ (self, expression)
 
def __ge__ (self, expression)
 
def __lt__ (self, expression)
 
def __gt__ (self, expression)
 

Public Attributes

 prob
 
 av
 
 choice
 
 operatorIndex
 
- Public Attributes inherited from bio_expression.Expression
 operatorIndex
 

Detailed Description

Class calculating a logit choice probability.

Computes the probability given by the logit model, that is

\[ \frac{a_i e^{V_i}}{\sum_{j=1}^{J} a_j e^{V_j}} \]

Example:

1 V = {1: V1, 2: V2, 3: V3}
2 av = {1: av_1, 2: 1, 3: av_3}
3 prob = bioLogit(V,av,CHOICE)

Definition at line 914 of file bio_expression.py.

Constructor & Destructor Documentation

def bio_expression.bioLogit.__init__ (   self,
  util,
  av,
  choice 
)
Parameters
utildictionary (see Python documentation) containing the utility functions $V_i$.
avdictionary (see Python documentation) containing the availability conditions for each alternative $a_i$ (if 0, alternative is not available, if different from zero, it is available). The number of entries and the labeling must be consistent with utilities.
choiceexpression providing the index of the alternative for which the probability is being computed.

Definition at line 928 of file bio_expression.py.


The documentation for this class was generated from the following file:
Copyright 2016 Michel Bierlaire