Skip to content

Commit

Permalink
various settings output
Browse files Browse the repository at this point in the history
  • Loading branch information
fradav committed Jul 8, 2020
1 parent 8bafa9b commit 71f9508
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/EstimParam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ EstimParamResults EstimParam_fun(Reftable<MatrixType> &myread,
auto nparam = myread.params_names.size();

nref = myread.nrec;
ntest = std::min(nref,ntest);

VectorXd y(nref);
switch(op) {
Expand Down Expand Up @@ -156,8 +157,11 @@ EstimParamResults EstimParam_fun(Reftable<MatrixType> &myread,
}

if (!quiet) {
const std::string& settings_filename = outfile + "_settings.txt";
const std::string& settings_filename = outfile + ".settings";
std::ofstream settings_file;
settings_file.open(settings_filename, std::ios::out);

settings_file << "Parameter estimation analyses proceeded using: " << std::endl;
settings_file << "- " << "Parameter name: " << parameter_of_interest << std::endl;
settings_file << "- " << "Scenario " << chosenscen << std::endl;
settings_file << "- " << myread.nrec << " simulated datasets" << std::endl;
Expand All @@ -168,6 +172,7 @@ EstimParamResults EstimParam_fun(Reftable<MatrixType> &myread,
settings_file << "- " << data_extended.cols() << " axes of summary statistics PLS linear combination" << std::endl;
}
settings_file << "- " << noisecols << " noise variables" << std::endl;
settings_file << "- " << ntest << " out-of-band samples used as test" << std::endl;
settings_file.close();
}

Expand Down
3 changes: 2 additions & 1 deletion src/ModelChoice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ ModelChoiceResults ModelChoice_fun(Reftable<MatrixType> &myread,
MatrixXd data_extended(n,0);

if (!quiet) {
const std::string& settings_filename = outfile + "_settings.txt";
const std::string& settings_filename = outfile + ".settings";
std::ofstream settings_file;
settings_file.open(settings_filename, std::ios::out);

settings_file << "Model choice analyses proceeded using: " << std::endl;
settings_file << "- " << myread.nrec << " simulated datasets" << std::endl;
settings_file << "- " << ntree << " trees" << std::endl;
settings_file << "- " << "Minimum node size of " << (minnodesize == 0 ? 1 : minnodesize) << std::endl;
Expand Down

0 comments on commit 71f9508

Please sign in to comment.