eqdisco.fitness.description_length#

eqdisco.fitness.description_length(expr, y, yhat, n_symbols=None, precision=None)[source]#

Two-part description length (in nats) of data and model.

\(L = -\ln\hat L + |f|\ln n_s + \tfrac{p}{2}\ln N\): the negative Gaussian log-likelihood, the code of the tree structure over an alphabet of \(n_s\) symbols, and the code of \(p\) parameters at the precision allowed by \(N\) samples. This is a simplified form of the minimum description length criterion that Bartlett, Desmond and Ferreira (2024) use to rank the functions of exhaustive symbolic regression; their criterion codes each parameter with its Fisher information.