sam::Journal¶
#include <Journal.h>
Public Functions¶
Name | |
---|---|
Journal() =default | |
~Journal() =default | |
Journal(json & journal_config) Constructs a Journal from a JSON object. |
|
bool | review(std::vector< Submission > & s) Review the Submission. |
void | accept(const std::vector< Submission > & s) Accepts the Submission. |
void | reject(const std::vector< Submission > & s) Rejects the Submission. |
bool | isStillAccepting() const Indicates whether the Journal is still accepting outcomes or not. |
size_t | nStudies() const Returns the number of studies. |
size_t | nSubmissions() const Returns the number of publications. |
size_t | nRejected() const Returns the number of rejected publications. |
void | saveMetaAnalysis() Saves MetaAnalysis Results. |
void | saveSummaries() Saves Overall Summaries. |
void | storeMetaAnalysisResult(const MetaAnalysisOutcome & res) Stores the MetaAnalysisOutcome. |
void | savePublicationsPerSimSummaries() Saves the Per Simulation summary of Publications. |
void | clear() Clear the Journal. |
void | reset() Completely resets the Journal. |
void | prepareForMetaAnalysis() Prepares the Journal for running meta-analysis. |
void | runMetaAnalysis() Runs the meta-analysis methods. |
void | updateMetaStatsRunners() Updates the overall stats runners. |
std::vector< std::string > | Columns() Returns Journal's CSV header. |
Public Attributes¶
Name | |
---|---|
std::vector< Submission > | publications_list List of all accepted submissions, i.e., outcomes. |
std::vector< Submission > | rejection_list Rejected Submissions. |
arma::Row< float > | yi |
arma::Row< float > | vi The variance of the accepted submissions. |
arma::Row< float > | wi The weight of the accepted submissions, computed as 1./vi;. |
std::unique_ptr< ReviewStrategy > | review_strategy Journal's Selection Model/Strategy. |
Detailed Description¶
class sam::Journal;
Journal Class.
The Journal class mimics the behavior of a Journal. It deals with new publications as they are being submitted for review. It is equipped with a review strategy which is used to make a decision over the destiny of the newly submitted manuscript, ie., being accepted or rejected.
Additionally, it handles the meta-analysis calculation and reporting of those at the end of the simulation.
Public Functions Documentation¶
function Journal¶
Journal() =default
function ~Journal¶
~Journal() =default
function Journal¶
explicit Journal(
json & journal_config
)
Constructs a Journal from a JSON object.
Parameters:
- journal_config The journal configuration
This makes sure that everything in the Journal are set up correctly:
- Instantiates the Review Strategy
- Prepares the output files, and their column names
- Prepares the stat runners based on users preference
Removing the higher level information because I don't want them to be written to the config file again.
function review¶
bool review(
std::vector< Submission > & s
)
Review the Submission.
Parameters:
- subs A list of submissions
Return: Returns true
if the submission is accepted, otherwise it returns false.
Sends the submission to the review strategy, and based on its verdict it either accept() or reject() the submission.
function accept¶
void accept(
const std::vector< Submission > & s
)
Accepts the Submission.
Parameters:
- subs A list of submissions
Adds the accepted submission to the list of publications, and updates some of the necessary internals of the Journal to be able to keep track of the number of publications, studies, etc.
function reject¶
void reject(
const std::vector< Submission > & s
)
Rejects the Submission.
Parameters:
- subs A list of submissions
Adds the rejected submissions to the list of rejected submissions, and keeps the internal of the Journal up-to-date.
function isStillAccepting¶
inline bool isStillAccepting() const
Indicates whether the Journal is still accepting outcomes or not.
function nStudies¶
inline size_t nStudies() const
Returns the number of studies.
function nSubmissions¶
inline size_t nSubmissions() const
Returns the number of publications.
function nRejected¶
inline size_t nRejected() const
Returns the number of rejected publications.
function saveMetaAnalysis¶
void saveMetaAnalysis()
Saves MetaAnalysis Results.
Saves the meta analytics results.
function saveSummaries¶
void saveSummaries()
Saves Overall Summaries.
Saves the publications and meta stats runners.
function storeMetaAnalysisResult¶
void storeMetaAnalysisResult(
const MetaAnalysisOutcome & res
)
Stores the MetaAnalysisOutcome.
Adds the given meta analysis outcome to the list of collected meta-analysis.
function savePublicationsPerSimSummaries¶
void savePublicationsPerSimSummaries()
Saves the Per Simulation summary of Publications.
Saving the runner statistics of each batch of publications in Journal.
Resetting the runner statistics
function clear¶
void clear()
Clear the Journal.
Clears the history of publications, rejections, and runner statistics...
function reset¶
void reset()
Completely resets the Journal.
In addition to clearing the Journal, it resets some of the overall stats runners that are not usually being cleared by clear()
function prepareForMetaAnalysis¶
void prepareForMetaAnalysis()
Prepares the Journal for running meta-analysis.
This prepares the Journal for running meta-analysis. I mainly designed this to introduce some caching that I don't have to compute everything every time. So, with this, Journal prepares the vi, yi, and wi once and pass them to the meta analysis methods.
function runMetaAnalysis¶
void runMetaAnalysis()
Runs the meta-analysis methods.
Loops through the meta-analysis methods and run them, and update their stats runners
function updateMetaStatsRunners¶
void updateMetaStatsRunners()
Updates the overall stats runners.
Updates the overall meta stats runners.
function Columns¶
static std::vector< std::string > Columns()
Returns Journal's CSV header.
Public Attributes Documentation¶
variable publications_list¶
std::vector< Submission > publications_list;
List of all accepted submissions, i.e., outcomes.
variable rejection_list¶
std::vector< Submission > rejection_list;
Rejected Submissions.
variable yi¶
arma::Row< float > yi;
Caching variables The effect sizes of the accepted submissions.
variable vi¶
arma::Row< float > vi;
The variance of the accepted submissions.
variable wi¶
arma::Row< float > wi;
The weight of the accepted submissions, computed as 1./vi;.
variable review_strategy¶
std::unique_ptr< ReviewStrategy > review_strategy;
Journal's Selection Model/Strategy.
Updated on 29 June 2021 at 16:13:46 CEST