This project implements the binomial and multinomial factorization machines. Factorization machines are a generic approach that combines the generality of feature engineering with the superiority of factorization models in estimating interactions between categorical variables of large domain. Please refer to [Steffen Rendle (2010)] for more detail.
This implementation is based on Spark 2.0.0 as compared with the famous standalone implementation known as libfm. Some auxiliary codes (e.g., the optimization and Logging) were adopted from Spark's private internals.
FM is designed for binary-class classification problem as the standard libfm. Please refer to src/test/scala/io/github/qf6101/mfm/factorization/binomial/FmSuite.scala for detailed usage.
Note: The implementation takes the labels as +1/-1.
MFM is desinged for multi-class classification problem which uses softmax as hypothesis. Please refer to src/test/scala/io/github/qf6101/mfm/factorization/multinomial/MfmSuite.scala for detailed usage.
Note: The implementation takes the labels as 0, 1, 2, etc.