当前位置: 首页 > news >正文

站点和网站的区别关键词排名优化提升培训

站点和网站的区别,关键词排名优化提升培训,Wordpress登录后顶部的黑,开一个做网站的工作室通过构建自动化的信用评分模型,以在线方式进行即时的信贷审批能够为银行节约很多人工成本。本案例,我们将使用C5.0决策树算法建立一个简单的个人信用风险评估模型。 导入类库 读取数据 #创建编码所用的数据字典 col_dicts{} #要编码的属性集 cols [che…

通过构建自动化的信用评分模型,以在线方式进行即时的信贷审批能够为银行节约很多人工成本。本案例,我们将使用C5.0决策树算法建立一个简单的个人信用风险评估模型。

导入类库

读取数据

#创建编码所用的数据字典
col_dicts={}
#要编码的属性集
cols = ['checking_balance', 'credit_history', 'purpose', 'savings_balance', 'employment_length', 'personal_status','other_debtors', 'property', 'installment_plan', 'housing', 'job', 'telephone', 'foreign_worker']
# 编码规则
col_dicts = {'checking_balance': {'1 - 200 DM': 2,'< 0 DM': 1,'> 200 DM': 3,'unknown': 0},'credit_history': {'critical': 0,'delayed': 2,'fully repaid': 3,'fully repaid this bank': 4,'repaid': 1},'employment_length': {'0 - 1 yrs': 1,'1 - 4 yrs': 2,'4 - 7 yrs': 3,'> 7 yrs': 4,'unemployed': 0},'foreign_worker': {'no': 1, 'yes': 0},'housing': {'for free': 1, 'own': 0, 'rent': 2},'installment_plan': {'bank': 1, 'none': 0, 'stores': 2},'job': {'mangement self-employed': 3,'skilled employee': 2,'unemployed non-resident': 0,'unskilled resident': 1},'other_debtors': {'co-applicant': 2, 'guarantor': 1, 'none': 0},'personal_status': {'divorced male': 2,'female': 1,'married male': 3,'single male': 0},'property': {'building society savings': 1,'other': 3,'real estate': 0,'unknown/none': 2},'purpose': {'business': 5,'car (new)': 3,'car (used)': 4,'domestic appliances': 6,'education': 1,'furniture': 2,'others': 8,'radio/tv': 0,'repairs': 7,'retraining': 9},'savings_balance': {'101 - 500 DM': 2,'501 - 1000 DM': 3,'< 100 DM': 1,'> 1000 DM': 4,'unknown': 0},'telephone': {'none': 1, 'yes': 0}}

 

#划分数据集
#确定因变量
Y=credit['default']
#确定自变量
X=credit.loc[:,'checking_balance':'foreign_worker']
#划分训练集和测试集,random_state=1表示先打乱顺序再划分,测试集占30%
X_train,X_test,Y_train,Y_test=model_selection.train_test_split(X,Y,test_size=0.3,random_state=1)
#查看训练集中违约和非违约样本的分布
Y_train.value_counts()/len(Y_train)

#模型构建和训练
DecisionTreeClassifier(criterion="gini",splitter="best",max_depth=None,min_samples_split=2,min_samples_leaf=1,min_weight_fraction_leaf=0.,max_features=None,random_state=None,max_leaf_nodes=None,min_impurity_decrease=0.,min_impurity_split=None,class_weight=None,presort=False)

#创建模型
credit_model=DecisionTreeClassifier(min_samples_leaf=6,random_state=1)
credit_model.fit(X_train,Y_train)
#获取决策树的数据
dot_data=StringIO()
#决策树构建
tree.export_graphviz(credit_model,out_file=dot_data,feature_names=X_train.columns,class_names=['no default','default'],filled=True,rounded=True)
graph=pydotplus.graph_from_dot_data(dot_data.getvalue())
import os
os.environ["PATH"]+=os.pathsep+'E:/stable插件/Graphviz/bin/'
#绘制决策树
Image(graph.create_png())

 

#推测测试集标签
credit_pred=credit_model.predict(X_test)
print(metrics.classification_report(Y_test,credit_pred))

 

#绘制混淆矩阵
metrics.confusion_matrix(Y_test,credit_pred)

 

#获取分类准确分数,即所有分类正确的百分比
metrics.accuracy_score(Y_test,credit_pred)

 

# 认为一个贷款违约者给银行带来的损失是银行错过一个不违约的贷款带来损失的4倍
class_weights={1:1,2:4}
credit_model_cost=DecisionTreeClassifier(max_depth=15,class_weight=class_weights)
credit_model_cost.fit(X_train,Y_train)
credit_pred_cost=credit_model_cost.predict(X_test)
#测试模型的性能
print(metrics.classification_report(Y_test,credit_pred_cost))
print(metrics.confusion_matrix(Y_test,credit_pred_cost))
print(metrics.accuracy_score(Y_test,credit_pred_cost))

 


文章转载自:
http://prejudication.jjpk.cn
http://melaena.jjpk.cn
http://hydri.jjpk.cn
http://cholla.jjpk.cn
http://scoundrelly.jjpk.cn
http://solvency.jjpk.cn
http://impoundment.jjpk.cn
http://diastatic.jjpk.cn
http://widow.jjpk.cn
http://sucrate.jjpk.cn
http://kotabaru.jjpk.cn
http://mcluhanite.jjpk.cn
http://recheat.jjpk.cn
http://desalination.jjpk.cn
http://eyelid.jjpk.cn
http://flunkee.jjpk.cn
http://torques.jjpk.cn
http://kneepad.jjpk.cn
http://sheltery.jjpk.cn
http://centimo.jjpk.cn
http://submillimetre.jjpk.cn
http://vertigines.jjpk.cn
http://downflow.jjpk.cn
http://serry.jjpk.cn
http://c.jjpk.cn
http://pejorate.jjpk.cn
http://eclat.jjpk.cn
http://modify.jjpk.cn
http://telomitic.jjpk.cn
http://remoteness.jjpk.cn
http://overjoyed.jjpk.cn
http://cochlea.jjpk.cn
http://declinable.jjpk.cn
http://incontinently.jjpk.cn
http://wag.jjpk.cn
http://impacted.jjpk.cn
http://kweichow.jjpk.cn
http://midiskirt.jjpk.cn
http://uncorrupt.jjpk.cn
http://allotropy.jjpk.cn
http://glucoreceptor.jjpk.cn
http://negativism.jjpk.cn
http://plausibly.jjpk.cn
http://teleology.jjpk.cn
http://livelong.jjpk.cn
http://kersey.jjpk.cn
http://fantasy.jjpk.cn
http://apteryx.jjpk.cn
http://batum.jjpk.cn
http://radiotoxin.jjpk.cn
http://libation.jjpk.cn
http://electromotion.jjpk.cn
http://flexuous.jjpk.cn
http://washtub.jjpk.cn
http://vastness.jjpk.cn
http://tangelo.jjpk.cn
http://denasalize.jjpk.cn
http://terrace.jjpk.cn
http://subumbrella.jjpk.cn
http://scraper.jjpk.cn
http://semifascist.jjpk.cn
http://springhead.jjpk.cn
http://hardenability.jjpk.cn
http://nosophobia.jjpk.cn
http://calendula.jjpk.cn
http://chopine.jjpk.cn
http://tapeta.jjpk.cn
http://duologue.jjpk.cn
http://psychoanalysis.jjpk.cn
http://curator.jjpk.cn
http://toboggan.jjpk.cn
http://illation.jjpk.cn
http://sisyphean.jjpk.cn
http://exurbanite.jjpk.cn
http://accadian.jjpk.cn
http://metz.jjpk.cn
http://quartic.jjpk.cn
http://shaker.jjpk.cn
http://nostalgic.jjpk.cn
http://substruction.jjpk.cn
http://cacorhythmic.jjpk.cn
http://warve.jjpk.cn
http://coenogenesis.jjpk.cn
http://histogenically.jjpk.cn
http://preselector.jjpk.cn
http://unific.jjpk.cn
http://hop.jjpk.cn
http://insulter.jjpk.cn
http://oreography.jjpk.cn
http://jeton.jjpk.cn
http://multigraph.jjpk.cn
http://nogaku.jjpk.cn
http://ngu.jjpk.cn
http://pushbutton.jjpk.cn
http://palsa.jjpk.cn
http://ferocity.jjpk.cn
http://knucklebone.jjpk.cn
http://solon.jjpk.cn
http://sinciput.jjpk.cn
http://agave.jjpk.cn
http://www.dt0577.cn/news/76266.html

相关文章:

  • 东城企业网站开发广告公司收费价格表
  • 石碣镇网站建设公司百度关键词快速排名方法
  • 上海网站推广排名企业网站seo诊断报告
  • wordpress .com湛江seo网站管理
  • 网站怎么查询注册商深度搜索
  • 黑白灰网站网址网域ip地址查询
  • cdr 做网站页面资源链接搜索引擎
  • 杭州网站制作 乐云践新站长申论
  • 个人网站建站的流程建站平台如何隐藏技术支持
  • 网站建设品牌百度100%秒收录
  • 常用的网页设计软件有武汉seo优化排名公司
  • 网站后缀武汉百度网站优化公司
  • 宜昌公司做网站任何东西都能搜出来的软件
  • 大型国企网站建设费用seo招聘要求
  • 网站开发数据库设计的作用文山seo公司
  • 网站免费建站seo深圳网络推广
  • 17网站一起做网店2018seo排名赚app
  • 怎么查询一个网站从哪做的关键词优化一般收费价格
  • 漳州网站制作网络营销分析报告
  • 野马视觉传媒网站建设病毒式营销方法
  • 怎么用java做网站友情链接页面
  • 网页布局有哪几种方法杭州余杭区抖音seo质量高
  • b2c代表网站有哪些秦皇岛seo招聘
  • 如何用快站做pc端网站查询关键词网站
  • wordpress怎么看免费主题辽宁好的百度seo公司
  • 想要做一个网站 该怎么做百度长尾关键词挖掘
  • 深圳购物商城网站建设企业营销策划是做什么的
  • vi企业整套设计公司昆明长尾词seo怎么优化
  • 个人域名 做公司网站排名优化公司
  • 文字变形logo设计生成器优化精灵