Data Fields | |
| double | convex |
| char | do_metro |
| apop_model * | model |
| int | neval |
| int | ninit |
| int | npoint |
| arms_state * | state |
| double * | xinit |
| double | xl |
| double | xprev |
| double | xr |
For use with apop_arms_draw, to perform derivative-free adaptive rejection sampling with metropolis step.
That function generates default values for this struct if you do not attach one to the model beforehand, via a form like apop_model_add_group(your_model, apop_arms, .model=your_model, .xl=8, .xr =14);. If you initialize it manually via apop_settings_add_group, the model element is mandatory; you'll get a run-time complaint if you forget it.
| double apop_arms_settings::convex |
Adjustment for convexity
| char apop_arms_settings::do_metro |
Set to 'y' if the metropolis step is required (i.e., if you're not sure if the function is log-concave).
| apop_model * apop_arms_settings::model |
The model from which to draw. Mandatory. Must have either a log_likelihood or p method.
| int apop_arms_settings::neval |
On exit, the number of function evaluations performed
| int apop_arms_settings::ninit |
The length of xinit.
| int apop_arms_settings::npoint |
Maximum number of envelope points. I malloc space for this many doubles at the outset. Default = 1e5.
| double * apop_arms_settings::xinit |
A double* giving starting values for x in ascending order, e.g., (double *){1, 10, 100}. . Default: -1, 0, 1. If this isn't NULL, I need at least three items, and the length in ninit.
| double apop_arms_settings::xl |
Left bound. If you don't give me one, I'll use min[min(xinit)/10, min(xinit)*10].
| double apop_arms_settings::xprev |
For internal use; please ignore. Previous value from Markov chain.
| double apop_arms_settings::xr |
Right bound. If you don't give me one, I'll use max[max(xinit)/10, max(xinit)*10].