mac上安装xlearn

本文详细介绍了在mac环境下安装xLearn的过程,包括下载安装xcode以获取clang,使用brew安装cmake,以及通过git clone和cmake编译安装xLearn。通过运行run_example.sh验证安装成功。xLearn是一款适用于大规模稀疏数据机器学习问题的高性能库,支持LR、FM和FFM等算法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

什么是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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值