Skip to content

sam::LinearModelStrategy

Module: Data Strategies

Linear Model Data Strategy. #include <DataStrategy.h>

Inherits from sam::DataStrategy

Public Classes

Name
struct Parameters
Parameters of LinearModelStrategy.

Public Functions

Name
LinearModelStrategy() =default
LinearModelStrategy(const Parameters p)
virtual void genData(Experiment * experiment) override
Generates data based on the selected DataModel.
virtual std::vector< arma::Row< float > > genNewObservationsForAllGroups(Experiment * experiment, int n_new_obs) override
Generates n_new_obs new observations for each group.

Additional inherited members

Public Types inherited from sam::DataStrategy

Name
enum DataModel

Public Functions inherited from sam::DataStrategy

Name
std::unique_ptr< DataStrategy > build(json & data_strategy_config)
DataStrategy Factory Method.
virtual ~DataStrategy() =0
Pure destructors of the DataStrategy abstract class.

Public Functions Documentation

function LinearModelStrategy

LinearModelStrategy() =default

function LinearModelStrategy

inline explicit LinearModelStrategy(
    const Parameters p
)

function genData

virtual void genData(
    Experiment * experiment
) override

Generates data based on the selected DataModel.

Parameters:

Reimplements: sam::DataStrategy::genData

Populates the experiment->groups_->measurements with data based on the parameters specified in setup.

Generates the samples

Generate the error terms if specified

This is ugly but it should work

function genNewObservationsForAllGroups

virtual std::vector< arma::Row< float > > genNewObservationsForAllGroups(
    Experiment * experiment,
    int n_new_obs
) override

Generates n_new_obs new observations for each group.

Parameters:

  • experiment The pointer to the current experiment
  • n_new_obs The number of new observations to be generated

Return: An array of new observations

Reimplements: sam::DataStrategy::genNewObservationsForAllGroups


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


Last update: 2021-09-18