Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.19 KB

README.md

File metadata and controls

49 lines (36 loc) · 1.19 KB

transmit

The aim of this package is to enable simulations of information transmission using Poisson processes and Bayesian inference as described in this paper.

Installation

# Install the development version from GitHub:
# install.packages("devtools")
devtools::install_github("tom-christie/transmit")
require(transmit)

Example

Transmitting and decoding a signal

codebook <- construct_codebook(c('A', 'B', 'C', 'D'))
decoded_signal <- transmit_signal(
    codebook=codebook,
    symbol = 'A',
    signal_power = 5,
    noise_power = 10,
    duration_in_seconds = 10,
    time_interval = 0.1,
    entropy_threshold = 0.1,
    return_posterior_at_stop_time = TRUE
)
> decoded_signal$stop_time_in_seconds    
[1] 1.1
> decoded_signal$decoded_symbol
[1] "A"
> decoded_signal$posterior_at_stop_time
[[1]]
[1] 0.9899113279 0.0022606192 0.0001984631 0.0076295897

Creating a plot of an entropy trace

plot_entropy_decrease_trace(file_path='~/test.png')