Commit 50d90839 authored by Steffen Schotthöfer's avatar Steffen Schotthöfer
Browse files

a) fixed small error in computeSetSize1D, b) DataGenerator output now with 12...

a) fixed small error in computeSetSize1D, b) DataGenerator output now with 12 decimals precision, d)datagenerator scripts now with more precision


Former-commit-id: 52dd0f37
parent 030be192
......@@ -40,7 +40,7 @@ ENTROPY_OPTIMIZER = NEWTON
%
NEWTON_FAST_MODE = NO
NEWTON_ITER = 1000000
NEWTON_EPSILON = 0.0001
NEWTON_EPSILON = 1e-7
NEWTON_STEP_SIZE = 0.7
NEWTON_LINE_SEARCH_ITER = 100000
%
......
......@@ -283,7 +283,7 @@ void DataGenerator1D::ComputeSetSize() {
}
_setSize = c;
}
if( _LMaxDegree == 3 ) {
else if( _LMaxDegree == 3 ) {
// Carefull: This computes only normalized moments, i.e. sampling for u_0 = 1, N1=0
unsigned c = 1;
double N1 = 0 + _settings->GetRealizableSetEpsilonU0();
......
......@@ -17,8 +17,10 @@
#include "toolboxes/sphericalbase.h"
#include "toolboxes/textprocessingtoolbox.h"
#include <iomanip>
#include <math.h>
#include <omp.h>
#include <sstream>
DataGeneratorBase::DataGeneratorBase( Config* settings ) {
_settings = settings;
......@@ -161,14 +163,21 @@ void DataGeneratorBase::PrintTrainingData() {
logCSV->info( uSolString + alphaString + "h" );
for( unsigned idx_set = 0; idx_set < _setSize; idx_set++ ) {
std::string uSolString = "";
std::string alphaString = "";
std::stringstream streamU, streamAlpha, streamH;
for( unsigned idx_sys = 0; idx_sys < _nTotalEntries; idx_sys++ ) {
uSolString += std::to_string( _uSol[idx_set][idx_sys] ) + ",";
alphaString += std::to_string( _alpha[idx_set][idx_sys] ) + ",";
streamU << std::fixed << std::setprecision( 12 ) << _uSol[idx_set][idx_sys] << ",";
streamAlpha << std::fixed << std::setprecision( 12 ) << _alpha[idx_set][idx_sys] << ",";
}
// log->info( uSolString + alphaString + "{}", _hEntropy[idx_set] );
logCSV->info( uSolString + alphaString + "{}", _hEntropy[idx_set] );
streamH << std::fixed << std::setprecision( 12 ) << _hEntropy[idx_set];
std::string uSolString = streamU.str();
std::string alphaString = streamAlpha.str();
std::string hString = streamH.str();
// log->info( uSolString + alphaString + hString );
logCSV->info( uSolString + alphaString + hString );
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment