17 Sep. 2021 @ ZOOM

Machine Learningfor Behavior Model
How to collaborate DCM and ML ?

Tokyo University of Science

Hideki YAGINUMA
yaginuma@rs.tus.ac.jp

多項ロジット（MNL）モデル（2）DCM vs MLEX car  H car
To developand services, we are
U bus more
EX bus better
H bus infrastructure
conducting analysis basedε～IIDガンベル分布
on behavior models.
U rail EX rail  H bus
U carp Prediction Accuracy: issue of model parameter estimation

exp PV car
exp PV car  exp PV bus  exp PV railp Model
P car Interpretability: issue of understanding model (behavior）

Discrete choice model

Piexp PVi
¦ exp PV jjCMachine LearningCov(U)ªV 2 00º2S«»
22 BoxBlack0V0V2«»
6P2»«00V¬¼

Source: Sampling small data
Source: Big data
Function: Liner
Function: Non-Linerz シェア型モデルであるため直感的にわかりやすい
Accuracy(Model fitting): Mid（Low?）
Accuracy(Model fitting): Highz closed-formのため計算コストが安い
Interpretability : HighInterpertability: Low
08/9/20
第7回
行動モデル
夏の学校
Good understanding travel behavior ?
NOT understanding travel18behavior ?

Considering the possibility of collaboration between DCM and ML
from the perspective of Aaccuracy and Interpretability

2

3Overview of ML
Reinforcement
learning(self-learning)https://pythonnumericalmethods.berkeley.edu/notebooks/chapter25.01-Concept-of-Machine-Learning.html

4How to collaborate DCM and ML ?
Part 1: Prediction Accuracy- You can (not) estimate behavior model-Overview of DCM

5

By Chikaraishi(Hiroshima Univ)

Flexible DCM

6

Mixed Loigt (Train 2000)
High flexible model structure by two error term.
Utility function

U i =Vi + ηi + ν iv dist.: assume any G function
・IID Gamble (Logit Kernel)
MNL・any G function (GEV Kernel)
NL, PCL, CNL, GNL…

η dist.: basically assume “Normal dist.”
In the case of normal distribution takes a non-realistic value, it canassume a variety of probability distribution (triangular distribution, cutting
normal distribution, lognormal distribution, Rayleigh distribution, etc.).

• Error Component: approximate to any GEV model• Random Coefficient: Consider the heterogeneity

7

MXL : Error Component Model
Approximation of Nested Logit (NL)

MXL）モデル（5）Describe the nest (covariance) using structured η.

Q carQ bus
 Q railº»»»¼

Ex: model choiceNormal自動車U car = β X car +Carnest+ ν car

バス
BusU bus = β X bus + σ transitηtransit + ν bus

鉄道
RailU rail = β X rail + σ transitηtransit + ν railTransit nest
Choice prob.
(open-form)

HªV 20«220VVtransit«
2«0Vtransit¬

ミックストロジット（MIID Gamble
Logit
NestedV +σηe rail transit transit
U car EX carQ cPrail =fηdηtransit
transit
VcarVbus +σ transitηtransit
Vrail +σ transitηtransitUEX
VKe+e+ebusbustransit
transit  Q bηtransitº0
U rail EX rail  V transitKtransit  Q(∫)

»Ktransit | N 0,1V»N
2
Vrail +σ transitηtranist
V V 1»¼
KQ
eChoice prob. P =2∑N
N0 º ªV0railVcar
Vbus +σ transitηtranist
Vrailª+0σ transit0ηtranist(Simulated)N«»2
22+e+e «NLモデルとは違う!!
N e

夏の学校

2transit
2transit

33«0 V transit
2«¬0 V transitV transit »  « 02»¼ «¬ 0V transit

V00º»0»V 2 »¼

8MXL : Random Coefficient Model

ミックストロジット（MXL）モ
ミックストロジット（MXL）モデル（11）Assume the heterogeneity of parameter
嗜好の異質性：ランダム係数モデ
ックストロジット（MXL）モデル（11）ミックストロジット（MXL）モデル（11）ックストロジット（MXL）モデル（11）Inミックストロジット（MXL）モデル（11）the case of parameter following Normal dist., we estimate
Approximation of unobservable heterogeneity
UE T Q
嗜好の異質性：ランダム係数モデル（2）
嗜好の異質性：ランダム係数モデル（2）2
嗜好の異質性：ランダム係数モデル（2）
UET

Q
E|N
E,
Vcar,
nncar,
ncar,nn
U car,nU E nUTcar
EQnTcarcar,n,Qcar,nT

QE,nncar,nn , n car , nU car,n carE,nnTcar,nn car
Q ,car2E|
NE,V22nV | N E2, V
E n | EN E| E,NE n | Nn E , Vn 2E , V
U car,n E Tcar,n  VKnTcar,n  Q car,ncar , nn car , ncar , n
嗜好の異質性：ランダム係数モデル（2）thedist.ʼshyper-parameter(meanandvariance).
嗜好の異質性：ランダム係数モデル（2）E Tbus ,nV  VK
U n ,n EETTcar
TTcarcar Qcar
VKQU,carcar, n, n  VK
nn,n ,nnbus, n, nV nTbus , n  Q bus , ncar,carU car,nU EUTcar
VKT
QVn carcar,
nQVK,nnTVK, nEnTcar,ncar,nU car,n car
E,Tn carU,,nEnbusT,ncarVKTbuscar
QV T V  VK T
Tβ,ncar, n , n  Q bus
UE,nnbus,nU
ET

VKT

Q
rail,nrail , nβ
E n rail , n  Q rail , n ＩＩＤガンベル
bus,nbus,nnbus,nbus,nU bus ,nU E Tbus ,EVKTQEβn busbus ,nQ
VK,nTVKβE
Q, nEnTn rail
U bus ,n bus
E,Tn busU,nnrailT,nbus
VKTrail
Q bus
βn,TEbus, n, n nbus, n , n bus , nrail , n ＩＩＤガンベル分布
E Trail
VK
Kn,n| N
0,1 E E , V : unknown parameter
ＩＩＤガンベル分布
rail , n  VK,n  nTrail , n  Q rail
U rail ,nU EU
Trail
TQ
ＩＩＤガンベル分布
nTn rail
rail ,nVK,nnET,rail
ＩＩＤガンベル分布
Vrail,unknown
n , n QＩＩＤガンベル分布
rail , nparameter
N, n0n,
1 railU rail ,n railE,Tn rail ,,EVKTQ :railnK n|,nE n J 0  J観測異質性と非観測
E , V : unknown parameter
Kn | N0,1: unknown
1incomen としても良い
E ,Vparameter
K | NK 0|,1describe
using observable variables
E EJ ,0Vcan:Junknown
parameter
1incomen としても良い
parameter
Knn Hyper-parameter| N n0,1 N 0,1E , Vn : unknown
異質性の両方を考慮

EEnn
2008/9/20
2008/9/20

観測異質性と非観測EJ
Jincomeとしても良い
観測異質性と非観測
n01n
観測異質性と非観測
JE0  JJ1income
2008/9/20
第7回 異質性の両方を考慮
行動モデル 夏の学校
観測異質性と非観測n としても良いJincome39としても良い
第7回行動モデル
夏の学校
01 n としても良いnJ 0n J 1income
βdependon observable
incomevariable
異質性の両方を考慮
異質性の両方を考慮
異質性の両方を考慮

第7回 行動モデル 夏の学校

39

Difficulty of Estimation
Why estimation methods is important ?
ü Advance GEV model (CNL, GNL, n-GEV…） has many parameter.
⇒ Convergence becomes unstable (Hessian passed away…)
ü non-GEV model requires multiple integral calculations .
⇒ ML estimation cannot be used
ü Stricture of utility function (non-liner, complex distribution)
ü Dynamic choice behavior (Dynamic Programing:DP)ü Interaction between decision-maker (Endogeneity）
ü high dimensional data ⇒ N of Sample < N of Variable

The analyst needs to select an appropriate estimation
method corresponding to the model !

910

Overview of Estimation
To solve Integral
Maximum Likelihood estimation
To Consider
Dynamics
Interaction

Bayesian estimation
To general

Structural estimation
ü Heckman’s 2-stepü Pseudo Likelihood
ü nested Fixed Point (NFXP）
ü Nestef Pseudo Likelihood …
ü MPEC

Numerical method
ü Newton-Cotes rules
Lowü Simpson's ruledimensional

Analytical approximation
ü Series approximation
ü Clark approximation
ü MACML

Random approximation
ü Maximum Simulated Likelihood（ Monte Carlo integral, GHK…）
ü MCMC（Gibbs, MH, HM…） High-dimensional

Machine Learning (ML)
Neural network, (reverse) Reinforcement learning, Sparse modeling, Gaussian Process…
⇒ Several methodologies are useful for DCM parameter estimation !

Collaboration of DCM and ML

11

Estimation methods in the field of machine learning canbe applied to DCM estimation.
Neural network（Back propagation)

Sparse modeling

Gaussian ProcessEstimation considering
complex nonlinearstructures

Estimation consideringparameter dimension reduction

Reinforcement learning

Variational Bayesian

Estimation considering complex
probability distribution

Estimation considering
complex and dynamic choice12How to collaborate DCM and ML ?
Part 2: Model Interpretability- You can (not) understand behavior model-

XAI: eXplainable AI

13

Recent issue in AI
u In recent years, Accuracy and explainability of AI (ML) has beenrequired in practice situation.
u XAI: provides reasons and evidence that humans canunderstand for the results by AI.
u Three requirements werepresented in G20 AI principles
Human centered values• Fairness（公平性）• Accountability（説明責任）• Transparency（透明性）

https://www.mofa.go.jp/policy/economy/g20_summit/osaka19/en/documents/final_g20_osaka_leaders_declaration.html

AI principles

14

Fairness
Eliminate biases that cause unfairness so that AI can provide fair
services regardless of differences in user attributes.
• Bias in training data (input): historical bias, sampling bias
• Users with certain attributes cannot receive the service. And theycannot receive the same level of service as other users.

AccountabilityClarify where the cause of the error lies and who (or what) is
responsible for it.
→ In complex models, it may be difficult to identify where thecause of the problem lies.（ex. DNN）

Transparency
AI systems can present information that users can understand.
••

Information that should be presented model (processing criteria),
data was used to train it, validation, etc...
This is important when dealing with issues related to medical, safety
and policy making.

Explainability of ML methods

15In machine learning, there is a tradeoff between the complexity(= accuracy) of the problem and its explainability.
complexity

LOW expandability
model

Deep Neural Network（CNN, RNN, GAN）
Boosting / Bagging model(XGBoost, RF）

HIGH expandability
model

Tree model
Liner / LogisticRegression

Rule based modelexplainability

Explainability of ML methods
Tree model

16

Explainability of ML methods
CNN model

17

18

XAI methodu Global or Local explanation: Domains that the model can explain••

Global: Understand the overall behavior of AI models.
Local: Understand the reasoning behind each prediction.

Model in-dependent XAI

Global Explanation

PFI(Permutation Feature Importance)
・ Leave One Covariate Out FI
・ Grouped PFI
PD(Partial Dependence)
ICE(Individual Conditional Expectation)

SHAP(SHapley Additive exPlanations)
LIME

Local Explanation

Model dependent XAI
CAM/ Grad-CAM

Integrated Gradients

Tree Surrogate

Attention

Global XAI : PFI
PFI: Permutation Feature Importanceu A method for calculating the feature importance in models.
u Shuffle (permutation) the features sample data and evaluate
the importance based on the prediction error of the model.
Trained model𝑦 = 𝑓(𝑥)Error Function
Test data1920GlobaI XAI : PFI
PFI: Algorithmu A method for calculating the feature importance in models.
1. Calculate Baseline Prediction Error

3. Calculate shuffle dataʼsPrediction Error

Baseline prediction error

𝑒%&$' 𝑓 = 𝔼 𝐿 𝑓 𝑋( , 𝑦𝑒!"#$ 𝑓 = 𝔼 𝐿 𝑓 𝑥 , 𝑦Error evaluation index(ex. RMSE）
Trained model𝑦 = 𝑓(𝑥)Obs. Value

Prediction Value

4. Calculate FI index

𝑒%&$' 𝑓𝐹𝐼( =𝑒!"#$ 𝑓

2. Create shuffle data of feature𝑋!

Random Shuffle

Repeat to 2-4for all features

Collaboration of DCM and MLu XAI methods are powerful tools for more deep
understanding for DCM.

→ Especially, model in-dependent methods (PFI, PD, SHAP）isgood for us !

Thank you for your attention !

21