转载请说明. R语言官网:http://www.r-project.org/ R语言软件下载:http://ftp.ctex.org/mirrors/CRAN/ 注:下载时点击 install R for the first time 下面进行一个简单的入门程序学习. 先新建一个txt,叫做 Rice_insect.txt 点我下载,内容为:(用制表符Tab) Year Adult Day Precipitation 1973 27285 15 387.3 1974 239 14
htmlParse 函数 htmlParse加抓HTML页面的函数. url1<-"http://www.caixin.com/"url<-htmlParse(url1,encoding="UTF-8") 但是有的网站会出现报错.例如淘宝,错误信息为: Warning message:XML content does not seem to be XML: 'https://www.taobao.com/' 原因为htmlParse可以抓取http的页面
Prepare the data 数据来自UCIhttp://archive.ics.uci.edu/ml/machine-learning-databases/credit-screening,一个信a用卡的数据,具体各项变量名以及变量名代表的含义不明(应该是出于保护隐私的目的),本文会用logit,GBM,knn,xgboost来对数据进行分类预测,对比准确率 预计的准确率应该是: xgboost > GBM > logit > knn Download the data datas