zoukankan      html  css  js  c++  java
  • spark mllib als 参数

    在一定范围内按照排列组合方式对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:anacondalibsite-packagespysparkmllib ecommendation.py Type: method
  • 相关阅读:
    H5版俄罗斯方块(5)---需求演进和产品迭代
    vim 常用 NERDTree 快捷键
    C和C++中include 搜索路径的一般形式以及gcc搜索头文件的路径
    MySQL复制协议
    深入解析MySQL replication协议
    Install CodeBlocks in CentOS 7
    Impala 源码分析-FE
    Elasticsearch 6.x 的分页查询数据
    1、树莓派3B开箱+安装系统
    Python创建ES索引
  • 原文地址:https://www.cnblogs.com/lqerio/p/11188356.html
Copyright © 2011-2022 走看看