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
I'd like to add "special_values" for function woebin in module scorecardpy on my data but it doesn't work. I try to use it with code from ShichenXie /scorecardpy :
import scorecardpy as sc
dat = sc.germancredit()
dt_s = sc.var_filter(dat, y="creditability")
train, test = sc.split_df(dt_s, 'creditability').values()
bins = sc.woebin(dt_s, y="creditability")
special_values = {
'credit.amount': [2600, 9960, "6850%,%missing"],
'purpose': ["education", "others%,%missing"]
}
breaks_adj = {
'age.in.years': [26, 35, 40],
'other.debtors.or.guarantors': ["none", "co-applicant%,%guarantor"]
}
bins_adj = sc.woebin(dt_s, y="creditability", breaks_list=breaks_adj,special_values=special_values)
There appears an error:
ValueError: cannot convert float NaN to integer
Or when I change special_values on
special_values = {
'purpose': ["education", "others%,%missing"]
}
There appears an error:
MergeError: Can only pass argument "on" OR "left_index" and "right_index", not a combination of both.
Could You help me ? Do You have any idea why it doesn't work ? Without "special_values" it's ok.
The text was updated successfully, but these errors were encountered:
I'd like to add "special_values" for function woebin in module scorecardpy on my data but it doesn't work. I try to use it with code from ShichenXie /scorecardpy :
import scorecardpy as sc
dat = sc.germancredit()
dt_s = sc.var_filter(dat, y="creditability")
train, test = sc.split_df(dt_s, 'creditability').values()
bins = sc.woebin(dt_s, y="creditability")
special_values = {
'credit.amount': [2600, 9960, "6850%,%missing"],
'purpose': ["education", "others%,%missing"]
}
breaks_adj = {
'age.in.years': [26, 35, 40],
'other.debtors.or.guarantors': ["none", "co-applicant%,%guarantor"]
}
bins_adj = sc.woebin(dt_s, y="creditability", breaks_list=breaks_adj,special_values=special_values)
There appears an error:
ValueError: cannot convert float NaN to integer
Or when I change special_values on
special_values = {
'purpose': ["education", "others%,%missing"]
}
There appears an error:
MergeError: Can only pass argument "on" OR "left_index" and "right_index", not a combination of both.
Could You help me ? Do You have any idea why it doesn't work ? Without "special_values" it's ok.
The text was updated successfully, but these errors were encountered: