Data Fields | |
apop_model * | base_model |
double(* | constraint )(apop_data *, apop_model *) |
int | draw_ct |
gsl_vector * | last_params |
int | refct |
gsl_rng * | rng |
double | scale |
double(* | scaling )(apop_model *) |
For use with the apop_dconstrain model. See its documentation for an example.
apop_model * apop_dconstrain_settings::base_model |
The model, before constraint.
double(* apop_dconstrain_settings::constraint)(apop_data *, apop_model *) |
The constraint. Return 1 if the data is in the constraint; zero if out.
int apop_dconstrain_settings::draw_ct |
How many draws to make for calculating the in-constraint model density via random draws. Current default: 1e4.
gsl_vector * apop_dconstrain_settings::last_params |
The parameters used to calculate scale
. If these change, recalculate.
int apop_dconstrain_settings::refct |
For internal use.
gsl_rng * apop_dconstrain_settings::rng |
If you don't provide a scaling
function, I calculate the in-constraint model density via random draws. If no rng
is provided, I use a default RNG; see apop_rng_get_thread.
double apop_dconstrain_settings::scale |
After the scaling has been calculated, store it here. If you change the parameters of your base model, set this to zero to have the scaling recalculated.
double(* apop_dconstrain_settings::scaling)(apop_model *) |
Optional. Return the percent of the model density inside the constraint.