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:
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