xgboost

Python Modify OS Path Variable

天涯浪子 提交于 2019-12-12 03:42:25
问题 I am going to try and say this right but it's a bit outside my area of expertise. I am using the xgboost library in a windows environment with Python 2.7 which requires all kinds of nasty compiling and installation. That done, the instructions I'm following tell me I need to modify the OS Path Variable in an iPython notebook before I actually import the library for use. The instructions tell me to run the following: import os mingw_path = 'C:\\Program Files\\mingw-w64\\x86_64-5.3.0-posix-seh

human readable rules from xgboost in R

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 03:31:24
问题 I try to use xgboost in R to get rules (gbtree) from my data, so I can use the rules in an other system (not predicted data with 'predict'). The Input-Data have appr. 1500 colums and 40 Mio rows with binary, sparse data and the Label is a binary column, too. library(xgboost) library(Matrix) labels <- data.frame(labels = sample.int(2, m*1, TRUE)-1L) observations <- Matrix(as.matrix(data.frame(feat_01=sample.int(2, size=100, T) -1, feat_02=sample.int(2, size=100, T) -1, feat_03=sample.int(2,

xgboost: which parameters are used in the linear booster gblinear?

余生长醉 提交于 2019-12-12 02:12:39
问题 Looking on the web I am still a confused about what the linear booster gblinear precisely is and I am not alone. Following the documentation it only has 3 parameters lambda ,lambda_ bias and alpha - maybe it should say "additional parameters". If I understand this correctly then the linear booster does (rather standard) linear boosting (with regularization). In this context I can only make sense of the 3 parameters above and eta (the boosting rate). That's also how it is described on github.

adjust weights for predicted classes in xgboost in loss function

大城市里の小女人 提交于 2019-12-12 00:47:31
问题 Is it possible to adjust the weighted error for a given target? What Im trying to do is weight the loss higher for rarer classes when predicting multi-classes. 回答1: If using the core data structure you can set the weight of labels through the "set_weight" parameter: set_weight(weight) Set weight of each instance. Parameters: weight (array like) – Weight for each data point While documentation is quite lackluster on that topic, i have found a reasonable answer that might be useful on this

Install xgboost under python with 64-bit msys failing

独自空忆成欢 提交于 2019-12-12 00:25:32
问题 I want to install xgboost using anaconda python. In this process, I am trying to install xgboost. While trying to "make" the xgboost i am getting the below error: C:\GitRepository\xgboost> g++ -m64 -c -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -fopenmp -fPIC -o updater.o src/tree/updater.cpp src/tree/updater.cpp:1:0: warning: -fPIC ignored for target (all code is positio n independent) // Copyright 2014 by Contributors ^ src/tree/updater.cpp:1:0: sorry, unimplemented: 64-bit mode

Visualize strengths and weaknesses of a sample from pre-trained model

懵懂的女人 提交于 2019-12-11 16:43:24
问题 Let's say I'm trying to predict an apartment price. So, I have a lot of labeled data, where on each apartment I have features that could affect the price like: city street floor year built socioeconomic status square feet etc. And I train a model, let's say XGBOOST. Now, I want to predict the price of a new apartment. Is there a good way to show what is "good" in this apartment, and what is bad, and by how much (scaled 0-1)? For example: The floor number is a "strong" feature (i.e. - in this

How to install xgboost on PythonAnywhere?

独自空忆成欢 提交于 2019-12-11 16:35:45
问题 i am trying this : git clone --recursive https://github.com/dmlc/xgboost cd xgboost make -j4 cd python-package python setup.py install but i get the following error: ~/xgboost $ python setup.py develop --user python: can't open file 'setup.py': [Errno 2] No such file or directory how can i install xgboost or something similar(xgb magic,lightgbm ) on PythonAnywhere? 来源: https://stackoverflow.com/questions/46800464/how-to-install-xgboost-on-pythonanywhere

R, xgboost: label must be in [0,1] for logistic regression

試著忘記壹切 提交于 2019-12-11 14:03:50
问题 I am getting an error saying that my label must be in [0, 1]: > system.time(xgb <- xgboost(params = param, + data = dtrain, + label = as.numeric(train.label), + nrounds = 500, + print_every_n = 100, + verbose = 1)) Error in xgb.iter.update(bst$handle, dtrain, iteration - 1, obj) : [10:39:29] amalgamation/../src/objective/regression_obj.cc:108: label must be in [0,1] for logistic regression Timing stopped at: 0.11 0 0.11 However, my label is in [0, 1]: > train.label [1] 1 1 1 1 1 0 0 1 1 0 0 1

XGBoost Installation in windows

≡放荡痞女 提交于 2019-12-11 07:32:40
问题 I am trying to install xgboost in anaconda in windows environment. Win 8.1, 64-bit, Python-3.5. How can I create a shared library for xgboost as mention in Installation Guide This page gives instructions on how to build and install the xgboost package from scratch on various systems. It consists of two steps: First build the shared library from the C++ codes (libxgboost.so for linux/osx and libxgboost.dll for windows). Exception: for R-package installation please directly refer to the R

Fail to install R XGBoost with GPU support on Windows 7

梦想的初衷 提交于 2019-12-11 07:32:01
问题 I tried to install XGBoost with GPU support in R on Windows 7. I followed the installation guide here (http://xgboost.readthedocs.io/en/latest/build.html#installing-r-package-with-gpu-support) and was all fine until the last step. I have spent past few days on searching and could not find solutions. Can somebody please help me? This was the procedure I followed, in Git Bash: git clone --recursive https://github.com/dmlc/xgboost cd xgboost git submodule init git submodule update mkdir build cd