Skip to content

Input contains NaN, infinity or a value too large for dtype('float64') #26

@juanantoniobellido

Description

@juanantoniobellido

Hello.

I have the following error when running the evolution: "ValueError: Input contains NaN, infinity or a value too large for dtype('float64')." (I upload the whole text in "error.txt")

The input data do not have any NaN value, and the format is 'float64'. The problem may be in 'y_pred', because when I delete the functions pow, sqrt and log, everything works fine (using any of them, the problem arises):

pset = gep.PrimitiveSet('Main', input_names=inputs[:-1])
pset.add_function(operator.add, 2)
pset.add_function(operator.sub, 2)
pset.add_function(operator.mul, 2)
pset.add_function(protected_div, 2)
pset.add_function(operator.pow, 2)
pset.add_function(np.sqrt, 1)
pset.add_function(np.log, 1)
pset.add_rnc_terminal()

I also upload the implementation file in the .zip

Thank you very much in advance

error_and_py.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions