首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TypeError: setup_module()得到了一个意外的关键字参数'data‘

TypeError: setup_module()得到了一个意外的关键字参数'data‘
EN

Stack Overflow用户
提问于 2022-11-07 15:14:41
回答 1查看 23关注 0票数 0

请帮助我处理这个错误,因为我一直在尝试,但是它会返回一个TypeError。

代码语言:javascript
复制
bank = setup_module(data = data, target = 'Creditability', 
                  normalize = True, stage=None,
                  transformation = True,
               train_size = 0.8, # training over 80% of available data
                  handle_unknown_categorical = True, 
                  unknown_categorical_method = 'most_frequent',
                  remove_multicollinearity = True, #rop one of the two features that are highly correlated with each other
                  ignore_low_variance = True,#all categorical features with statistically insignificant variances are removed from the dataset.
                  combine_rare_levels = True,# all levels in categorical features below the threshold defined in rare_level_threshold param are combined together as a single level
                  numeric_imputation='median',
                  categorical_imputation='mode',
            ordinal_features = {'Account_Balance':['No Account','None','Below 200 DM','200 DM or Above'],
                               'Value_Savings_Stocks':['None','Below 100 DM','[100, 500)','[500, 1000)','Above 1000'],
                               'Length_of_current_employment':['Unemployed','<1 Year','[1, 4)','[4, 7)','Above 7'],
                               'Instalment_per_cent':['Below 20%','[20%, 25%)','(25%, 35%)','Above 35%'],
                               'Occupation':['Unemployed, unskilled','Unskilled Permanent Resident','Skilled','Executive'],
                                'No_of_Credits_at_this_Bank':['1','2 or 3','4 or 5','Above 6'],
                                'No_of_dependents':['Less than 3','3 or More']
                               },
            fix_imbalance = True,
            numeric_features=num_col,
             session_id=1,)
EN

回答 1

Stack Overflow用户

发布于 2022-11-07 15:27:38

最好的方法是查看函数"setup_module“,找出数据的关键字参数是什么。例如,它可能是"dataset=“。

您可以通过持有ctrl并单击函数名直接转到它的源代码来找到这一点。

不建议这样做,但如果您确信数据是函数所需的第一个参数,也可以删除"data=“。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74348821

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档