SlideShare a Scribd company logo
1 of 22
Download to read offline
モデル勉強会
 Soetaert & Herman (2009) 輪読
Chapter 11 Testing and Validating the Model
             100710 in 東京
         玉木 一郎(森林文化アカデミー)



                                              1
Testing and Validating
       the Model
• このChapterでは考案したモデルがまっとう
 かどうか検証する

• モデルは正しかろうがそうでなかろうが,一
 応の答えを返してしまうため,検証の作業が
 必要不可欠

 ➡   モデルの挙動や安定性をチェック


                            2
このChapterの目次
11.1 Coupled BOD-O2 Model Revisited
11.2 Testing the Correctness of the Model Solution
11.3 Testing the Internal Logic of the Model
11.4 Model Verification and Validity
11.5 Model Sensitivity
11.6 Case Studies in R
 11.6.1 Time-Varying Oxygen Consumption in a Small
        Cylindrical Organism
 11.6.2 R for Validation and Verification
 11.6.3 Univariate Local Sensitivity Analysis
 11.6.4 Bivariate Local Sensitivity Analysis


                                                     3
Coupled BOD-O2 model
                            r:BODの減衰率
   dBOD
        = −r · BOD          O2*:飽和酸素濃度

     dt                     k:再曝気系数


     dO2
         = −r · BOD + k · (O2 − O2)
                             ∗
      dt
                                            Fig. 11.1 Coupled BOD-O2
                                            モデルのイメージ図
 解析解(analytical solution)
BODt = BOD0 · e−r·t

                e−k·t − e−r·t
 O2t = BOD0 · r               + O20 · e−k·t
                                            + O2 · (1 − e
                                                ∗        −k·t
                                                              )
                   k−r
                                                                       4
モデルは正しく解かれて
        いるのか?
                                         •   モデルが正しく解か
                                             れているかどうかの
                                             かの確認(model
                                             verification)


                                         •   解析解の結果を数値
                                             解の結果と比較


                                         •   Coupled BOD-O2
                                             モデルの場合は2者
                                             が一致するのでOK
Fig. 11.2 A Coupled BOD-O2モデルの解析解と数値解の
結果
                                                              5
モデルの前提条件の
            チェック
•   State variablesは常に正の値を示しているか?
    例 )密度やバイオマス,濃度は負の値をとらない

     ある物質の移動がソースとなるコンパートメント
     の濃度に依存していない場合

     ➡   Rate limiting termを設定する必要

     正しくない積分方法(Section 6.2)や近似(Section
     6.4)を行った場合に,負の値を示すことも



                                         6
Coupled BOD-O2
               モデルの改良
dBOD                 O2                             •   もとのモデルの仮定で
      = −r · BOD ·                                      は,O2の量と無関係に
  dt               O2 + ks
  dO2                O2                                 BODが減少
      = −r · BOD ·         + k · (O2∗ − O2)
   dt              O2 + ks
                                                    •   O2の再曝気がほとんど
                                                        ない場合(k = 0.01)に
                                                        は,O2が負の値を示し
                                                        てしまう...


                                                    •   O2によるrate
                          Fig. 11.2 B Rate limitation   limitation termの追加
                          termを追加した場合のO2の
                          挙動(実線)と元のモデルの
                          挙動(破線)                                             7
モデルの挙動は
       予想どおり?

• モデルの挙動が期待と異なる場合
 ➡   どこかに不具合があるのかもしれない

 ➡   (モデル屋じゃない)同僚にモデルの内容
     を説明し,その際に生じた批判や疑問を検
     討することで不具合を発見できるかも...



                            8
モデルの当てはまりの
    チェック
• モデルの予測値とデータを見比べる
  一致する

  ➡   とりあえずOKだけど,それは誤っている
      のを立証できないだけなことに注意

  食い違う

  ➡   再検討する必要


                            9
モデルの当てはまりの
    チェック

• データとモデルが食い違う場合
  データの精度はOK?

  モデルの仮定はOK?

  パラメータ推定の方法はOK?


                   10
モデルの感受性


• 感受性分析(sensitivity analysis)
 ➡   モデルのパラメータ値を動かしたとき
     に予測値はどんな挙動を示すのか?
 ➡   Globalとlocalの2タイプ



                                11
Global sensitivity analysis

                                         • パラメータ値を比較的
                                          広いレンジで動かして
                                          モデルの予測値の挙動
                                          をさぐる

                                         • Coupled BOD-O モ
                                                       2

                                          デルでrを動かした場
                                          合のO2の(100日間中
                                          の)最小値の挙動

Fig. 11.2 C Coupled BOD-O2モデルのrを動かした時の
O2の最小値の挙動。もともとのrの値は0.05に設定
                                                             12
Local sensitivity analysis
                                          • パラメータ値を少しだ
                                           け動かしてモデルの
                                           個々の予測値の挙動を
                                           さぐる
                                                    ∆θj δyi
                                              Sij =
                                                    ∆yi δθj
                                             j番目のパラメータを動かした時の
                                             yのi番目の値の感受性



                                          • Coupled BOD-O モ     2

                                           デルでO2*を300から
                                           330に動かした場合の
Fig. 11.2 D Coupled BOD-O2モデルのO2*を300から    挙動
330に動かした時のO2の挙動
                                                                    13
感受性分析の活用

• パラメータが予測値に及ぼす影響をランク付
 けできる

 ➡   どのパラメータの影響力が最も強い?

• パラメータ間の相互作用
 ➡   Bivariate or multivariate sensitivity
     analysis


                                             14
Small cylindrical
organismの酸素消費の例
 1.0 hのbottom water


                            1 δA · J
 oxygenの濃度変化
                      δO2
                          =− ·       −Q
                       δt   A  δr
                      r:円柱の半径
                      L:円柱の長さ
                                                   δO2
                      A:円柱の表面積(A = 2πrL)
                                           J = −Da
                      J:diffusive flux                δr
                      Q:ゼロ次の酸素消費率




       external oxygen一定のもとでの解析解
                   Q 2                 R:最外装までの半径
          O2(r) =     (r − R2 ) + BW
                  4Da                  BW:bottom waterの酸素濃度

                                                              15
解析解と数値解の比較



                 Fig. 11.4 AB 10層(A)
                 と100層(B)の場合の解
                 析解(実線)と数値解
                 (丸)の比較




• 数値解は解析解に良く一致
• ここまではOK                          16
1時間の挙動をチェック

                       色が濃い程,酸素消費が
                       大きい




                       Fig. 11.4 CD Bottom
                       waterの1時間の変動
                       (C),1時間の各層におけ
                       る酸素消費動態




• BWは1時間のサイクルでサインカーブを描く
➡   その時の各層における酸素消費動態
                                        17
閉鎖系におけるバクテリア
   の炭素動態の例
dB         S
   =g·γ·        ·B−d·B−r·B
                             B:バイオマス(mol C m-3)

dt       S + ks              S:グルコース( mol C m-3)
                             g:最大同化率
                             ks:half-saturation constant
dS          S                ϒ:成長効率
   = −g ·        ·B+d·B
dt        S + ks             r:呼吸率
                             d:死亡率




                             Fig. 11.5 バクテリアの炭素動態
                             モデル(A),同モデルによるシ
                             ミュレーション結果



                                                           18
各パラメータを10%増やし
                            てみると...
                         Bini                                        Sini                                            gmax

                                                      50
          40                                                                                           40
                                                      40
molC/m3




                                            molC/m3




                                                                                             molC/m3
                                                                                                                                              •
          30                                          30                                               30
          20
          10
                                                      20
                                                      10
                                                                                                       20
                                                                                                       10
                                                                                                                                                  gmaxとeffで全期
           0                                           0                                                0

               0   10   20   30   40   50                  0   10   20        30   40   50                  0   10   20        30   40   50
                                                                                                                                                  間をとおしてバク
                         hour                                        hour                                             hour
                                                                                                                                                  テリアのバイオマ
                         eff                                             ks                                               rB                      スに影響
          50
                                                      40                                               40
          40
molC/m3




                                            molC/m3




                                                                                             molC/m3
                                                      30                                               30


                                                                                                                                              •
          30

                                                                                                                                                  Siniはグルコース
          20                                          20                                               20
          10                                          10                                               10
           0                                           0                                                0

               0   10   20   30   40   50                  0   10   20        30   40   50                  0   10   20        30   40   50       濃度がかなり低下
                         hour                                        hour                                             hour
                                                                                                                                                  した後でバイオマ
                         dB
                                                                                                       Fig. 11.6 バクテリアの                           スに影響
          40
                                                                                                       炭素動態モデルの各パラ
molC/m3




          30                                                             perturbed
          20                                                             reference                     メータの値を10%増加さ
          10
           0                                                                                           せた場合のバクテリアの
               0   10   20   30   40   50                                                              バイオマス
                         hour
                                                                                                                                                               19
Sijの計算
             Fig. 11.7 バクテリアの                     Bini          ∆θj δyi
       250                                        Sini    Sij =
             炭素動態モデルの各時間
             断面における各パラメー
                                                  gmax
                                                  eff
                                                                ∆yi δθj
             タの感受性                                ks
       200
                                                  rB      δyi   yi |θj − yi |θj
                                                                     ∗
                                                  dB          ≈      ∗
       150                                                δθj       θj − θj
