Skip to content

sam::ExperimentSetup

Module: Experiment Modules

Declaration of ExperimentSetup class. More...

#include <ExperimentSetup.h>

Public Functions

Name
void setObs(const json & config, size_t n_c, size_t n_d)
void setObs(Parameter< int > nobs, size_t n_c, size_t n_d)
void setObs(const arma::Row< int > & nobs, size_t n_c, size_t n_d)
ExperimentSetupBuilder create()
ExperimentSetup() =default
ExperimentSetup(json & config)
Constructs and initializes the ExperimentSetup.
int nc() const
Returns the number of conditions.
void setNC(int n_c)
Sets the number of conditions.
int nd() const
Returns the number of dependent variables in each conditions.
void setND(int n_d)
Sets the number of dependent variables in each group.
int ng() const
Returns the total number of groups.
int nreps() const
Returns the total number of planned replications.
void setNR(int n_reps)
Sets the number of replications.
const arma::Row< int > & nobs() const
Returns the original number of observations per group.
void randomize()
Randomizes the internal parameters of the Experiment, if necessary.

Public Attributes

Name
json tsp_conf
Test Strategy Parameters.
json dsp_conf
Data Strategy Parameters.
json esp_conf
Effect Estimator Parameters.

Friends

Name
class ExperimentSetupBuilder

Detailed Description

class sam::ExperimentSetup;

Declaration of ExperimentSetup class.

ExperimentSetup stores all the necessary parameters concerning the experiment design, e.g., number of conditions, number of dependent variables, etc. It also stores a copy of the data, test, and effect strategies' configurations.

Public Functions Documentation

function setObs

inline void setObs(
    const json & config,
    size_t n_c,
    size_t n_d
)

function setObs

inline void setObs(
    Parameter< int > nobs,
    size_t n_c,
    size_t n_d
)

function setObs

inline void setObs(
    const arma::Row< int > & nobs,
    size_t n_c,
    size_t n_d
)

function create

static ExperimentSetupBuilder create()

Return: An instance of the builder.

Create a new ExperimentSetup by invoking a ExperimentSetupBuilder.

function ExperimentSetup

ExperimentSetup() =default

function ExperimentSetup

explicit ExperimentSetup(
    json & config
)

Constructs and initializes the ExperimentSetup.

Parameters:

  • config A JSON configuration object

This set and calculates design parameters of the experiment. It also archives the definition of data, test, and effect strategies. These archives may later be retrieved by the Journal during the review process.

function nc

inline int nc() const

Returns the number of conditions.

function setNC

inline void setNC(
    int n_c
)

Sets the number of conditions.

function nd

inline int nd() const

Returns the number of dependent variables in each conditions.

function setND

inline void setND(
    int n_d
)

Sets the number of dependent variables in each group.

function ng

inline int ng() const

Returns the total number of groups.

This is an internal parameters and it's mainly used to iterate over conditions and dependent variables. It's calculated as n_g = n_c \times n_d

function nreps

inline int nreps() const

Returns the total number of planned replications.

function setNR

inline void setNR(
    int n_reps
)

Sets the number of replications.

function nobs

inline const arma::Row< int > & nobs() const

Returns the original number of observations per group.

function randomize

void randomize()

Randomizes the internal parameters of the Experiment, if necessary.

This randomizes all those parameters of the ExperimentSetup that are defined by a distribution

Public Attributes Documentation

variable tsp_conf

json tsp_conf;

Test Strategy Parameters.

variable dsp_conf

json dsp_conf;

Data Strategy Parameters.

variable esp_conf

json esp_conf;

Effect Estimator Parameters.

Friends

friend ExperimentSetupBuilder

friend class ExperimentSetupBuilder(
    ExperimentSetupBuilder 
);

Updated on 29 June 2021 at 16:13:47 CEST


Last update: 2021-09-18