Overview of Raft Consensus Algorithm

undefined
Sherwin Toribio
University of Wisconsin – La Crosse
Jason Rubbert
University of Wisconsin – La Crosse
Outline
Background
N-Mixture Model
Model violations and biased estimates
Bayesian method to detect model violations
Background
 
Estimating animal abundance is a major issue
in wildlife statistics
Two popular sampling methods:
Capture-recapture method
Extensive literature
Can be difficult to implement
Simple count method
Easier to implement
Statistical procedures are more complicated
Simple Count Data Matrix
N-Mixture Model (Royle,2004)
 
Observed counts:  X
ij
 ~ bin(N
i
 , p)
Site-specific abundance:  N
i
 ~ pois(
λ
)
Closure assumptions
Marginal Likelihood function:
Estimation Procedures
 
Classical Approach
λ
 and p can be estimated by maximizing the
marginal likelihood function.
Bayesian Approach
Inferences about parameters are based on their
posterior distributions
Ѳ has prior distribution g(Ѳ)
(y
1 
, y
2
 , ….,y
n
)  come from f(y|
Ѳ
)
Ѳ has posterior distribution g*(Ѳ) 
α
 f(
y
|
Ѳ
) g(Ѳ)
 
 
Bayesian Estimation
 
Model: X
ij
 ~ bin(N
i
,p), N
i
 ~ pois(
λ
)
Prior:
=logit(p)~ dflat()
=log(
λ
)~ dflat()
Joint posterior distribution
Using MCMC
 
The joint posterior distribution is too
complicated to be studied analytically
Simulate samples from this joint posterior
distribution using MCMC.
Employed WinBUGS  (10,000 values after
burn-in of 1,000 values).
Bayesian estimates can be obtained by
summarizing the simulated samples.
Simulation Study
 
Employed R with the “R2WinBUGS” package
Different Scenarios
No. of sites = (20, 50)
λ
 = (2, 5, 10)
p = (.25, .50)
No. of visits = (3, 5, 8)
Bayesian vs. Classical
Bayesian Estimates
N-Mixture Model Assumptions
 
Requires a set of assumptions in order to be
accurate
Common detection probability, p
Can differ with multiple observers
Location homogeneity
Different location might affect detection probability
Population size remains constant
Does not consider births, deaths, migration
What happens when some of these
assumptions are violated?
Pseudo-Replicated Data
 
Data with extra variability
Simulate Ni ~ pois(
λ
)
N
ij
 = N
