Changeset 82e5fb for src/Potentials/PotentialTrainer.cpp
- Timestamp:
- May 25, 2021, 11:04:50 PM (4 years ago)
- Branches:
- Candidate_v1.7.0, stable
- Children:
- 91793c
- Parents:
- 889067e
- git-author:
- Frederik Heber <frederik.heber@…> (05/25/21 21:55:59)
- git-committer:
- Frederik Heber <frederik.heber@…> (05/25/21 23:04:50)
- File:
-
- 1 edited
-
src/Potentials/PotentialTrainer.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Potentials/PotentialTrainer.cpp
r889067e r82e5fb 71 71 const HomologyGraph &_graph, 72 72 const boost::filesystem::path &_trainingfile, 73 const boost::filesystem::path &_errorfile, 73 74 const unsigned int _maxiterations, 74 75 const double _threshold, … … 180 181 TrainingData::L2ErrorConfigurationIndexMap_t WorseFragmentMap = 181 182 data.getWorstFragmentMap(model, fragmentrange); 182 LOG(0, "RESULT: WorstFragmentMap " << WorseFragmentMap << "."); 183 183 if (_errorfile.string().empty()) { 184 LOG(0, "RESULT: WorstFragmentMap " << WorseFragmentMap << "."); 185 } else { 186 std::ofstream errorstream(_errorfile.string().c_str()); 187 if (errorstream.good()) { 188 LOG(3, "DEBUG: Writing error data to file " << 189 _errorfile.string() << "."); 190 errorstream << "step\terror" << std::endl; 191 // resort into step as key 192 typedef std::map< size_t, double > step_error_t; 193 step_error_t step_error; 194 for (TrainingData::L2ErrorConfigurationIndexMap_t::const_reverse_iterator iter = WorseFragmentMap.rbegin(); 195 iter != WorseFragmentMap.rend(); ++iter) 196 step_error.insert( std::make_pair(iter->second, iter->first) ); 197 for (step_error_t::const_iterator iter = step_error.begin(); 198 iter != step_error.end(); ++iter) 199 errorstream << iter->first << "\t" << iter->second << std::endl; 200 } 201 errorstream.close(); 202 } 184 203 } 185 204
Note:
See TracChangeset
for help on using the changeset viewer.
