View source: R/14.2.2-strategy-binary-search.R
| binary_search_p_value | R Documentation |
Pure binary search algorithm for finding the p_value that achieves a target metric (final weight or total consumption).
binary_search_p_value(
target_value,
fit_type,
lower_bound,
upper_bound,
simulation_function,
tolerance = 0.001,
max_iterations = 25
)
target_value |
Target value (final weight or total consumption) |
fit_type |
Type of fitting ("weight" or "consumption") |
lower_bound |
Lower bound for p_value search |
upper_bound |
Upper bound for p_value search |
simulation_function |
Function that runs simulation and returns metric |
tolerance |
Tolerance for convergence |
max_iterations |
Maximum number of iterations |
List with fitted p_value and convergence information
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.