Skip to content

Commit

Permalink
Some fixed docstrings and lengthier explanations
Browse files Browse the repository at this point in the history
  • Loading branch information
connie committed Jul 27, 2016
1 parent 8f0c922 commit 78e42c5
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions testing/evaluateKinetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

def getKineticsDepository(FullDatabase, family, depositoryLabel):
"""
Retrieve the NIST exact and approximated kinetics for those same reactions from RMG.
Retrieve dictionaries of exact kinetics from NIST depository and approximated kinetics
for those same reactions from RMG.
Note: does NOT average up the database or create any rate rules from training data.
If that is desired it must be done prior to entering this function.
"""
Expand Down Expand Up @@ -85,6 +86,19 @@ def getKineticsLeaveOneOut(family, averaging=True):
The original family should not contained averaged nodes when starting out. The
leave one out test should be performed only for original exact matches.
There are two methods of performing the leave one out test:
averaging=True, each exact entry is removed, and the family's trees
are re-averaged WITHOUT that entry and used to estimate the original entry.
This method tests how the database performs to estimate data when it is
missing. Speed of this test is slow.
averaging=False, the family is pre-averaged, and then the exact entry
is removed, and RMG is used to re-estimate that entry. This method
tests how the database averaging scheme performs, since we expect the
estimate to use a more general node that still incorporates the data
from the original exact entry. Speed of this test is fast.
"""
exactKinetics={}
approxKinetics={}
Expand Down Expand Up @@ -153,8 +167,8 @@ def calculateParity(exactKineticModel, approxKineticModel, T):
def analyzeForParity(exactKinetics, approxKinetics, T=1000.0):
"""
Creates a parity plot from the exactKinetics and approxKinetics (dictionarys with
kineticModels are entries). Uses the median temperature of the exactKinetics to
give the best comparison. Returns the parityData in a dictionary with
kineticModels are entries). Uses the user specified temperature T to
compare the two sets of kinetics k(T). Returns the parityData in a dictionary with
{key: [exactCoefficient(T), approxCoefficient(T)}
"""
parityData={}
Expand Down Expand Up @@ -215,7 +229,7 @@ def countNodes(family):
else:
# Duplicate node found at top of tree
# eg. R_recombination: ['Y_rad', 'Y_rad']
assert len(forwardTemplate)==2 , 'Can currently only do symmetric trees with nothing else in them'
assert len(forwardTemplate)==2 , 'Duplicate entries in the top nodes must only be in symmetric trees containing exactly 2 total nodes, i.e. [Yrad, Yrad]'

forwardTemplate = temporary

Expand Down

0 comments on commit 78e42c5

Please sign in to comment.