Sens




                                                         • S は時間とともに変化
       100
                                                           ij

       50



         0
                                                         • いくつかのパラメータ
                                                          は良く似た挙動を示す
             0      10      20          30   40     50

                                 tout                                             20
全体での感受性の評価
                                 
                                     n
                                 1 
        δSqr    δAbs
                          Sqr
                         δj     = ·      2
                                         Sij
                                   n i=1
Bini    9.59    5.21
                                    n
                                    
Sini    28.62   19.57            1
                          Abs
                         δj     = ·    |Sij |
                                 n i=1
gmax    58.88   29.51
                        (テキストの11.12式はiとjが逆でないか?)
 eff     62.43   37.12
 ks     0.37    0.17
                        •   ksの変化は推定値にそれ
                            ほど影響を与えなそう
 rB     4.65    3.47
dB      2.98    2.06
                        •   gmaxとeffの影響が大き
                            そう
                                                21
Bivariate Local
                                                       Sensitivity Analysis
                                                             Sensitivity functions
                                        0     20        40                                         0    100 200                                                   −10   −6      −2

                                                                                                                                                                                     40
                                                                                                                                                                                     30
                                                                                                                                                                                           •   ksをのぞいて総当たりの
            Bini                              −0.5                          1                              0.9                                −0.21                     −0.68        20
                                                                                                                                                                                     10
                                                                                                                                                                                               散布図を作ってチェック
                                                                                                                                                                                     0
 50   !
      !
      !
      !
      !
      !



                                                                                                                                                                                           •
      !
 40   !
      !
      !
      !
      !

                                                                                                                                                                                               gmaxとBini,effと
      !
 30
 20
                 !
                                              Sini                       −0.45                           −0.061                               −0.58                     −0.18
 10
  0    !!! ! ! ! !!!!! ! !
       !!!! !! !
       !!! !
        !!!
        !!
                                    !


                                    !     !
                                                                                                                                                                                               gmaxで相関が高い
                                !        !                                                                                                                                           250
                            !            !
                        !               !                                                                                                                                            200

              !!!!
                  !!
                  !
                    !                   !
                                        !
                                        !
                                        !
                                        !
                                        !
                                        !
                                                   !
                                                                       gmax                               0.92                                −0.26                     −0.72        150
                                                                                                                                                                                     100
             !                          !
            !!                          !                                                                                                                                            50
                                                                                                                                                                                                   gmaxの増加によって
            !                           !
                                        !
                                                                                                                                                                                               ➡
           !
           !                            !
         !!
        !!
        !!
        !!
          !
         !!                             !
                                        !
                                        !
      !!
      !!
      !
                                        !              !!!!!!
                                                       !!!!!
                                                       !!!!!
                                                        !!!!!
                                                        !!                                                                                                                           0
                                    !     !                                                    !
250
200
                  ! !
                        !
                            !
                                !
                                        !
                                        !
                                         !
                                         !
                                                   !                          !!
                                                                                   !
                                                                                       !
                                                                                           !
                                                                                                                                                                                                   もたらされるoutput
150
                 !
                  !
                   !                    !
                                        !
                                        !                                   !
                                                                             !
                                                                              !
                                                                                                          eff                                 −0.56                     −0.89
                                                                                                                                                                                                   の増加は,Biniの増
100           !!!                       !
                                        !
                                        !                                !!!
             !                          !                               !
 50   ! !!!
      ! !!
      ! !!!
            !
            !                           !
                                        !
                                        !
                                        !
                                        !              !!!!!!
                                                        !!!!!
                                                       !!!!!
                                                       !!!!!
                                                        !!        ! !!
                                                                  ! !!
                                                                     !
                                                                     !
                                                                     !
                                                                       !
                                                                       !
       !!
       !!
        !!                              !
                                        !                          !!
  0    !!                               !                          !
                                                                   !
                                                                   !



      !
      !
      !
      !
      !
        !!
        !!
        !!
         !!
         !!
          !!!
           !!!!
             !
              !!!
                                        !
                                        !
                                        !
                                        !
                                        !
                                        !
                                        !
                                        !
                                        !
                                        !
                                        !                  !
                                                            !
                                                            !     !
                                                                  !
                                                                  !
                                                                  !
                                                                   !!
                                                                    !
                                                                    !
                                                                    !!
                                                                     !
                                                                  ! !!
                                                                      !
                                                                      !!
                                                                       !!!
                                                                         ! !
                                                                                                   !
                                                                                                   !
                                                                                                   !
                                                                                                   !!
                                                                                                    !
                                                                                                    !!
                                                                                                     !
                                                                                                     !
                                                                                                     !!!
                                                                                                      !!
                                                                                                      !!
                                                                                                      ! !
                                                                                                      ! !!
                                                                                                                                                                                     0
                                                                                                                                                                                     −2            加によってもまた,
      !
      !
      !          !                      !                 !
                                                          !
                                                           !      !
                                                                  !
                                                                  !         !                         ! !!
                                                                                                      !                                                                              −4
                                                                                                                                               rB
      !           !                     !                !!       !          !                        !
                                                                                                      !

                                                                                                                                                                                                   もたらされる
      !            !                    !                         !           !                            !
      !
      !
      !
      !             !                   !               !
                                                        !
                                                        !
                                                         !        !
                                                                  !
                                                                  !
                                                                  !            !                      !
                                                                                                      !
                                                                                                      !
                                                                                                      !     !                                                           0.86         −6
      !
      !
      !            ! !                  !          !   !
                                                       !
                                                       !          !
                                                                  !
                                                                  !            !!                    !
                                                                                                     !!       !
      !
      !                !                !             !
                                                      !           !
                                                                  !               !                  !
                                                                                                     !          !
      !
      !
      !                  !               !           !
                                                     !
                                                     !
                                                     !
                                                                  !
                                                                  !
                                                                  !                 !                !
                                                                                                     !
                                                                                                     !            !                                                                  −8
                                !        !                                                 !                               !                                                         −10
                                    !     !                                                    !                               !

  0   !!!!
        !!
        !!
        !
      ! !!!
      ! !!!
                                        !
                                        !
                                        !
                                        !                     !
                                                              !   !!!
                                                                   !!
                                                                  ! !!
                                                                    !
                                                                  ! !!
                                                                                                   !
                                                                                                   !
                                                                                                   ! !
                                                                                                   !!!
                                                                                                    !
                                                                                                    !!
                                                                                                     !                                                    ! !!
                                                                                                                                                        !! !
                                                                                                                                                        !! !
                                                                                                                                                            !
                                                                                                                                                         !! !
                                                                                                                                                            !!
                                                                                                                                                             !!
      ! !!                              !                    !    ! !!                               !
                                                                                                     !
                                                                  ! !!                                                                                !! !
                                                                                                                                                                                      Fig. 11.8 バクテリアの炭素動態モデ
      !                                 !                   !
                                                            !!        !                               !
                                                                                                      !!                                             !! !
                                                                                                                                                     !! !
 −2   !
      !
      !
      !
           !!
            !
                                        !
                                        !
                                        !                 !
                                                          !
                                                           !
                                                           !
                                                           !!     !
                                                                  !
                                                                  !
                                                                  !     !                             !!
                                                                                                      !
                                                                                                      ! !!
                                                                                                     ! !!                                      !!
                                                                                                                                              !!
                                                                                                                                                 !
                                                                                                                                                 !
                                                                                                                                                 ! !!
                                                                                                                                                   !!
                                                                                                                                                  !! !!
                                                                                                                                                  !! !!
      !
      !      !!                         !
                                        !               !!
                                                         !
                                                         !        !
                                                                  !     ! !                                                                 !!!!
                                                                                                                                              !!
                                                                                                                                             !!        !
 −4   !
      !
      !        !                        !              !
                                                       !
                                                       !!
                                                        !         !
                                                                  !
                                                                  !        !                         !
                                                                                                     !
                                                                                                     !     !!                               !!
                                                                                                                                           !!
                                                                                                                                           !!
                                                                                                                                           !!
                                                                                                                                           !!       !!
                                                                                                                                                                        dB
                !                       !                                   !
                 !                      !                                    !                               !                                     !
 −6              ! !!                   !                                     !                               !!                                 !

 −8                     !
                            !
                                        !
                                        !
                                         !
                                                   !                          !!
                                                                                   !
                                                                                       !
                                                                                                               !
                                                                                                                   !
                                                                                                                       !                   !
                                                                                                                                             !
                                                                                                                                               !
                                                                                                                                               !
                                                                                                                                                                                      ルのksを除いた全パラメータの各時間
                                !        !                                                 !                               !           !
−10                                 !     !                                                    !                               !   !
                                                                                                                                                                                      断面におけるSijの総当たり散布図
       0        20              40                                 0     100 200                                                   −10         −6       −2
                                                                                                                                                                                                               22

More Related Content

Recently uploaded

