Skip to content

sam::LatentDataStrategy

Module: Data Strategies

⚠️ TO BE IMPLEMENTED! More...

#include <DataStrategy.h>

Inherits from sam::DataStrategy

Public Functions

Name
LatentDataStrategy() =default
virtual void genData(Experiment * experiment) override
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.

Detailed Description

class sam::LatentDataStrategy;

⚠️ TO BE IMPLEMENTED!

Note: LatentDataStrategy will generate individual items, therefore it might be slower than other models.

Warning: To be implemented!

A Data Strategy for constructing a general Structural Equation Model.

Public Functions Documentation

function LatentDataStrategy

LatentDataStrategy() =default

function genData

virtual void genData(
    Experiment * experiment
) override

Reimplements: sam::DataStrategy::genData

Construct a structural equation model based on the given parameters specified in the ExperimentSetup. Beside experiment->measurements, LatentDataStrategy populates the experiment->items as well.

dvSigma->data = flatten(experiment->setup.getTrueValueOf("sigm")).data();

this->mainRngStream->mvnorm_n(allErrorMeans, allErrorsSigma, allErrors);

gsl_vector_set(itemMeans, r, gsl_stats_mean(tmpRow->data, 1, nobs));

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