Pakman
ABCRejectionController Class Reference

#include <ABCRejectionController.h>

Inheritance diagram for ABCRejectionController:
Collaboration diagram for ABCRejectionController:

Classes

struct  Input
 

Public Member Functions

 ABCRejectionController (const Input &input_obj)
 
virtual ~ABCRejectionController () override=default
 
virtual void iterate () override
 
virtual Command getSimulator () const override
 
- Public Member Functions inherited from AbstractController
 AbstractController ()=default
 
virtual ~AbstractController ()=default
 
void assignMaster (std::shared_ptr< AbstractMaster > p_master)
 

Static Public Member Functions

static std::string help ()
 
static void addLongOptions (LongOptions &lopts)
 
static ABCRejectionControllermakeController (const Arguments &args)
 
- Static Public Member Functions inherited from AbstractController
static controller_t getController (const std::string &arg)
 
static std::string help (controller_t controller)
 
static void addLongOptions (controller_t controller, LongOptions &lopts)
 
static AbstractControllermakeController (controller_t controller, const Arguments &args)
 

Additional Inherited Members

- Protected Attributes inherited from AbstractController
std::shared_ptr< AbstractMasterm_p_master
 

Detailed Description

A Controller class implementing the ABC rejection algorithm.

The ABCRejectionController class implements the ABC rejection algorithm, which consists of the following steps:

  1. Sample a candidate parameter \(\theta^* \sim P(\theta)\), where \(P(\theta)\) is the prior distribution.
  2. Run simulation with \(\theta^*\) to generate simulated data \(D^* \sim P(D \mid \theta^*)\), where \(P(D \mid \theta^*)\) is the likelihood function.
  3. If \(d(D^*, D_0) \leq \epsilon\), accept \(\theta^*\), else reject. Here, \(d(\cdot, \cdot)\) is the distance function, \(D_0\) is the observed data, and \(\epsilon\) is the tolerance.

Steps 1–3 are repeated until the desired number of accepted parameters is reached.

For instructions on how to use Pakman with the ABC rejection controller, execute the following command

$ pakman rejection --help

Definition at line 41 of file ABCRejectionController.h.

Constructor & Destructor Documentation

◆ ABCRejectionController()

ABCRejectionController::ABCRejectionController ( const Input input_obj)

Construct from Input object.

Parameters
input_objInput object.

Definition at line 19 of file ABCRejectionController.cc.

◆ ~ABCRejectionController()

virtual ABCRejectionController::~ABCRejectionController ( )
overridevirtualdefault

Default destructor does nothing.

Member Function Documentation

◆ addLongOptions()

void ABCRejectionController::addLongOptions ( LongOptions lopts)
static

Add long command-line options.

Parameters
loptslong command-line options that the ABCRejectionController needs.

Definition at line 41 of file ABCRejectionControllerStatic.cc.

◆ getSimulator()

Command ABCRejectionController::getSimulator ( ) const
overridevirtual
Returns
simulator command.

Implements AbstractController.

Definition at line 106 of file ABCRejectionController.cc.

◆ help()

std::string ABCRejectionController::help ( )
static
Returns
help message string.

Definition at line 12 of file ABCRejectionControllerStatic.cc.

◆ iterate()

void ABCRejectionController::iterate ( )
overridevirtual

Iterates the ABCRejectionController. Should be called by a Master.

Implements AbstractController.

Definition at line 29 of file ABCRejectionController.cc.

◆ makeController()

ABCRejectionController * ABCRejectionController::makeController ( const Arguments args)
static

Create ABCRejectionController instance.

Parameters
argscommand-line arguments.
Returns
pointer to created ABCRejectionController instance.

Definition at line 52 of file ABCRejectionControllerStatic.cc.


The documentation for this class was generated from the following files: