funrec
funrec 是基于 PyTorch 的深度学习推荐模型与特征工程工具集,提供 CTR 模型、特征列和常用网络层。
安装
pip install funrec
使用
最小示例:
import torch
from funrec.inputs import DenseFeat, SparseFeat, build_input_features
from funrec.models import DeepFM
columns = [SparseFeat("user", 4, embedding_dim=4), DenseFeat("score")]
model = DeepFM(columns, columns, dnn_hidden_units=(8, 4))
features = build_input_features(columns)
x = torch.zeros(2, len(features))
print(model(x).shape) # torch.Size([2, 1])
更多训练示例见 examples/,运行前需额外安装 pip install funrec[examples](含 pandas),
各脚本按自身文件路径解析同目录下的数据文件,直接执行 python examples/<脚本名>.py 即可,
无需切换工作目录。MIND 模型的训练与召回评估(funrec.models.p2019.mind.train)还需要
faiss/matplotlib,安装 pip install funrec[mind]。
感恩的心
- DeepCTR 易用可扩展的深度学习点击率预测算法包。
- DeepCTR:上游项目采用 MIT License。
- DeepCTR-Torch:上游项目采用 MIT License,本项目部分代码来源于此。
- fun-rec 推荐系统的整体介绍,包含 推荐系统概述、推荐算法基础、推荐系统实战和推荐系统面经
关于 farfarfun
farfarfun 是一个专注于实用工具库的开源组织, 涵盖云存储、数据处理、AI、多媒体与开发工具链等方向。
- 🏠 组织主页:https://github.com/farfarfun
- 📦 PyPI:https://pypi.org/user/niuliangtao/
- 📧 联系:farfarfun@qq.com
本项目基于 MIT 协议开源。
Metadata
Release files for funrec 1.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| funrec-1.0.10-py3-none-any.whl | Python 3 | none | any | Details for funrec-1.0.10-py3-none-any.whl |
Release files / funrec-1.0.10-py3-none-any.whl
| Download URL | funrec-1.0.10-py3-none-any.whl |
|---|---|
| Size | 115.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b80bed085ac4ed23b76bc67aac3854d427e9ee6fb1f9caaa4e8415a73f8998fc
|
|
BLAKE2b-256 checksum How to use checksums |
2b489b2d16d4c94e13b20603ea70e4d941d9bfb1e9cccf807ea0733e697bdb5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for funrec 1.0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.