gpt4 book ai didi

python - 随机森林分类器的最后一行#5 遇到问题

转载 作者:行者123 更新时间:2023-11-30 10:00:45 25 4
gpt4 key购买 nike

model = RandomForestClassifier(n_estimators=100)

predictor_var = ['Gender', 'Married', 'Dependents', 'Education',
'Self_Employed', 'Loan_Amount_Term', 'Credit_History', 'Property_Area',
'LoanAmount_log','TotalIncome_log']

classification_model(model, df,predictor_var,outcome_var)

最佳答案

什么是classification_model?应该是这样的:

model = RandomForestClassifier(n_estimators=100)

predictor_var = ['Gender', 'Married', 'Dependents', 'Education',
'Self_Employed', 'Loan_Amount_Term', 'Credit_History', 'Property_Area',
'LoanAmount_log','TotalIncome_log']

model.fit(df[predictor_var], df[outcome_var])

关于python - 随机森林分类器的最后一行#5 遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59132351/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com