リアル戦国探究in米沢 当日講座3スライド(スタッフ共有用)『糧は三度はさいせず』についてのスライド
リアル戦国探究in米沢 当日講座3スライド(スタッフ共有用)『糧は三度はさいせず』についてのスライドリアル戦国探究in米沢 当日講座3スライド(スタッフ共有用)『糧は三度はさいせず』についてのスライド
リアル戦国探究in米沢 当日講座3スライド(スタッフ共有用)『糧は三度はさいせず』についてのスライドKen Fukui
 
TEAMIN Service overview for customer_20240422.pdf
TEAMIN Service overview for customer_20240422.pdfTEAMIN Service overview for customer_20240422.pdf
TEAMIN Service overview for customer_20240422.pdfyukisuga3
 
リアル戦国探究in米沢 当日講座1(スタッフ共有用)『兵は詐をもって立つ』についてのスライド
リアル戦国探究in米沢 当日講座1(スタッフ共有用)『兵は詐をもって立つ』についてのスライドリアル戦国探究in米沢 当日講座1(スタッフ共有用)『兵は詐をもって立つ』についてのスライド
リアル戦国探究in米沢 当日講座1(スタッフ共有用)『兵は詐をもって立つ』についてのスライドKen Fukui
 
リアル戦国探究in米沢 事前講座1スライド(スタッフ共有用)『川中島の謎』についてのスライド
リアル戦国探究in米沢 事前講座1スライド(スタッフ共有用)『川中島の謎』についてのスライドリアル戦国探究in米沢 事前講座1スライド(スタッフ共有用)『川中島の謎』についてのスライド
リアル戦国探究in米沢 事前講座1スライド(スタッフ共有用)『川中島の謎』についてのスライドKen Fukui
 
ゲーム理論 BASIC 演習105 -n人囚人のジレンマモデル- #ゲーム理論 #gametheory #数学
ゲーム理論 BASIC 演習105 -n人囚人のジレンマモデル- #ゲーム理論 #gametheory #数学ゲーム理論 BASIC 演習105 -n人囚人のジレンマモデル- #ゲーム理論 #gametheory #数学
ゲーム理論 BASIC 演習105 -n人囚人のジレンマモデル- #ゲーム理論 #gametheory #数学ssusere0a682
 
UniProject Workshop Make a Discord Bot with JavaScript
UniProject Workshop Make a Discord Bot with JavaScriptUniProject Workshop Make a Discord Bot with JavaScript
UniProject Workshop Make a Discord Bot with JavaScriptyuitoakatsukijp
 
リアル戦国探究in米沢 事前講座2スライド(スタッフ共有用)『両雄の強さの秘密』についてのスライド
リアル戦国探究in米沢 事前講座2スライド(スタッフ共有用)『両雄の強さの秘密』についてのスライドリアル戦国探究in米沢 事前講座2スライド(スタッフ共有用)『両雄の強さの秘密』についてのスライド
リアル戦国探究in米沢 事前講座2スライド(スタッフ共有用)『両雄の強さの秘密』についてのスライドKen Fukui
 
リアル戦国探究in米沢 当日講座2スライド(スタッフ共有用)『人を致すも人に致されず』についてのスライド
リアル戦国探究in米沢 当日講座2スライド(スタッフ共有用)『人を致すも人に致されず』についてのスライドリアル戦国探究in米沢 当日講座2スライド(スタッフ共有用)『人を致すも人に致されず』についてのスライド
リアル戦国探究in米沢 当日講座2スライド(スタッフ共有用)『人を致すも人に致されず』についてのスライドKen Fukui
 

Recently uploaded (8)

リアル戦国探究in米沢 当日講座3スライド(スタッフ共有用)『糧は三度はさいせず』についてのスライド
リアル戦国探究in米沢 当日講座3スライド(スタッフ共有用)『糧は三度はさいせず』についてのスライドリアル戦国探究in米沢 当日講座3スライド(スタッフ共有用)『糧は三度はさいせず』についてのスライド
リアル戦国探究in米沢 当日講座3スライド(スタッフ共有用)『糧は三度はさいせず』についてのスライド
 
TEAMIN Service overview for customer_20240422.pdf
TEAMIN Service overview for customer_20240422.pdfTEAMIN Service overview for customer_20240422.pdf
TEAMIN Service overview for customer_20240422.pdf
 
リアル戦国探究in米沢 当日講座1(スタッフ共有用)『兵は詐をもって立つ』についてのスライド
リアル戦国探究in米沢 当日講座1(スタッフ共有用)『兵は詐をもって立つ』についてのスライドリアル戦国探究in米沢 当日講座1(スタッフ共有用)『兵は詐をもって立つ』についてのスライド
リアル戦国探究in米沢 当日講座1(スタッフ共有用)『兵は詐をもって立つ』についてのスライド
 
リアル戦国探究in米沢 事前講座1スライド(スタッフ共有用)『川中島の謎』についてのスライド
リアル戦国探究in米沢 事前講座1スライド(スタッフ共有用)『川中島の謎』についてのスライドリアル戦国探究in米沢 事前講座1スライド(スタッフ共有用)『川中島の謎』についてのスライド
リアル戦国探究in米沢 事前講座1スライド(スタッフ共有用)『川中島の謎』についてのスライド
 
ゲーム理論 BASIC 演習105 -n人囚人のジレンマモデル- #ゲーム理論 #gametheory #数学
ゲーム理論 BASIC 演習105 -n人囚人のジレンマモデル- #ゲーム理論 #gametheory #数学ゲーム理論 BASIC 演習105 -n人囚人のジレンマモデル- #ゲーム理論 #gametheory #数学
ゲーム理論 BASIC 演習105 -n人囚人のジレンマモデル- #ゲーム理論 #gametheory #数学
 
UniProject Workshop Make a Discord Bot with JavaScript
UniProject Workshop Make a Discord Bot with JavaScriptUniProject Workshop Make a Discord Bot with JavaScript
UniProject Workshop Make a Discord Bot with JavaScript
 
リアル戦国探究in米沢 事前講座2スライド(スタッフ共有用)『両雄の強さの秘密』についてのスライド
リアル戦国探究in米沢 事前講座2スライド(スタッフ共有用)『両雄の強さの秘密』についてのスライドリアル戦国探究in米沢 事前講座2スライド(スタッフ共有用)『両雄の強さの秘密』についてのスライド
リアル戦国探究in米沢 事前講座2スライド(スタッフ共有用)『両雄の強さの秘密』についてのスライド
 
