spark mllib als 参数
2024-09-02 06:23:29
在一定范围内按照排列组合方式对rank,iterations,lambda进行交叉评估(根据均方根误差),
找到最小误差的组合,用于建立矩阵分解模型。
Signature:
ALS.train(
ratings,
rank,
iterations=5,
lambda_=0.01,
blocks=-1,
nonnegative=False,
seed=None,
)
Docstring:
Train a matrix factorization model given an RDD of ratings by users
for a subset of products. The ratings matrix is approximated as the
product of two lower-rank matrices of a given rank (number of
features). To solve for these features, ALS is run iteratively with
a configurable level of parallelism. :param ratings:
RDD of `Rating` or (userID, productID, rating) tuple.
:param rank: #矩阵分解秩
Number of features to use (also referred to as the number of latent factors).
:param iterations: #迭代次数
Number of iterations of ALS.
(default: 5)
:param lambda_: #正则系数
Regularization parameter.
(default: 0.01)
:param blocks:
Number of blocks used to parallelize the computation. A value
of -1 will use an auto-configured number of blocks.
(default: -1)
:param nonnegative:
A value of True will solve least-squares with nonnegativity
constraints.
(default: False)
:param seed:
Random seed for initial matrix factorization model. A value
of None will use system time as the seed.
(default: None) .. versionadded:: 0.9.0
File: f:\anaconda\lib\site-packages\pyspark\mllib\recommendation.py
Type: method
最新文章
- 听H3絮叨:何以让天下没有难用的流程
- Android中实现如下多语言选择Radiobutton效果
- CF453B Little Pony and Harmony Chest (状压DP)
- backtracking(回溯算法)
- Android滚动截屏,ScrollView截屏
- SQL Server类型与C#类型对应关系
- 自学HTML5第三节(拖放效果)
- 理解ROS的节点(NODE)
- LINUX中磁盘挂载与卸除
- CSS 基础
- centos6.5下redis安装步骤总结
- 比sun.misc.Encoder()/Decoder()的base64更高效的mxBase64算法
- LeetCode - Backspace String Compare
- MySQL的binlog及关闭方法
- kubernetes ceph-rbd挂载步骤 类型storageClass
- 解决 nginx 出现 413 Request Entity Too Large 的问题
- webpack学习笔记—优化缓存、合并、懒加载等
- [Usaco2009 Feb]Revamping Trails 道路升级 BZOJ1579
- Python3基础 file for+文件指针 读取txt文本并 一行一行的输出(高效率)
- Android ListView demo