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
def predict(df, inplace=True):
....
return_df = pd.DataFrame()
for i, param_name in enumerate(self.param_names):
return_df[param_name] = self.params[i].get_param(coefs[i], data)
if inplace:
df[param_name] = return_df[param_name]
return return_df
This way, the same default behavior is provided, but users passing in slices of dataframes or who in general rely on pure functions can also have that behavior enabled optionally.
The text was updated successfully, but these errors were encountered:
Ideally, when we predict out on a fitted model, the predict method doesn't automatically modify the input dataset as it does here: https://github.com/ihmeuw-msca/regmod/blob/develop/src/regmod/models/model.py#L621
A proposed alternative:
This way, the same default behavior is provided, but users passing in slices of dataframes or who in general rely on pure functions can also have that behavior enabled optionally.
The text was updated successfully, but these errors were encountered: