Skip to content

No ignition is causing infinite error #18

@rwest

Description

@rwest

We have a simulation that does not trigger an ignition (the temperature never rises quite enough) and end up with 'average error function' of Inf and 'average deviation function' of -Inf. for the whole data set.

Looking at

error_func = numpy.nanmean(error_func)

        # calculate error function for this dataset
        error_func = numpy.power(
            (numpy.log(ignition_delays_sim) -
             numpy.log(ignition_delays_exp)) / standard_dev, 2
             )
        error_func = numpy.nanmean(error_func)

I'm guessing the nanmean is supposed to take a mean excluding NaN values, but the result of numpy.log(ignition_delays_sim) is not NaN but is -Inf when no ignition is detected, because process_results() sets ignition delay to zero if no ignition:

  else:
            warnings.warn('No ignition for case ' + self.meta['id'] +
                          ', setting value to 0.0 and continuing',
                          RuntimeWarning
                          )
            self.meta['simulated-ignition-delay'] = 0.0 * units.second

So we end up with 'average error function' of Inf and 'average deviation function' of -Inf.

Should we exclude infinities before averaging? include them somehow?
I guess technically it is an infinite error, but that doesn't help you rank things!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions