You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A sampler can be either exact or inexact with a bias.
Inexact samplers generate proposal distributions that need to be unweighted to become exact, e.g., by using the rejection method.
Therefore, an interface for proposal samplers and rejection samplers needs to be implemented.
where such a proposal sampler could be VEGAS or NIS.
The function train!() will train the model in NIS or optimize the adaptive grid in VEGAS.
Since the loss during training is often of interest for NIS, an array can be passed as input and will be mutated during training.
The global_params parameter in the constructor could include the number of coupling layers in NIS, the architecture of the subnets and the sampling batch size. train_params can include the max number of iterations and function calls for VEGAS or the number of epochs and the optimizer for NIS, just to name a few.
For the rejection sampler, the following needs to be implemented:
A rejection sampler needs to know the max weight of the proposal to perform unweighting. There are multiple ways this max weight could be obtained. It could be taken from the weights of the samples generated during training of the proposal sampler, N events could be generated to obtain a max weight during the construction of the rejection sampler, or the Adam optimizer could be used to find the max weight. global_params should include a parameter that decides the method of finding the max weight.
The text was updated successfully, but these errors were encountered:
A sampler can be either exact or inexact with a bias.
Inexact samplers generate proposal distributions that need to be unweighted to become exact, e.g., by using the rejection method.
Therefore, an interface for proposal samplers and rejection samplers needs to be implemented.
Suggested implementation
The following functions need to be implemented:
where such a proposal sampler could be VEGAS or NIS.
The function
train!()
will train the model in NIS or optimize the adaptive grid in VEGAS.Since the loss during training is often of interest for NIS, an array can be passed as input and will be mutated during training.
The
global_params
parameter in the constructor could include the number of coupling layers in NIS, the architecture of the subnets and the sampling batch size.train_params
can include the max number of iterations and function calls for VEGAS or the number of epochs and the optimizer for NIS, just to name a few.For the rejection sampler, the following needs to be implemented:
A rejection sampler needs to know the max weight of the proposal to perform unweighting. There are multiple ways this max weight could be obtained. It could be taken from the weights of the samples generated during training of the proposal sampler, N events could be generated to obtain a max weight during the construction of the rejection sampler, or the Adam optimizer could be used to find the max weight.
global_params
should include a parameter that decides the method of finding the max weight.The text was updated successfully, but these errors were encountered: