Usage
FindRate(x, px, y, rho.fn, D, tol = 1e-05, eps = 0.001, max.iters = Inf, slope.range = c(-100, 0), search.bracket = TRUE, max.search.steps = 10, rho.scale = TRUE, verbose = FALSE, ...)
Arguments
x
The input or source alphabet for the channel. Either a vector or a
matrix. For a vector, each element corresponds
to one symbol in the input alphabet. For a matrix, each row
corresponds to one symbol.
px
A vector of probabilities over the source alphabet. This vector
should sum to 1. The length of the vector should equal the number of
rows in x in the case that x is a matrix.
y
The output alphabet for the channel. This can either be a vector or
a matrix.
rho.fn
The cost function for the channel, defining rho.fn(x, y) over the
domain of x and y. This function should accept vectorized arguments.
D
The distortion level, for which the goal is to find the minimum
necessary information rate necessary to achieve this level of distortion.
tol
The desired accuracy (convergence tolerance) for searching along the
rate-distortion curve. This argument is passed to uniroot.
eps
Convergence parameter for the Blahut algorithm.
max.iters
Maximum number of iterations for each call to the Blahut algorithm.
slope.range
A vector of the form c(lower, upper) containing the range of slope
values along the rate-distortion curve to search for the optimal channel.
search.bracket
A logical value. If an optimal channel meeting the constraints
cannot be found in the initial search bracket, should the bracket be
extended to find a bracketing interval?
max.search.steps
If search.bracket is TRUE, the maximum number of times the bracket
should be extended before giving up.
rho.scale
An optional scaling parameter for the cost function. If set, the
cost used in the algorithm is rho.scale * rho.fn(x, y). This can be
useful for avoiding numerical overflow or underflow for badly scaled
cost functions.
verbose
A logical value indicating whether diagnostic information should be
displayed to the console during the algorithm.
...
Optional arguments that are passed to the cost function.