欢迎使用 FMLearn !¶
FMLearn 是一款高性能的,易用的,并且可扩展的机器学习算法库。
快速开始¶
安装 FMLearn¶
:: pip install fmlearn
Python 样例¶
import fmlearn as fl
X, y = load_digits(n_class=2, return_X_y=True)
y[y == 0] = -1
X = normalize(X)
X_train_, X_test_, y_train_, y_test_ = train_test_split(X, y, test_size=0.2, random_state=12)
print(X_train_.shape)
_, n_features = X.shape
fl.FactorizationMachine.set_log_level(0)
fm = fl.FactorizationMachine(1, n_features, 100,
0.0001, [0.1, 0.1, 0.1],
0.0, 0.1,
True, True)
fm.fit(X_train_, y_train_, 1000)
目录¶
安装指南¶
通过Pip安装¶
暂时不支持
从源代码安装¶
Linux 下安装¶
sudo apt-get install git
sudo apt-get install cmake
git clone https://github.com/naihaishy/FMLearn.git
cd FMLearn
mkdir build && cd build
cmake ..
make && make install
Windows 下安装¶
安装Visual Studio¶
如果你的 Windows 系统已经安装过 Visual Studio,你可以跳过这一步。
从 https://visualstudio.microsoft.com/downloads/ 下载你所需要的 Visual studio
安装Cmake¶
如果你的系统已经安装了 CMake,你可以跳过这一步
从这里 https://cmake.org/download/ 下载最新版本 (至少 v3.10) CMake。请确保安装 CMake 后将其路径正确添加到你的系统路径。
编译¶
下载源代码执行 build.bat
注意 如果您的编译器不是 Visual Studio 15 2017, 则定制修改build.bat 即可
执行完会打开VS项目
构建ALL_BUILD
构建INSTALL
结果全部在results目录下, 执行run_test.bat执行测试