Skip to content

Commit

Permalink
[SPARK-30995][ML][DOCS] Latex doesn't work correctly in FMClassifier/…
Browse files Browse the repository at this point in the history
…FMRegressor Scala doc

### What changes were proposed in this pull request?
Latex doesn't work correctly

### Why are the changes needed?
Fix the doc to make Latex work

### Does this PR introduce any user-facing change?
Before fix:

![image](https://user-images.githubusercontent.com/13592258/75611743-0fa00a00-5ad2-11ea-9cc0-4b246b25d63d.png)

![image](https://user-images.githubusercontent.com/13592258/75611755-25adca80-5ad2-11ea-884d-b2792b714bd5.png)

After fix:

![image](https://user-images.githubusercontent.com/13592258/75611776-46762000-5ad2-11ea-838d-f7f6f93c8aec.png)

![image](https://user-images.githubusercontent.com/13592258/75611778-51c94b80-5ad2-11ea-85e4-8c7424268f52.png)

### How was this patch tested?
Manually build doc and test

Closes apache#27748 from huaxingao/fm_doc.

Authored-by: Huaxin Gao <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
  • Loading branch information
huaxingao authored and HyukjinKwon committed Mar 2, 2020
1 parent f828453 commit 0a5e9a1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,16 @@ private[classification] trait FMClassifierParams extends ProbabilisticClassifier
* FM is able to estimate interactions even in problems with huge sparsity
* (like advertising and recommendation system).
* FM formula is:
* {{{
* <blockquote>
* $$
* \begin{align}
* y = \sigma\left( w_0 + \sum\limits^n_{i-1} w_i x_i +
* \sum\limits^n_{i=1} \sum\limits^n_{j=i+1} \langle v_i, v_j \rangle x_i x_j \right)
* }}}
* \end{align}
* $$
* </blockquote>
* First two terms denote global bias and linear term (as same as linear regression),
* and last term denotes pairwise interactions term. {{{v_i}}} describes the i-th variable
* and last term denotes pairwise interactions term. v_i describes the i-th variable
* with k factors.
*
* FM classification model uses logistic loss which can be solved by gradient descent method, and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,16 @@ private[regression] trait FMRegressorParams extends FactorizationMachinesParams
* FM is able to estimate interactions even in problems with huge sparsity
* (like advertising and recommendation system).
* FM formula is:
* {{{
* <blockquote>
* $$
* \begin{align}
* y = w_0 + \sum\limits^n_{i-1} w_i x_i +
* \sum\limits^n_{i=1} \sum\limits^n_{j=i+1} \langle v_i, v_j \rangle x_i x_j
* }}}
* \end{align}
* $$
* </blockquote>
* First two terms denote global bias and linear term (as same as linear regression),
* and last term denotes pairwise interactions term. {{{v_i}}} describes the i-th variable
* and last term denotes pairwise interactions term. v_i describes the i-th variable
* with k factors.
*
* FM regression model uses MSE loss which can be solved by gradient descent method, and
Expand Down

0 comments on commit 0a5e9a1

Please sign in to comment.