def closenessScores(self, expValues, actValues, fractional=True):
expValue = expValues[<NUM_LIT:0>]<EOL>actValue = actValues[<NUM_LIT:0>]<EOL>if self.periodic:<EOL><INDENT>expValue = expValue % self.maxval<EOL>actValue = actValue % self.maxval<EOL><DEDENT>err = abs(expValue - actValue)<EOL>if self.periodic:<EOL><INDENT>err = min(err, self.maxval - err)<EOL><DEDENT>if fractional:<EOL><INDENT>pctErr = float(err) / (self.maxval - self.minval)<EOL>pctErr = min(<NUM_LIT:1.0>, pctErr)<EOL>closeness = <NUM_LIT:1.0> - pctErr<EOL><DEDENT>else:<EOL><INDENT>closeness = err<EOL><DEDENT>return numpy.array([closeness])<EOL>
See the function description in base.py