You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @joshlk, yup looks like a bug. I think the source is formulaic however. Ex:
from formulaic import Formula
design_info = Formula("1")
df = pd.DataFrame(np.arange(5), index=[0, 2, 4, 6, 8])
print(design_info.get_model_matrix(df))
I'll make an issue with them to resolve this. For now, you can either downgrade a version of lifelines, say 0.25.7, (we recently swapped to Formulaic), or do a .reset_index(drop=True) prior to fitting:
Show by example:
That works fine. But if I take a row subset of the data so the DataFrame index isn't
arange
:It produces the following error even though there is no inf or nan values:
It seems like the function is not ignoring the DataFrame index.
Versions:
The text was updated successfully, but these errors were encountered: