Fitting Discontinuous Expressions #1007
-
Hello, I am using
In fitting the expressions, the loss function may try to evaluate the relative error where the Is there any way to have the loss function only calculate the loss for defined / real Thanks again for the help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Not sure if I follow butiIt should automatically do this already. The NaNs will propagate and the expression will receive an infinite loss. Therefore the genetic algorithm will avoid expression that give such terms. But yes, it will consider all points in the dataset. If any point is NaN, it will be thrown out. |
Beta Was this translation helpful? Give feedback.
what happens if all x0 > z1? Or if only one point is safe? I guess you’d have to set some threshold.
but you can get the underlying arrays with
.x
and the validity with.valid
. Just be sure to propagate the validity and return aValidVector(x, valid)
from the code block.