Ignore:
Timestamp:
Feb 9, 2016, 7:10:23 AM (9 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
b40690
Parents:
08111a
git-author:
Frederik Heber <heber@…> (02/08/16 17:00:06)
git-committer:
Frederik Heber <heber@…> (02/09/16 07:10:23)
Message:

FIX: PotentialTrainer did not use user-specified threshold so far.

  • TESTFIX: Decreased l2 tolerance in FitPotential regression tests to further speed up tests. This is especially true for the enable-debug variant, where 3 of 5 tests take more than 15 minutes.
Location:
src/FunctionApproximation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/FunctionApproximation/FunctionApproximation.cpp

    r08111a rb8f2ea  
    5656FunctionApproximation::FunctionApproximation(
    5757    const TrainingData &_data,
    58     FunctionModel &_model) :
     58    FunctionModel &_model,
     59    const double _precision) :
    5960    input_dimension(_data.getTrainingInputs().size()),
    6061    output_dimension(_data.getTrainingOutputs().size()),
     62    precision(_precision),
    6163    input_data(_data.getTrainingInputs()),
    6264    output_data(_data.getTrainingOutputs()),
     
    162164  double opts[LM_OPTS_SZ], info[LM_INFO_SZ];
    163165
    164   opts[0]=LM_INIT_MU; opts[1]=1E-15; opts[2]=1E-15; opts[3]=1E-20;
     166  // minim. options [\tau, \epsilon1, \epsilon2, \epsilon3]. Respectively the scale factor for initial \mu,
     167  // * stopping thresholds for ||J^T e||_inf, ||Dp||_2 and ||e||_2.
     168  opts[0]=LM_INIT_MU; opts[1]=1e-15; opts[2]=1e-15; opts[3]=precision;
    165169  opts[4]= LM_DIFF_DELTA; // relevant only if the Jacobian is approximated using finite differences; specifies forward differencing
    166170  //opts[4]=-LM_DIFF_DELTA; // specifies central differencing to approximate Jacobian; more accurate but more expensive to compute!
  • src/FunctionApproximation/FunctionApproximation.hpp

    r08111a rb8f2ea  
    8080   * \param _data container with tuple of (input, output) values
    8181   * \param _model FunctionModel to use in approximation
     82   * \param _precision desired precision of fit
    8283   */
    8384  FunctionApproximation(
    8485      const TrainingData &_data,
    85       FunctionModel &_model);
     86      FunctionModel &_model,
     87      const double _precision);
    8688
    8789  /** Constructor of the class FunctionApproximation.
     
    9496      const size_t &_input_dimension,
    9597      const size_t &_output_dimension,
    96       FunctionModel &_model) :
     98      FunctionModel &_model,
     99      const double _precision) :
    97100    input_dimension(_input_dimension),
    98101    output_dimension(_output_dimension),
    99     model(_model)
     102    model(_model),
     103    precision(_precision)
    100104  {}
    101105  /** Destructor for class FunctionApproximation.
     
    191195  //!> output dimension (is fixed from construction)
    192196  const size_t output_dimension;
     197  //!> desired precision given to LevMar
     198  const double precision;
    193199
    194200  //!> current input set of training data
Note: See TracChangeset for help on using the changeset viewer.