Fleet  0.0.9
Inference in the LOT
Classes | Typedefs | Functions | Variables
Main.cpp File Reference
#include <cmath>
#include "Random.h"
#include "Singleton.h"
#include "Grammar.h"
#include "LOTHypothesis.h"
#include "Polynomial.h"
#include "ReservoirSample.h"
#include "PartialMCTSNode.h"
#include "MCMCChain.h"
#include "FleetArgs.h"
#include "Fleet.h"
Include dependency graph for Main.cpp:

Classes

class  MyHypothesis
 
class  MyMCTS
 

Typedefs

using D = double
 

Functions

double random_scale ()
 
std::pair< double, double > constant_proposal (double c)
 
double constant_prior (double c)
 
double max_posterior (const ReservoirSample< MyHypothesis > &rs)
 
void trim_overall_samples (const size_t N)
 This trims overall_samples to the top N different structures with the best scores. NOTE: This is a bit inefficient because we really could avoid adding structures until they have a high enough score (as we do in Top) but then if we did find a good sample, we'd have missed everything before... More...
 
int main (int argc, char **argv)
 

Variables

const double sdscale = 1.0
 
size_t nsamples = 100
 
size_t nstructs = 100
 
int polynomial_degree = -1
 
size_t BURN_N = 1000
 
const size_t trim_at = 5000
 
const size_t trim_to = 1000
 
double data_X_mean = NaN
 
double data_Y_mean = NaN
 
double data_X_sd = NaN
 
double data_Y_sd = NaN
 
MyHypothesis::data_t mydata
 
std::map< std::string, ReservoirSample< MyHypothesis > > overall_samples
 
std::function posterior = [](const MyHypothesis& h) {return h.posterior; }
 

Typedef Documentation

◆ D

using D = double

Function Documentation

◆ constant_prior()

double constant_prior ( double  c)

◆ constant_proposal()

std::pair<double,double> constant_proposal ( double  c)

◆ main()

int main ( int  argc,
char **  argv 
)

◆ max_posterior()

double max_posterior ( const ReservoirSample< MyHypothesis > &  rs)

◆ random_scale()

double random_scale ( )

◆ trim_overall_samples()

void trim_overall_samples ( const size_t  N)

This trims overall_samples to the top N different structures with the best scores. NOTE: This is a bit inefficient because we really could avoid adding structures until they have a high enough score (as we do in Top) but then if we did find a good sample, we'd have missed everything before...

Variable Documentation

◆ BURN_N

size_t BURN_N = 1000

◆ data_X_mean

double data_X_mean = NaN

◆ data_X_sd

double data_X_sd = NaN

◆ data_Y_mean

double data_Y_mean = NaN

◆ data_Y_sd

double data_Y_sd = NaN

◆ mydata

◆ nsamples

size_t nsamples = 100

◆ nstructs

size_t nstructs = 100

◆ overall_samples

std::map<std::string,ReservoirSample<MyHypothesis> > overall_samples

◆ polynomial_degree

int polynomial_degree = -1

◆ posterior

std::function posterior = [](const MyHypothesis& h) {return h.posterior; }

◆ sdscale

const double sdscale = 1.0

◆ trim_at

const size_t trim_at = 5000

◆ trim_to

const size_t trim_to = 1000