

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# Factorization Machines 超參數
<a name="fact-machines-hyperparameters"></a>

下表包含因式分解機演算法的超參數。這些是由使用者設定的參數，用來協助從資料預估模型參數。首先列出的是必須設定的超參數，依字母順序排列。接著列出的是選用的超參數，也是依字母順序排列。


| 參數名稱 | 說明 | 
| --- | --- | 
| feature\_dim | 輸入特徵空間的維度。在稀疏輸入中，此值可能極高。<br />**必要**<br />有效值：正整數。建議值範圍：[10000,10000000] | 
| num\_factors | 因式分解的維數。<br />**必要**<br />有效值：正整數。建議值範圍：[2,1000]，64 通常會產生良好的結果，而且是一個很好的起點。 | 
| predictor\_type | 預測器的類型。[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/sagemaker/latest/dg/fact-machines-hyperparameters.html)<br />**必要**<br />有效值：字串：`binary_classifier` 或 `regressor` | 
| bias\_init\_method | 偏差項的初始化方式：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/sagemaker/latest/dg/fact-machines-hyperparameters.html)<br />**選用**<br />有效值：`uniform`、`normal` 或 `constant`<br />預設值：`normal` | 
| bias\_init\_scale | 偏差項的初始化範圍。`bias_init_method` 設定為 `uniform` 時，才會生效。<br />**選用**<br />有效值：非負浮點數。建議值範圍：[1e-8, 512]。<br />預設值：NONE | 
| bias\_init\_sigma | 偏差項的初始化標準偏差。`bias_init_method` 設定為 `normal` 時，才會生效。<br />**選用**<br />有效值：非負浮點數。建議值範圍：[1e-8, 512]。<br />預設值：0.01 | 
| bias\_init\_value | 偏差項的初始值。`bias_init_method` 設定為 `constant` 時，才會生效。<br />**選用**<br />有效值：浮點數。建議值範圍：[1e-8, 512]。<br />預設值：NONE | 
| bias\_lr | 偏差項的學習率。<br />**選用**<br />有效值：非負浮點數。建議值範圍：[1e-8, 512]。<br />預設值：0.1 | 
| bias\_wd | 偏差項的權重衰減。<br />**選用**<br />有效值：非負浮點數。建議值範圍：[1e-8, 512]。<br />預設值：0.01 | 
| clip\_gradient | 漸層梯度最佳化程式參數。在間隔 [-`clip_gradient`, \+`clip_gradient`] 上輸入參數，即可剪裁梯度。<br />**選用**<br />有效值：浮點數<br />預設值：NONE | 
| epochs | 要執行的訓練 epoch 數量。<br />**選用**<br />有效值：正整數<br />預設值：1 | 
| eps | Epsilon 參數，以避免除以 0。<br />**選用**<br />有效值：浮點數。建議值：小。<br />預設值：NONE | 
| factors\_init\_method | 因式分解項的初始化方式：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/sagemaker/latest/dg/fact-machines-hyperparameters.html)<br />**選用**<br />有效值：`uniform`、`normal` 或 `constant`。<br />預設值：`normal` | 
| factors\_init\_scale  | 因式分解項的初始化範圍。`factors_init_method` 設定為 `uniform` 時，才會生效。<br />**選用**<br />有效值：非負浮點數。建議值範圍：[1e-8, 512]。<br />預設值：NONE | 
| factors\_init\_sigma | 因式分解項的初始化標準偏差。`factors_init_method` 設定為 `normal` 時，才會生效。<br />**選用**<br />有效值：非負浮點數。建議值範圍：[1e-8, 512]。<br />預設值：0.001 | 
| factors\_init\_value | 因式分解項的初始值。`factors_init_method` 設定為 `constant` 時，才會生效。<br />**選用**<br />有效值：浮點數。建議值範圍：[1e-8, 512]。<br />預設值：NONE | 
| factors\_lr | 因式分解項的學習率。<br />**選用**<br />有效值：非負浮點數。建議值範圍：[1e-8, 512]。<br />預設值：0.0001 | 
| factors\_wd | 因式分解項的權重衰減。<br />**選用**<br />有效值：非負浮點數。建議值範圍：[1e-8, 512]。<br />預設值：0.00001 | 
| linear\_lr | 線性項的學習率。<br />**選用**<br />有效值：非負浮點數。建議值範圍：[1e-8, 512]。<br />預設值：0.001 | 
| linear\_init\_method | 線性項的初始化方式：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/sagemaker/latest/dg/fact-machines-hyperparameters.html)<br />**選用**<br />有效值：`uniform`、`normal` 或 `constant`。<br />預設值：`normal` | 
| linear\_init\_scale | 線性項的初始化範圍。`linear_init_method` 設定為 `uniform` 時，才會生效。<br />**選用**<br />有效值：非負浮點數。建議值範圍：[1e-8, 512]。<br />預設值：NONE | 
| linear\_init\_sigma | 線性項的初始化標準偏差。`linear_init_method` 設定為 `normal` 時，才會生效。<br />**選用**<br />有效值：非負浮點數。建議值範圍：[1e-8, 512]。<br />預設值：0.01 | 
| linear\_init\_value | 線性項的初始值。`linear_init_method` 設定為 *constant* (固定) 時，才會生效。<br />**選用**<br />有效值：浮點數。建議值範圍：[1e-8, 512]。<br />預設值：NONE | 
| linear\_wd | 線性項的權重衰減。<br />**選用**<br />有效值：非負浮點數。建議值範圍：[1e-8, 512]。<br />預設值：0.001 | 
| mini\_batch\_size | 供訓練的小批量資料大小。<br />**選用**<br />有效值：正整數<br />預設值：1000 | 
| rescale\_grad | 漸層重新擴展最佳化程式參數。若設定完成，請先將梯度與 `rescale_grad` 相乘，再進行更新。通常會選擇 1.0/`batch_size`。<br />**選用**<br />有效值：浮點數<br />預設值：NONE | 