bwilbertz / rlightgbm Goto Github PK
View Code? Open in Web Editor NEWR Interface for LightGBM
License: MIT License
R Interface for LightGBM
License: MIT License
In file included from RLightGBM.cpp:1:0:
../inst/include/RLightGBM.h:11:28: fatal error: LightGBM/api.hpp: No such file or directory
compilation terminated.
make: *** [RLightGBM.o] Error 1
I'm using Windows 7 and RStudio. I have installed lightgbm and it's working.
Coming to RLightGBM, i already try exactly what's written in the installation guide. THat is, by executing the following:
library("devtools")
find_rtools()
install.packages("RLightGBM_0.1.tar.gz", type="source", repos=NULL)
The resulting error is as follows:
library("devtools", lib.loc="
/R/win-library/3.3")1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Allan\Documents\R\win-library\3.3" "RLightGBM_0.1.tar.gz"' had status 1
find_rtools()
[1] TRUE
install.packages("RLightGBM_0.1.tar.gz", type="source", repos=NULL)
Installing package into ‘C:/Users/Allan/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
Warning: invalid package 'RLightGBM_0.1.tar.gz'
Error: ERROR: no packages specified
Warning in install.packages :
running command '"C:/PROGRA
Warning in install.packages :
installation of package ‘RLightGBM_0.1.tar.gz’ had non-zero exit status
I'm confused now?
library(devtools)
find_rtools()
[1] TRUE
install.packages("RLightGBM_0.1.tar.gz", type="source", repos=NULL)
Installing package into ‘C:/Users/sugaos/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
Warning: 程辑包无效. 'RLightGBM_0.1.tar.gz'
错误: 错误:没有设定程序包
Warning in install.packages :
running command '"C:/PROGRA1/MICROS4/RSERVE~1/R_SERVER/bin/x64/R" CMD INSTALL -l "C:\Users\sugaos\Documents\R\win-library\3.3" "RLightGBM_0.1.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘RLightGBM_0.1.tar.gz’ had non-zero exit status
Thanks!
My computer: win10, 2cores, Mircorsoft R Server9.10
When I install it on Ubuntu, it shows such error:
../inst/include/RLightGBM.h:11:28: fatal error: LightGBM/api.hpp: no such that file or directory
I can't even run the demo file!
> source('D:/R/R-3.3.2/library/lightgbm/demo/boost_from_prediction.R')
[1] "start running example to start from a initial prediction"
[LightGBM] [Warning] Ignoring Column_32 , only has one value
[LightGBM] [Warning] Ignoring Column_34 , only has one value
[LightGBM] [Warning] Ignoring Column_37 , only has one value
[LightGBM] [Warning] Ignoring Column_56 , only has one value
[LightGBM] [Warning] Ignoring Column_58 , only has one value
[LightGBM] [Warning] Ignoring Column_87 , only has one value
[LightGBM] [Warning] Ignoring Column_88 , only has one value
[LightGBM] [Warning] Ignoring Column_96 , only has one value
[LightGBM] [Warning] Ignoring Column_102 , only has one value
[LightGBM] [Warning] Ignoring Column_103 , only has one value
Error in lgb.call("LGBM_DatasetCreateFromCSC_R", ret = handle, private$raw_data@p, :
api error: len of label is not same with #data
Hi,
I opened R in R-studio and copy and pasted the following to run:
library(devtools)
find_rtools()
install.packages("RLightGBM_0.2.tar.gz", type="source", repos=NULL)
After, I get the error:
Installing package into ‘C:/Users/Chris/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning: invalid package 'RLightGBM_0.2.tar.gz'
Error: ERROR: no packages specified
In R CMD INSTALL
Warning in install.packages :
running command '"C:/PROGRA1/R/R-341.3/bin/x64/R" CMD INSTALL -l "C:\Users\Chris\Documents\R\win-library\3.4" "RLightGBM_0.2.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘RLightGBM_0.2.tar.gz’ had non-zero exit status
I currently have "regular" lightgbm installed, but I am trying to get RLightgbm
Any help would be appreciated. Thank you.
Hey there, is it possible to include how to do a windows installation for this package?
Hi - would there be any chance RLightgbm could be updated to the latest lightgbm version? They've improved it a fair bit since, especially the latest category change.
I'd do it myself if I had any coding ability, but unfortunately far beyond me.
Regardless - thanks for writing this, it's been very useful.
Hi.
I get an error message while trying to install under Windows 10:
Command 'make -f "Makevars.win" -f "C:/PROGRA1/R/R-341.2/etc/x64/Makeconf" -f SHLIB="RLightGBM.dll" WIN=64 TCLBIN=64 ' resulted in Status 2
ERROR: compilation failed for package 'RLightGBM'
I guess it is a problem with compiling via mingw_64 as I managed to install the Microsoft package version by compiling with Visual Studio. Is there a way to compile your version the same way? Or any other ideas?
Thank you for your efforts!
I got the following error if I use caret tuneLength = 2:
Or what way you recommend for tuning parameters?
Hi @bwilbertz and thank you for the package,
While installing I had the following warnings:
I think it was something to do with how my Rtools is set up. I will investigate and come back with details
Hi,
My OS is windows 10 and R version is 3.3
I have downloaded RLightGBM and ran the following command:
R CMD build RLightGBM-master/pkg/RLightGBM
R CMD INSTALL RLightGBM.zip after converting tar.gz to zip file as I am in windows 10.
A folder named RLightGBM is present in my R folder \R\win-library\3.3. But in RStudio the below code library(RLightGBM) gives error:
Error in library(RLightGBM) :
‘RLightGBM’ is not a valid installed package
What am I missing.Please advise.
The two examples with caret are not really working for me, even though the example without caret works fine. In the sparse matrix case, I have this 'not efficient' running endlessly
#fit <- train(data.frame(idx = 1:nrow(iris)), iris$Species, method = model.sparse, matrix = mat, verbosity = 0)
#[LightGBM] [Info] Construct from CSC format is not efficient
#[LightGBM] [Info] Construct from CSC format is not efficient
#[LightGBM] [Info] Construct from CSC format is not efficient
#[LightGBM] [Info] Construct from CSC format is not efficient
if I stop, no fitting has been done:
print(fit)
#Error in print(fit) : object 'fit' not found
In the other example, RStudio keeps running and when I stop and check the warnings, they are of the form: num_used_iterations exceeding number of trained trees. Reducing num_used_iterations to 67. num_used_iterations exceeding number of trained trees. Reducing num_used_iterations to 82. etc
No fitting is done. here either. It's on Windows 10 with the latest CRAN / Github versions of caret as well as the latest R 3.4.0 (did not work with R 3.3.3 either). Further details are available if required.
Hi bwilbertz,
The package is working well and fast !
On the example with the lgbm.booster.train which you put on github (not the caret one)after training, is there an object with the model which we can save and load for later prediction ?
After training the objects I can see in the environment are handle.booster and handle.data.
Darragh.
- I got it ... its the handle.booster
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.