リアル戦国探究in米沢 当日講座2スライド(スタッフ共有用)『人を致すも人に致されず』についてのスライド
リアル戦国探究in米沢 当日講座2スライド(スタッフ共有用)『人を致すも人に致されず』についてのスライドリアル戦国探究in米沢 当日講座2スライド(スタッフ共有用)『人を致すも人に致されず』についてのスライド
リアル戦国探究in米沢 当日講座2スライド(スタッフ共有用)『人を致すも人に致されず』についてのスライド
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Model Seminar100710tamaki

  • 1. モデル勉強会 Soetaert & Herman (2009) 輪読 Chapter 11 Testing and Validating the Model 100710 in 東京 玉木 一郎(森林文化アカデミー) 1
  • 2. Testing and Validating the Model • このChapterでは考案したモデルがまっとう かどうか検証する • モデルは正しかろうがそうでなかろうが,一 応の答えを返してしまうため,検証の作業が 必要不可欠 ➡ モデルの挙動や安定性をチェック 2
  • 3. このChapterの目次 11.1 Coupled BOD-O2 Model Revisited 11.2 Testing the Correctness of the Model Solution 11.3 Testing the Internal Logic of the Model 11.4 Model Verification and Validity 11.5 Model Sensitivity 11.6 Case Studies in R 11.6.1 Time-Varying Oxygen Consumption in a Small Cylindrical Organism 11.6.2 R for Validation and Verification 11.6.3 Univariate Local Sensitivity Analysis 11.6.4 Bivariate Local Sensitivity Analysis 3
  • 4. Coupled BOD-O2 model r:BODの減衰率 dBOD = −r · BOD O2*:飽和酸素濃度 dt k:再曝気系数 dO2 = −r · BOD + k · (O2 − O2) ∗ dt Fig. 11.1 Coupled BOD-O2 モデルのイメージ図 解析解(analytical solution) BODt = BOD0 · e−r·t e−k·t − e−r·t O2t = BOD0 · r + O20 · e−k·t + O2 · (1 − e ∗ −k·t ) k−r 4
  • 5. モデルは正しく解かれて いるのか? • モデルが正しく解か れているかどうかの かの確認(model verification) • 解析解の結果を数値 解の結果と比較 • Coupled BOD-O2 モデルの場合は2者 が一致するのでOK Fig. 11.2 A Coupled BOD-O2モデルの解析解と数値解の 結果 5
  • 6. モデルの前提条件の チェック • State variablesは常に正の値を示しているか? 例 )密度やバイオマス,濃度は負の値をとらない ある物質の移動がソースとなるコンパートメント の濃度に依存していない場合 ➡ Rate limiting termを設定する必要 正しくない積分方法(Section 6.2)や近似(Section 6.4)を行った場合に,負の値を示すことも 6
  • 7. Coupled BOD-O2 モデルの改良 dBOD O2 • もとのモデルの仮定で = −r · BOD · は,O2の量と無関係に dt O2 + ks dO2 O2 BODが減少 = −r · BOD · + k · (O2∗ − O2) dt O2 + ks • O2の再曝気がほとんど ない場合(k = 0.01)に は,O2が負の値を示し てしまう... • O2によるrate Fig. 11.2 B Rate limitation limitation termの追加 termを追加した場合のO2の 挙動(実線)と元のモデルの 挙動(破線) 7
  • 8. モデルの挙動は 予想どおり? • モデルの挙動が期待と異なる場合 ➡ どこかに不具合があるのかもしれない ➡ (モデル屋じゃない)同僚にモデルの内容 を説明し,その際に生じた批判や疑問を検 討することで不具合を発見できるかも... 8
  • 9. モデルの当てはまりの チェック • モデルの予測値とデータを見比べる 一致する ➡ とりあえずOKだけど,それは誤っている のを立証できないだけなことに注意 食い違う ➡ 再検討する必要 9
  • 10. モデルの当てはまりの チェック • データとモデルが食い違う場合 データの精度はOK? モデルの仮定はOK? パラメータ推定の方法はOK? 10
  • 11. モデルの感受性 • 感受性分析(sensitivity analysis) ➡ モデルのパラメータ値を動かしたとき に予測値はどんな挙動を示すのか? ➡ Globalとlocalの2タイプ 11
  • 12. Global sensitivity analysis • パラメータ値を比較的 広いレンジで動かして モデルの予測値の挙動 をさぐる • Coupled BOD-O モ 2 デルでrを動かした場 合のO2の(100日間中 の)最小値の挙動 Fig. 11.2 C Coupled BOD-O2モデルのrを動かした時の O2の最小値の挙動。もともとのrの値は0.05に設定 12
  • 13. Local sensitivity analysis • パラメータ値を少しだ け動かしてモデルの 個々の予測値の挙動を さぐる ∆θj δyi Sij = ∆yi δθj j番目のパラメータを動かした時の yのi番目の値の感受性 • Coupled BOD-O モ 2 デルでO2*を300から 330に動かした場合の Fig. 11.2 D Coupled BOD-O2モデルのO2*を300から 挙動 330に動かした時のO2の挙動 13
  • 14. 感受性分析の活用 • パラメータが予測値に及ぼす影響をランク付 けできる ➡ どのパラメータの影響力が最も強い? • パラメータ間の相互作用 ➡ Bivariate or multivariate sensitivity analysis 14
  • 15. Small cylindrical organismの酸素消費の例 1.0 hのbottom water 1 δA · J oxygenの濃度変化 δO2 =− · −Q δt A δr r:円柱の半径 L:円柱の長さ δO2 A:円柱の表面積(A = 2πrL) J = −Da J:diffusive flux δr Q:ゼロ次の酸素消費率 external oxygen一定のもとでの解析解 Q 2 R:最外装までの半径 O2(r) = (r − R2 ) + BW 4Da BW:bottom waterの酸素濃度 15
  • 16. 解析解と数値解の比較 Fig. 11.4 AB 10層(A) と100層(B)の場合の解 析解(実線)と数値解 (丸)の比較 • 数値解は解析解に良く一致 • ここまではOK 16
  • 17. 1時間の挙動をチェック 色が濃い程,酸素消費が 大きい Fig. 11.4 CD Bottom waterの1時間の変動 (C),1時間の各層におけ る酸素消費動態 • BWは1時間のサイクルでサインカーブを描く ➡ その時の各層における酸素消費動態 17
  • 18. 閉鎖系におけるバクテリア の炭素動態の例 dB S =g·γ· ·B−d·B−r·B B:バイオマス(mol C m-3) dt S + ks S:グルコース( mol C m-3) g:最大同化率 ks:half-saturation constant dS S ϒ:成長効率 = −g · ·B+d·B dt S + ks r:呼吸率 d:死亡率 Fig. 11.5 バクテリアの炭素動態 モデル(A),同モデルによるシ ミュレーション結果 18
  • 19. 各パラメータを10%増やし てみると... Bini Sini gmax 50 40 40 40 molC/m3 molC/m3 molC/m3 • 30 30 30 20 10 20 10 20 10 gmaxとeffで全期 0 0 0 0 10 20 30 40 50 0 10 20 30 40 50 0 10 20 30 40 50 間をとおしてバク hour hour hour テリアのバイオマ eff ks rB スに影響 50 40 40 40 molC/m3 molC/m3 molC/m3 30 30 • 30 Siniはグルコース 20 20 20 10 10 10 0 0 0 0 10 20 30 40 50 0 10 20 30 40 50 0 10 20 30 40 50 濃度がかなり低下 hour hour hour した後でバイオマ dB Fig. 11.6 バクテリアの スに影響 40 炭素動態モデルの各パラ molC/m3 30 perturbed 20 reference メータの値を10%増加さ 10 0 せた場合のバクテリアの 0 10 20 30 40 50 バイオマス hour 19
  • 20. Sijの計算 Fig. 11.7 バクテリアの Bini ∆θj δyi 250 Sini Sij = 炭素動態モデルの各時間 断面における各パラメー gmax eff ∆yi δθj タの感受性 ks 200 rB δyi yi |θj − yi |θj ∗ dB ≈ ∗ 150 δθj θj − θj Sens • S は時間とともに変化 100 ij 50 0 • いくつかのパラメータ は良く似た挙動を示す 0 10 20 30 40 50 tout 20
  • 21. 全体での感受性の評価 n 1 δSqr δAbs Sqr δj = · 2 Sij n i=1 Bini 9.59 5.21 n Sini 28.62 19.57 1 Abs δj = · |Sij | n i=1 gmax 58.88 29.51 (テキストの11.12式はiとjが逆でないか?) eff 62.43 37.12 ks 0.37 0.17 • ksの変化は推定値にそれ ほど影響を与えなそう rB 4.65 3.47 dB 2.98 2.06 • gmaxとeffの影響が大き そう 21
  • 22. Bivariate Local Sensitivity Analysis Sensitivity functions 0 20 40 0 100 200 −10 −6 −2 40 30 • ksをのぞいて総当たりの Bini −0.5 1 0.9 −0.21 −0.68 20 10 散布図を作ってチェック 0 50 ! ! ! ! ! ! • ! 40 ! ! ! ! ! gmaxとBini,effと ! 30 20 ! Sini −0.45 −0.061 −0.58 −0.18 10 0 !!! ! ! ! !!!!! ! ! !!!! !! ! !!! ! !!! !! ! ! ! gmaxで相関が高い ! ! 250 ! ! ! ! 200 !!!! !! ! ! ! ! ! ! ! ! ! ! gmax 0.92 −0.26 −0.72 150 100 ! ! !! ! 50 gmaxの増加によって ! ! ! ➡ ! ! ! !! !! !! !! ! !! ! ! ! !! !! ! ! !!!!!! !!!!! !!!!! !!!!! !! 0 ! ! ! 250 200 ! ! ! ! ! ! ! ! ! ! !! ! ! ! もたらされるoutput 150 ! ! ! ! ! ! ! ! ! eff −0.56 −0.89 の増加は,Biniの増 100 !!! ! ! ! !!! ! ! ! 50 ! !!! ! !! ! !!! ! ! ! ! ! ! ! !!!!!! !!!!! !!!!! !!!!! !! ! !! ! !! ! ! ! ! ! !! !! !! ! ! !! 0 !! ! ! ! ! ! ! ! ! ! !! !! !! !! !! !!! !!!! ! !!! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !! ! ! !! ! ! !! ! !! !!! ! ! ! ! ! !! ! !! ! ! !!! !! !! ! ! ! !! 0 −2 加によってもまた, ! ! ! ! ! ! ! ! ! ! ! ! ! !! ! −4 rB ! ! ! !! ! ! ! ! もたらされる ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! 0.86 −6 ! ! ! ! ! ! ! ! ! ! ! ! ! !! ! !! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! −8 ! ! ! ! −10 ! ! ! ! 0 !!!! !! !! ! ! !!! ! !!! ! ! ! ! ! ! !!! !! ! !! ! ! !! ! ! ! ! !!! ! !! ! ! !! !! ! !! ! ! !! ! !! !! ! !! ! ! ! !! ! ! ! !! !! ! Fig. 11.8 バクテリアの炭素動態モデ ! ! ! !! ! ! !! !! ! !! ! −2 ! ! ! ! !! ! ! ! ! ! ! ! ! !! ! ! ! ! ! !! ! ! !! ! !! !! !! ! ! ! !! !! !! !! !! !! ! ! !! ! ! !! ! ! ! ! ! ! !!!! !! !! ! −4 ! ! ! ! ! ! ! !! ! ! ! ! ! ! ! ! !! !! !! !! !! !! !! dB ! ! ! ! ! ! ! ! −6 ! !! ! ! !! ! −8 ! ! ! ! ! ! !! ! ! ! ! ! ! ! ! ! ルのksを除いた全パラメータの各時間 ! ! ! ! ! −10 ! ! ! ! ! 断面におけるSijの総当たり散布図 0 20 40 0 100 200 −10 −6 −2 22