Learn R Programming

FlywayNet (version 0.1.0)

get_observation_probability: Computes the probability of observations given the birds count from trajectories.

Description

Computes the probability of observations given the birds count from trajectories : P(O | Pi_[0:T])

Usage

get_observation_probability(obs, hidden_count, use_log = TRUE)

Arguments

obs

Matrix of I+2 rows and T+1 columns with observed bird counts. I is the numbers of sites, to which one adds the virtual sites 'death' and 'flight' and T is the horizon of the migration structure.

hidden_count

Matrix of I+2 rows and T+1 columns with simulated bird counts. As computed by function get_count

use_log

Boolean that states if the log probability should be returned.

Value

the probability (or log-probability) of the observed data given simulated counts.

Examples

Run this code
# NOT RUN {
migr <- generate_toy_migration()
traj <- generate_trajectories( migr )
get_observation_probability( migr$observation, get_counts( migr, traj ), use_log = FALSE)
# }

Run the code above in your browser using DataLab