Vowpal Wabbit is a fast machine learning engine. Here are the steps to install Vowpal Wabbit on a CentOS machine. My machine is CentOS 6.5. Problem in some of the CentOS machines is that they have older versions of g++ while vowpal wabbit requires newer updated versions.
=>Step 1: Install cmake, libtool and git
# yum install git cmake libtool
=>Step 2: Install boost and boost-devel
# yum -y install boost
# yum -y install boost-devel
==> Step 3: Check g++ version. Should be 4.8+
$ g++ –version
If g++ version is not 4.8 then install devtools as follows:
First create repo file:
# gedit /etc/yum.repos.d/DevToolset.repo
And write to this file the following five lines and save:
[DevToolset-2]
name=RedHat DevToolset v2 $releasever – $basearch
baseurl=http://puias.princeton.edu/data/puias/DevToolset/6.5/x86_64/
enabled=1
gpgcheck=0
Next, download and install higher version of g++ :
# yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++
Your just installed g++ should be at: /opt/rh/devtoolset-2/root/usr/bin/g++. Rename your existing g++ file in /usr/bin/ folder to say /usr/bin/oldg++ . Then create a link at /usr/bin/ folder to just installed g++ file:
# ln -s /opt/rh/devtoolset-2/root/usr/bin/g++ /usr/bin/g++
=> Step 4: Download as follows vowpal wabbit from github to a localuser home folder (not necessarily root). A folder vowpal_wabbit will be created to contain all downloaded files.
$ git clone https://github.com/JohnLangford/vowpal_wabbit.git
=> Step 5: Install vowpal wabbit as:
$ cd /home/localuser/vowpal_wabbit/
$ ./autogen.sh
$ ./configure
$ make
# make install (as root)
This should finish installation of Vowpal Wabbit. If an error occurs and if any package is still to be installed that deficiency will be indicated by ./configure command above.
=> Step 6: Test your installation as:
$ vw -h
This finishes installation of Vowpal Wabbit on CentOS machine. By and large installation is smooth. You can now rename just downloaded /usr/bin/g++ file and restore the earlier g++ file back in /usr/bin.
We have used Vowpal Wabbit in Click Through Rate prediction and in Handwritten digits recognition. See this blog and also this blog.
Tags: vowpal wabbit centos
August 12, 2015 at 9:09 am |
thx,very useful
January 14, 2017 at 12:58 am |
I obtained a copy of a pre-compiled vw binary file, after countless hours of trying to install it on my RHEL machine and failing. If I just use this binary file, would there be a performance difference when using the library?