Closed xinyu-2020 closed 4 years ago
The error is:
Hi,
It is a little risky to use the power function x^y
directly, because the value of x
or y
may be very large during evaluation, which causes the error you reported. If you really want a power function, please use a safe one: fabricate your own function that handles too large inputs internally.
OK,thank you. In my project, fitness evaluation function is MSE. But I still need to know R^2(the coefficient of determination) .How can I know the R^2 of best several individuals.
Hi, xinyu,
I don't think your problem is related to geppy. You can simply evaluate the several best individuals and compute the R^2 according to its formula. An individual, i.e., an expression tree, is just like a function, which accepts your inputs during evaluation and gives the output.
In my program, the MSE of best indivudual is still too big, Which parameters should I modify? n_pop=1000 n_gen=1000 h = 20 n_genes = 2 r = 10
Hi, xinyu,
Generally in evolutionary computation, a larger size of the population and more generations would lead to better results. You can play with these few parameters or refer to a GEP book for more guidance.
Hi Shuhua, When running the example of GEP_RNC_for_ML_with_UCI_Power_Plant_dataset, I added a symbolic function x^y: pset.add_function(operator.pow, 2) it throwed a error as the following: ValueError: Input contains NaN, infinity or a value too large for dtype('float64'). Please give me some advice . Thank you