您好,欢迎光临本网站![请登录][注册会员]  
文件名称: R语言lightGBM包Win10下编译可用
  所属分类: 机器学习
  开发工具:
  文件大小: 1mb
  下载次数: 0
  上传时间: 2018-03-17
  提 供 者: krup****
 详细说明: R语言在win10下编译的lightGBM扩展包。 > sessionInfo() R version 3.4.3 (2017-11-30) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) Matrix products: default locale: [1] LC_COLLATE=Chinese (Simplified)_China.936 [2] LC_CTYPE=Chinese (Simplified)_China.936 [3] LC_MONETARY=Chinese (Simplified)_China.936 [4] LC_NUMERIC=C [5] LC_TIME=Chinese (Simplified)_China.936 attached base packages: [1] stats graphics grDevices utils datasets methods [7] base other attached packages: [1] lightgbm_2.1.0 R6_2.2.2 loaded via a namespace (and not attached): [1] compiler_3.4.3 magrittr_1.5 tools_3.4.3 [4] yaml_2.1.18 data.table_1.10.4-3 > require(lightgbm) Loading required package: lightgbm Loading required package: R6 > data(iris) > iris$Species <- as.numeric(as.factor(iris$Species)) - 1 > train <- as.matrix(iris[c(1:40, 51:90, 101:140), ]) > test <- as.matrix(iris[c(41:50, 91:100, 141:150), ]) > dtrain <- lgb.Dataset(data = train[, 1:4], label = train[, 5]) > dtest <- lgb.Dataset.create.valid(dtrain, data = test[, 1:4], label = test[, 5]) > valids <- list(test = dtest) > params <- list(objective = "multiclass", metric = "multi_error", num_class = 3) > model <- lgb.train(params, + dtrain, + 100, + valids, + min_data = 1, + learning_rate = 1, + early_stopping_rounds = 10) [LightGBM] [Info] Total Bins 87 [LightGBM] [Info] Number of data: 120, number of used features: 4 [LightGBM] [Warning] No further splits with positive gain, best gain: -inf [LightGBM] [Warning] No further splits with positive gain, best gain: -inf [LightGBM] [Warning] No further splits with positive gain, best gain: -inf [1]: test's multi_error:0.0333333 > my_preds <- predict(model, test[, 1:4]) > > head(my_preds) [1] 0.82590130 0.08704935 0.08704935 0.82590130 0.08704935 0.08704935 > ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: R语言 lightGBM
 输入关键字,在本站1000多万海量源码库中尽情搜索: