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

济南高新区 网站建设公司链接网站开发需要多少钱

济南高新区 网站建设公司,链接网站开发需要多少钱,深圳公司免费网站建设,网络系统中针对海量数据的加密1.下载2.安装#xff1a;双击3.创建桌面快捷方式安装目录\bin文件夹\#xff1a;找到gvedit.exe文件右键 发送到桌面快捷方式#xff0c;如下图#xff1a;4.配置环境变量将graphviz安装目录下的bin文件夹添加到Path环境变量中#xff1a;5.验证是否安装并配置成功进入win…1.下载2.安装双击3.创建桌面快捷方式安装目录\bin文件夹\找到gvedit.exe文件右键 发送到桌面快捷方式如下图4.配置环境变量将graphviz安装目录下的bin文件夹添加到Path环境变量中5.验证是否安装并配置成功进入windows命令行界面输入dot -version然后按回车如果显示graphviz的相关版本信息则安装配置成功。如图6.python环境中安装(pycharm中)File-Settings-Project:Python然后输入graphivz安装安装需要等待一会。。。。决策树实战代码# -*- coding:utf-8 -*-from sklearn.feature_extraction import DictVectorizerimport csvfrom sklearn import preprocessingfrom sklearn import treefrom sklearn.externals.six import StringIO#read the csv fileallElectronicsDate open(rD:\Python\date\AllElectronics.csv,rt)reader csv.reader(allElectronicsDate)headers next(reader)# headers reader.next()print(headers)#打印输出第一行标题#[RID, age, income, student, credit_rating, Class_buys_computer]featureList [] #用来存储特征值labelList [] #用来存储类标签#获取特征值并打印输出for row in reader:labelList.append(row[len(row) - 1])#每一行最后的值类标签rowDict {}for i in range(1,len(row) - 1):#每一行 遍历除第一列和最后一列的值rowDict[headers[i]] row[i]featureList.append(rowDict)print(featureList)#vectorize feature 使用sklearn自带的方法将特征值离散化为数字标记vec DictVectorizer()dummyX vec.fit_transform(featureList).toarray()print(dummyY: str(dummyX))print(vec.get_feature_names())# print(feature_name str(vec.get_feature_names()))print(labelList: str(labelList))#vectorize class labels #数字化类标签lb preprocessing.LabelBinarizer()dummyY lb.fit_transform(labelList)print(dummyY: str(dummyY))#use the decision tree for classificationclf tree.DecisionTreeClassifier(criterionentropy)clf clf.fit(dummyX,dummyY) #构建决策树#打印构建决策树采用的参数print(clf: str(clf))#visilize the modelwith open(allElectronicInformationGainOri.dot,w) as f:ftree.export_graphviz(clf,feature_namesvec.get_feature_names(),out_filef)#这时就生成了allElectronicInformationGainOri.dot文件# dot -Tpdf in.dot -o out.pdf dot文件输出为pdf文件#验证数据取出一行数据修改几个属性预测结果oneRowX dummyX[0,:]print(oneRowX: str(oneRowX))newRowX oneRowXnewRowX[0] 1newRowX[2] 0print(newRowX: str(newRowX))predictedY clf.predict(newRowX)print(predictedY:str(predictedY))结果[RID, age, income, student, credit_rating, class_buys_computer][{income: high, age: youth, student: no, credit_rating: fair}, {income: high, age: youth, student: no, credit_rating: excellent}, {income: high, age: middle_aged, student: no, credit_rating: fair}, {income: medium, age: senior, student: no, credit_rating: fair}, {income: low, age: senior, student: yes, credit_rating: fair}, {income: low, age: senior, student: yes, credit_rating: excellent}, {income: low, age: middle_aged, student: yes, credit_rating: excellent}, {income: medium, age: youth, student: no, credit_rating: fair}, {income: low, age: youth, student: yes, credit_rating: fair}, {income: medium, age: senior, student: yes, credit_rating: fair}, {income: medium, age: youth, student: yes, credit_rating: excellent}, {income: medium, age: middle_aged, student: no, credit_rating: excellent}, {income: high, age: middle_aged, student: yes, credit_rating: fair}, {income: medium, age: senior, student: no, credit_rating: excellent}]dummyY:[[ 0. 0. 1. 0. 1. 1. 0. 0. 1. 0.][ 0. 0. 1. 1. 0. 1. 0. 0. 1. 0.][ 1. 0. 0. 0. 1. 1. 0. 0. 1. 0.][ 0. 1. 0. 0. 1. 0. 0. 1. 1. 0.][ 0. 1. 0. 0. 1. 0. 1. 0. 0. 1.][ 0. 1. 0. 1. 0. 0. 1. 0. 0. 1.][ 1. 0. 0. 1. 0. 0. 1. 0. 0. 1.][ 0. 0. 1. 0. 1. 0. 0. 1. 1. 0.][ 0. 0. 1. 0. 1. 0. 1. 0. 0. 1.][ 0. 1. 0. 0. 1. 0. 0. 1. 0. 1.][ 0. 0. 1. 1. 0. 0. 0. 1. 0. 1.][ 1. 0. 0. 1. 0. 0. 0. 1. 1. 0.][ 1. 0. 0. 0. 1. 1. 0. 0. 0. 1.][ 0. 1. 0. 1. 0. 0. 0. 1. 1. 0.]][agemiddle_aged, agesenior, ageyouth, credit_ratingexcellent, credit_ratingfair, incomehigh, incomelow, incomemedium, studentno, studentyes]labelList:[no, no, yes, yes, yes, no, yes, no, yes, yes, yes, yes, yes, no]dummyY:[[0][0][1][1][1][0][1][0][1][1][1][1][1][0]]clf:DecisionTreeClassifier(class_weightNone, criterionentropy, max_depthNone,max_featuresNone, max_leaf_nodesNone, min_samples_leaf1,min_samples_split2, min_weight_fraction_leaf0.0,random_stateNone, splitterbest)oneRowX:[ 0. 0. 1. 0. 1. 1. 0. 0. 1. 0.]newRowX:[ 1. 0. 0. 0. 1. 1. 0. 0. 1. 0.]predictedY:[1]在项目路径里面打开dot文件将dot文件转化为直观的PDF文件(dos 里面输入dot -Tpdf D:\Python\机器学习\allElectronicInformationGainOri.dot -o D:\Python\机器学习\out.pdf 然后回车)dot -Tpdf D:\Python\机器学习\allElectronicInformationGainOri.dot -o D:\Python\机器学习\out.pdf
http://www.zqtcl.cn/news/441036/

相关文章:

  • 徐州网站开发要多少钱给个人网站做百度百科
  • 法语网站建设免费网站为何收录比较慢
  • 品牌网站推广软件seo内链优化
  • 广东律师事务所东莞网站建设做网站 怎么备案
  • shopnc本地生活o2o网站源码wordpress文章内多页效果
  • 深圳全国网站制作哪个好页面设计有哪几种风格
  • 网页设计作业网站素材和效果图夏天做啥网站致富
  • 利用帝国软件如何做网站网站友链交换平台
  • 简述网站开发技术深圳网站设计合理刻
  • wordpress网站名称寻找销售团队外包
  • 一浪网站建设网页qq邮箱
  • 做网站需要注册公司吗夫唯seo系统培训
  • 沈阳人流哪个医院好安全百度关键词优化怎么做
  • 1688网站怎么做分销高质量的网站内容建设
  • 网站建设公司济宁网站转跳怎么做
  • 镇江网站设计多少钱企业网络部署方案
  • 建网站的公司浩森宇特wordpress登录缓存
  • 便宜建站空间战队头像在线制作免费
  • 做招聘网站赚钱吗厦门网站建设哪里好
  • 新乡网站建设哪家公司好阿里巴巴做国际网站多少钱
  • 怎么在悉尼做网站dede做手机网站
  • 企业网站模板免费下载品牌建设专家库推荐表
  • 辽宁智能网站建设推荐网络营销推广方案创意
  • 安阳做一个网站多少钱东营做网站公司
  • 深圳市罗湖网站建设百度自助建站官网
  • 网站开发安装环境网站建设销售话术
  • 网站权重网站栏目划分的原则
  • 国际网站建设的目的我的百度账号登录
  • 温州网站设计定制博客和网站的区别
  • 益阳建设网站wordpress加载图片慢