i
 + bin(m

 – bin(m,

)
X
ij
 ~ bin(N
ij
,p)
 
Relative increase in variability of X
ij
.


 mp
2
/p
 
Simulation Results (
=5)
(Toribio, Gray, & Liang, 2011)
Simulation Results (
=2)
(Toribio, Gray, & Liang, 2011)
Simulation Results (
=10)
(Toribio, Gray, & Liang, 2011)
Simulation Results (p)
Some Remarks
 
When the model assumptions are satisfied, the
N-mixture model yields accurate  estimates.
When the closure assumption or the common
detection probability are violated, estimates of
the average abundance level (
) are biased high,
and estimates of the common detection
probability are biased low.
How do we know if the data do not satisfy the
model assumptions of the N-mixture model?
Posterior Predictive Dist
Posterior Pred.
 Sampling
Posterior Pred.
 Sampling
Discrepancy
 Measures
Results (
X
2
)
Results
 (
X
2
)
 – Power
 plot
Results 
(
X
2
)
Final Remarks
 
/ Future Work
 
Bayesian PPMC method is effective in
detecting some types of model violations.
 
Find other effective discrepancy measures.
 
Develop new models that will be able to take
into account the extra variability.
References
Royle, J.A., 2004, N-Mixture Models for Estimating Population Size
from Spatially Replicated Counts. 
Biometrics
, 60, 108 – 115.
Royle, J.A. and Dorazio, R.M., 2006, Hierarchical Models of Animal
Abundance and Occurrence. 
Journal of Agricultural, Biological, and
Environmental Statistics
, 80(4), 423 – 426.
Toribio, S.G., Gray, B.R., and Liang, S., 2009, An Evaluation of the
Bayesian approach to fitting the N-Mixture model for use with
pseudo-replicated count data.  
Journal of Statistical Computation &
Simulation.
R Development Core Team (2006). 
R: A language and environment for
statistical computing. 
R Foundation for Statistical Computing,
Vienna, Austria. ISBN 3-900051-07-0, URL 
http://www.R-project.org
.
Lunn, D.J., Thomas, A., Best, N. and Spielgelhalter, D., 2000,
WinBUGS – a Bayesian modelling framework: concepts, structure,
and extensibility. 
Statistics and Computing
, 10, 325 – 337.
 
URL http://www.mrc-bsu.cam.ca.uk.
Thank You!
Slide Note
Embed
Share

Raft is a consensus algorithm designed for understanding and building real systems. It ensures agreement on shared state, tolerates server failures, and eliminates single points of failure. Raft simplifies the complexity of state space compared to Paxos, making it performant and understandable for system builders. Explore the key concepts and benefits of Raft in this comprehensive overview.

  • Raft Consensus
  • Algorithm
  • Server Failures
  • State Replication
  • Distributed Systems

Uploaded on Mar 02, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. A BAYESIAN METHOD TO ASSESS THE N-MIXTURE MODELS USED IN THE ESTIMATION OF ANIMAL ABUNDANCE Sherwin Toribio University of Wisconsin La Crosse Jason Rubbert University of Wisconsin La Crosse

  2. Outline Background N-Mixture Model Model violations and biased estimates Bayesian method to detect model violations

  3. Background Estimating animal abundance is a major issue in wildlife statistics Two popular sampling methods: Capture-recapture method Extensive literature Can be difficult to implement Simple count method Easier to implement Statistical procedures are more complicated

  4. Simple Count Data Matrix Abundance site visit 1 visit 2 visit 3 . . visit T N1 1 X11 X12 X13 . . X1T N2 2 X21 X22 X23 . . X2T N3 3 X31 X32 X33 . . X3T . . . . . . . . . . . . . . . . . . . . NR R XR1 XR2 XR3 . . XRT

  5. N-Mixture Model (Royle,2004) Observed counts: Xij~ bin(Ni, p) Site-specific abundance: Ni~ pois( ) Closure assumptions Marginal Likelihood function:

  6. Estimation Procedures Classical Approach and p can be estimated by maximizing the marginal likelihood function. Bayesian Approach Inferences about parameters are based on their posterior distributions has prior distribution g( ) (y1 , y2, .,yn) come from f(y| ) has posterior distribution g*( ) f(y| ) g( )

  7. Bayesian Estimation Model: Xij~ bin(Ni,p), Ni~ pois( ) Prior: =logit(p)~ dflat() =log( )~ dflat() Joint posterior distribution

  8. Using MCMC The joint posterior distribution is too complicated to be studied analytically Simulate samples from this joint posterior distribution using MCMC. Employed WinBUGS (10,000 values after burn-in of 1,000 values). Bayesian estimates can be obtained by summarizing the simulated samples.

  9. Simulation Study Employed R with the R2WinBUGS package Different Scenarios No. of sites = (20, 50) = (2, 5, 10) p = (.25, .50) No. of visits = (3, 5, 8)

  10. Bayesian vs. Classical R P N Estimator Median MMLE 40.15 20 2 0.50 40 Bayesian 41.49 MMLE 99.77 20 5 0.50 100 Bayesian 101.03 MMLE 99.75 50 2 0.50 100 Bayesian 102.58 MMLE 249.61 50 5 0.50 250 Bayesian 252.75

  11. Bayesian Estimates R P P estimate estimate 20 2 0.50 2.07 0.4890 50 2 0.50 2.02 0.4947 50 5 0.25 5.17 0.2427 50 5 0.50 5.06 0.4962

  12. N-Mixture Model Assumptions Requires a set of assumptions in order to be accurate Common detection probability, p Can differ with multiple observers Location homogeneity Different location might affect detection probability Population size remains constant Does not consider births, deaths, migration What happens when some of these assumptions are violated?

  13. Pseudo-Replicated Data Data with extra variability Simulate Ni ~ pois( ) Nij= Ni+ bin(m ) bin(m, ) Xij~ bin(Nij,p) Relative increase in variability of Xij. ( ) mp2/p

  14. Simulation Results (=5) (Toribio, Gray, & Liang, 2011)

  15. Simulation Results (=2) (Toribio, Gray, & Liang, 2011)

  16. Simulation Results (=10) (Toribio, Gray, & Liang, 2011)

  17. Simulation Results (p) P R T estimate P estimate 10 .7 20 5 10.03 0.6967 10 (.5, .6, .7, .8, .9) 20 5 16.87 0.4160 10 (.3, .4, .5, .6, .7) 20 5 24.15 0.2101 10 (.1, .2, .3, .4, .5) 20 5 49.07 0.0611 10 (.5, .55, .6, .65, .7) 20 5 11.78 0.5107 10 (.1, .2, .3, .4, .5) 50 5 43.16 0.0692 5 (.5, .6, .7, .8, .9) 20 5 6.04 0.5827 10 (.5, .525, .55, .575, .6, .625, .65, .675, .7) 20 9 11.23 0.5385 20 (.5, .6, .7, .8, .9) 20 5 57.36 0.2448

  18. Some Remarks When the model assumptions are satisfied, the N-mixture model yields accurate estimates. When the closure assumption or the common detection probability are violated, estimates of the average abundance level ( ) are biased high, and estimates of the common detection probability are biased low. How do we know if the data do not satisfy the model assumptions of the N-mixture model?

  19. Posterior Predictive Dist

  20. Posterior Pred. Sampling

  21. Posterior Pred. Sampling Discrepancy Measures

  22. Results (X2) P R 20 20 20 20 20 35 50 20 20 T 5 5 5 5 5 5 5 5 9 estimate 10.03 49.07 24.150 16.87 11.780 44.34 43.16 6.040 11.230 P estimate 0.6967 0.06110 0.21010 0.41600 0.5107 0.06778 0.06918 0.5827 0.5385 Power 0* 0.428 0.738 0.957 0.082 0.642 0.794 0.35 0.096 10 10 10 10 10 10 10 5 10 .7 (no violation) (.1, .2, .3, .4, .5) (.3, .4, .5, .6, .7) (.5, .6, .7, .8, .9) (.5, .55, .6, .65, .7) (.1, .2, .3, .4, .5) (.1, .2, .3, .4, .5) (.5, .6, .7, .8, .9) (.5 ->.7; by .25) 20 (.5, .6, .7, .8, .9) 20 5 57.36 0.24480 0.999

  23. Results (X2) Power plot 1.2 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 = 5 = 10 = 20 R = 20 R = 35 R = 50

  24. Results (X2) Scenario Estimate P Estimate Power 12.25 0.6327 16.44 0.5132 37.61 0.2589 12.33 0.4688 23.64 0.1981 Inc. abundance; m=1; =.5 Inc. abundance; m=2; =.5 Inc. abundance; m=4; =.5 Dec. abundance; =.1 Dec. abundance; =.2 0.024 0.508 0.981 0.428 0.910 1.5 1 =.2 m=4; =.5 0.5 m=2; =.5 =.1 m=1; =.5 0

  25. Final Remarks / Future Work Bayesian PPMC method is effective in detecting some types of model violations. Find other effective discrepancy measures. Develop new models that will be able to take into account the extra variability.

  26. References Royle, J.A., 2004, N-Mixture Models for Estimating Population Size from Spatially Replicated Counts. Biometrics, 60, 108 115. Royle, J.A. and Dorazio, R.M., 2006, Hierarchical Models of Animal Abundance and Occurrence. Journal of Agricultural, Biological, and Environmental Statistics, 80(4), 423 426. Toribio, S.G., Gray, B.R., and Liang, S., 2009, An Evaluation of the Bayesian approach to fitting the N-Mixture model for use with pseudo-replicated count data. Journal of Statistical Computation & Simulation. R Development Core Team (2006). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, URL http://www.R-project.org. Lunn, D.J., Thomas, A., Best, N. and Spielgelhalter, D., 2000, WinBUGS a Bayesian modelling framework: concepts, structure, and extensibility. Statistics and Computing, 10, 325 337. URL http://www.mrc-bsu.cam.ca.uk.

  27. Thank You!

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#