Coder Social home page Coder Social logo

xgboost's Introduction

XGBoost on Mac OS

XGBoost (eXtreme Gradient Boosting) is an advanced implementation of gradient boosting trees.

It is a machine learning algorithm that is very successful at tackling Kaggle's competition.

I was not able to install XGBoost on my Mac until I came across Jean Francois Puget's blog by chance.

Installation

go to root directory, type git clone command

git clone --recursive https://github.com/dmlc/xgboost

This downloads XGBoost code into xgboost directory

Compile for multi-threading

By default, Mac OS use cc/cc++ compilers, which do not support open MP option as required by XGBoost multi-threading. We need to specify how to compile

Change directory to XGBoost

cd xgboost

First copy this file so that any local changes will be ignored by git

cp make/config.mk

Open make/config.mk and modify

    vi make/config.mk
    Uncomment export CC = gcc
    Uncomment export CXX = g++

shift zz to save and exit

After lot of trials and errors, I found that I was using gcc 7.1.0. So I need to edit make/config.mk

    export CC = gcc-7
    export CXX = g++-7

where 7 refers to version of gcc

Build XGBoost

    cd xgboost; cp make/config.mk ./config.mk; make -j4

Running XGBoost

Once the build is finished, we can use XGBoost with its command line. I am using Python, hence I performed this final step. You may need to enter the admin password to execute it.

    cd python-package; sudo python setup.py install

xgboost's People

Contributors

pinemosquito avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.