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
However, it only works with the second option, and I would like to fit AalenAdditiveFitter without resampling. I do not see the difference between the outputs of both options except for the extra number of individuals in the second one.
When I fit AalenAdditiveFitter with the first X_trn, y_trn I do:
UnboundLocalError: local variable 'V' referenced before assignment
why does this happen?
Thank you in advance and have a nice day!
Camila F
The text was updated successfully, but these errors were encountered:
camferna
changed the title
UnboundLocalError: local variable 'V' referenced before assigment
UnboundLocalError: local variable 'V' referenced before assignment
Nov 23, 2023
Hello !
I am trying to fit AalenAdditiveFitter using sklearn_adapter function.
I am reading the dataset from a pol file:
df_trn = pd.read_pickle(f"df_trn_one_10.pkl")
df_trn.reset_index(drop = True, inplace = True)
Then, I tried two ways to set X_trn and y_trn:
X_trn, y_trn = [df_trn.drop(columns = ['Employee Id','time']), df_trn['time']]
X_res_trn, y_res_trn = SMOTE().fit_resample( df_trn.drop(columns=["Employee Id",'time']), df_trn["time"] )
However, it only works with the second option, and I would like to fit AalenAdditiveFitter without resampling. I do not see the difference between the outputs of both options except for the extra number of individuals in the second one.
When I fit AalenAdditiveFitter with the first X_trn, y_trn I do:
AalenAdditiveRegression = sklearn_adapter(AalenAdditiveFitter, event_col='TargetAttrition')
ska_aaf = AalenAdditiveRegression()
ska_aaf.fit(X_trn, y_trn)
And I have the following error:
UnboundLocalError: local variable 'V' referenced before assignment
why does this happen?
Thank you in advance and have a nice day!
Camila F
The text was updated successfully, but these errors were encountered: