All Projects → hibayesian → spark-fm

hibayesian / spark-fm

Licence: Apache-2.0 license
A parallel implementation of factorization machines based on Spark

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to spark-fm

Pytorch Fm
Factorization Machine models in PyTorch
Stars: ✭ 455 (+523.29%)
Mutual labels:  factorization-machines
Rankfm
Factorization Machines for Recommendation and Ranking Problems with Implicit Feedback Data
Stars: ✭ 71 (-2.74%)
Mutual labels:  factorization-machines
Polylearn
A library for factorization machines and polynomial networks for classification and regression in Python.
Stars: ✭ 222 (+204.11%)
Mutual labels:  factorization-machines
Lightctr
Lightweight and Scalable framework that combines mainstream algorithms of Click-Through-Rate prediction based computational DAG, philosophy of Parameter Server and Ring-AllReduce collective communication.
Stars: ✭ 644 (+782.19%)
Mutual labels:  factorization-machines
Deepmatch
A deep matching model library for recommendations & advertising. It's easy to train models and to export representation vectors which can be used for ANN search.
Stars: ✭ 1,051 (+1339.73%)
Mutual labels:  factorization-machines
Flurs
🌊 FluRS: A Python library for streaming recommendation algorithms
Stars: ✭ 97 (+32.88%)
Mutual labels:  factorization-machines
Openlearning4deeprecsys
Some deep learning based recsys for open learning.
Stars: ✭ 383 (+424.66%)
Mutual labels:  factorization-machines
nowplaying-RS-Music-Reco-FM
#nowplaying-RS: Music Recommendation using Factorization Machines
Stars: ✭ 23 (-68.49%)
Mutual labels:  factorization-machines
Ctr model zoo
some ctr model, implemented by PyTorch, such as Factorization Machines, Field-aware Factorization Machines, DeepFM, xDeepFM, Deep Interest Network
Stars: ✭ 55 (-24.66%)
Mutual labels:  factorization-machines
Deeptables
DeepTables: Deep-learning Toolkit for Tabular data
Stars: ✭ 207 (+183.56%)
Mutual labels:  factorization-machines
Tffm
TensorFlow implementation of an arbitrary order Factorization Machine
Stars: ✭ 761 (+942.47%)
Mutual labels:  factorization-machines
Attentional Neural Factorization Machine
Attention,Factorization Machine, Deep Learning, Recommender System
Stars: ✭ 39 (-46.58%)
Mutual labels:  factorization-machines
Fmg
KDD17_FMG
Stars: ✭ 116 (+58.9%)
Mutual labels:  factorization-machines
Deepctr
Easy-to-use,Modular and Extendible package of deep-learning based CTR models .
Stars: ✭ 5,686 (+7689.04%)
Mutual labels:  factorization-machines
customer churn prediction
零售电商客户流失模型,基于tensorflow,xgboost4j-spark,spark-ml实现LR,FM,GBDT,RF,进行模型效果对比,离线/在线部署方式总结
Stars: ✭ 58 (-20.55%)
Mutual labels:  factorization-machines
Neural factorization machine
TenforFlow Implementation of Neural Factorization Machine
Stars: ✭ 422 (+478.08%)
Mutual labels:  factorization-machines
Fwumious wabbit
Fwumious Wabbit, fast on-line machine learning toolkit written in Rust
Stars: ✭ 96 (+31.51%)
Mutual labels:  factorization-machines
deep-ctr
No description or website provided.
Stars: ✭ 92 (+26.03%)
Mutual labels:  factorization-machines
Recommendation.jl
Building recommender systems in Julia
Stars: ✭ 42 (-42.47%)
Mutual labels:  factorization-machines
Rsparse
Fast and accurate machine learning on sparse matrices - matrix factorizations, regression, classification, top-N recommendations.
Stars: ✭ 145 (+98.63%)
Mutual labels:  factorization-machines

Spark-FM

Factorization Machines is a general predictor like SVMs but is also able to estimate reliable parameters under very high sparsity. However, they are costly to scale to large amounts of data and large numbers of features. Spark-FM is a parallel implementation of factorization machines based on Spark. It aims to utilize Spark's in-memory computing to address above problems.

Highlight

In order to meet users' demands, Spark-FM supports various of optimization methods to train the model as follows.

  • Mini-batch Stochastic Gradient Descent (MLlib)
  • L-BFGS (MLlib)
  • Parallel Stochastic Gradient Descent (spark-optim)
  • Parallel Ftrl (spark-optim)

Examples

Scala API

val spark = SparkSession
  .builder()
  .appName("FactorizationMachinesExample")
  .master("local[*]")
  .getOrCreate()

val train = spark.read.format("libsvm").load("data/a9a.tr")
val test = spark.read.format("libsvm").load("data/a9a.te")

val trainer = new FactorizationMachines()
  .setAlgo(Algo.fromString("binary classification"))
  .setSolver(Solver.fromString("pftrl"))
  .setDim((1, 1, 8))
  .setReParamsL1((0.1, 0.1, 0.1))
  .setRegParamsL2((0.01, 0.01, 0.01))
  .setAlpha((0.1, 0.1, 0.1))
  .setBeta((1.0, 1.0, 1.0))
  .setInitStdev(0.01)
  // .setStepSize(0.1)
  .setTol(0.001)
  .setMaxIter(1)
  .setThreshold(0.5)
  // .setMiniBatchFraction(0.5)
  .setNumPartitions(4)

val model = trainer.fit(train)
val result = model.transform(test)
val predictionAndLabel = result.select("prediction", "label")
val evaluator = new MulticlassClassificationEvaluator().setMetricName("accuracy")
println("Accuracy: " + evaluator.evaluate(predictionAndLabel))
spark.stop()

Requirements

Spark-FM is built against Spark 2.1.1.

Build From Source

sbt package

Licenses

Spark-FM is available under Apache Licenses 2.0.

Contact & Feedback

If you encounter bugs, feel free to submit an issue or pull request. Also you can mail to:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].