mac上安装xlearn

什么是xlearn

xLearn 是一款高性能的,易用的,并且可扩展的机器学习算法库,你可以用它来解决大规模机器学习问题,尤其是大规模稀疏数据机器学习问题。在近年来,大规模稀疏数据机器学习算法被广泛应用在各种领域,例如广告点击率预测、推荐系统等。如果你是 liblinear、libfm、libffm 的用户,那么现在 xLearn 将会是你更好的选择,因为 xLearn 几乎囊括了这些系统的全部功能,并且具有更好的性能,易用性,以及可扩展性。

其实基本就是这个LR,fm, ffm算法。

安装步骤

1. xcode for clang

https://developer.apple.com/download/more/
下载xcode并安装,是的,就是5-6G大小,而且解压缩之后11.8G

2. cmake

brew install cmake 即可。验证成功。

==> Auto-updated Homebrew!
Updated 2 taps (homebrew/cask and caskroom/versions).
No changes to formulae.

Warning: cmake 3.13.4 is already installed and up-to-date
To reinstall 3.13.4, run `brew reinstall cmake`

3. xlearn

安装步骤:’

git clone https://github.com/aksnzhy/xlearn.git

cd xlearn
mkdir build
cd build
cmake ../
make
  1. git clone
Receiving objects: 100% (8388/8388), 10.42 MiB | 463.00 KiReceiving objects: 100% (8388/8388), 10.60 MiB | 458.00 KiB/s, done.
Resolving deltas: 100% (6111/6111), done.
  1. cmake …/
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /git/xlearn/build
  1. make
[ 99%] Building CXX object src/c_api/CMakeFiles/xlearn_api_shared.dir/__/solver/solver.cc.o
[100%] Linking CXX shared library ../../lib/libxlearn_api.dylib
[100%] Built target xlearn_api_shared

运行程序

./run_example.sh

总结

  1. xlearn 是一个标准的库,可以快速做出baseline
  2. 包括了分类和回归 s(0,1,2是分类) (3,4,5是回归)
  3. lr、fm 分解机 和 ffm三种算法

参考文献

https://xlearn-doc-cn.readthedocs.io/en/latest/install/index.html

你可能感兴趣的:(算法)