

# Factorization Machines Hyperparameters
<a name="fact-machines-hyperparameters"></a>

The following table contains the hyperparameters for the Factorization Machines algorithm. These are parameters that are set by users to facilitate the estimation of model parameters from data. The required hyperparameters that must be set are listed first, in alphabetical order. The optional hyperparameters that can be set are listed next, also in alphabetical order.


| Parameter Name | Description | 
| --- | --- | 
| feature\_dim | The dimension of the input feature space. This could be very high with sparse input.<br />**Required**<br />Valid values: Positive integer. Suggested value range: [10000,10000000] | 
| num\_factors | The dimensionality of factorization.<br />**Required**<br />Valid values: Positive integer. Suggested value range: [2,1000], 64 typically generates good outcomes and is a good starting point. | 
| predictor\_type | The type of predictor.+  `binary_classifier`: For binary classification tasks. <br />+  `regressor`: For regression tasks. <br />**Required**<br />Valid values: String: `binary_classifier` or `regressor` | 
| bias\_init\_method | The initialization method for the bias term:+  `normal`: Initializes weights with random values sampled from a normal distribution with a mean of zero and standard deviation specified by `bias_init_sigma`. <br />+  `uniform`: Initializes weights with random values uniformly sampled from a range specified by [-`bias_init_scale`, \+`bias_init_scale`]. <br />+  `constant`: Initializes the weights to a scalar value specified by `bias_init_value`.  <br />**Optional**<br />Valid values: `uniform`, `normal`, or `constant`<br />Default value: `normal` | 
| bias\_init\_scale | Range for initialization of the bias term. Takes effect if `bias_init_method` is set to `uniform`. <br />**Optional**<br />Valid values: Non-negative float. Suggested value range: [1e-8, 512].<br />Default value: None | 
| bias\_init\_sigma | The standard deviation for initialization of the bias term. Takes effect if `bias_init_method` is set to `normal`. <br />**Optional**<br />Valid values: Non-negative float. Suggested value range: [1e-8, 512].<br />Default value: 0.01 | 
| bias\_init\_value | The initial value of the bias term. Takes effect if `bias_init_method` is set to `constant`. <br />**Optional**<br />Valid values: Float. Suggested value range: [1e-8, 512].<br />Default value: None | 
| bias\_lr | The learning rate for the bias term. <br />**Optional**<br />Valid values: Non-negative float. Suggested value range: [1e-8, 512].<br />Default value: 0.1 | 
| bias\_wd | The weight decay for the bias term. <br />**Optional**<br />Valid values: Non-negative float. Suggested value range: [1e-8, 512].<br />Default value: 0.01 | 
| clip\_gradient | Gradient clipping optimizer parameter. Clips the gradient by projecting onto the interval [-`clip_gradient`, \+`clip_gradient`]. <br />**Optional**<br />Valid values: Float<br />Default value: None | 
| epochs | The number of training epochs to run. <br />**Optional**<br />Valid values: Positive integer<br />Default value: 1 | 
| eps | Epsilon parameter to avoid division by 0.<br />**Optional**<br />Valid values: Float. Suggested value: small.<br />Default value: None | 
| factors\_init\_method | The initialization method for factorization terms:+  `normal` Initializes weights with random values sampled from a normal distribution with a mean of zero and standard deviation specified by `factors_init_sigma`. <br />+  `uniform`: Initializes weights with random values uniformly sampled from a range specified by [-`factors_init_scale`, \+`factors_init_scale`]. <br />+  `constant`: Initializes the weights to a scalar value specified by `factors_init_value`. <br />**Optional**<br />Valid values: `uniform`, `normal`, or `constant`.<br />Default value: `normal` | 
| factors\_init\_scale  | The range for initialization of factorization terms. Takes effect if `factors_init_method` is set to `uniform`. <br />**Optional**<br />Valid values: Non-negative float. Suggested value range: [1e-8, 512].<br />Default value: None | 
| factors\_init\_sigma | The standard deviation for initialization of factorization terms. Takes effect if `factors_init_method` is set to `normal`. <br />**Optional**<br />Valid values: Non-negative float. Suggested value range: [1e-8, 512].<br />Default value: 0.001 | 
| factors\_init\_value | The initial value of factorization terms. Takes effect if `factors_init_method` is set to `constant`. <br />**Optional**<br />Valid values: Float. Suggested value range: [1e-8, 512].<br />Default value: None | 
| factors\_lr | The learning rate for factorization terms. <br />**Optional**<br />Valid values: Non-negative float. Suggested value range: [1e-8, 512].<br />Default value: 0.0001 | 
| factors\_wd | The weight decay for factorization terms. <br />**Optional**<br />Valid values: Non-negative float. Suggested value range: [1e-8, 512].<br />Default value: 0.00001 | 
| linear\_lr | The learning rate for linear terms. <br />**Optional**<br />Valid values: Non-negative float. Suggested value range: [1e-8, 512].<br />Default value: 0.001 | 
| linear\_init\_method | The initialization method for linear terms:+  `normal` Initializes weights with random values sampled from a normal distribution with a mean of zero and standard deviation specified by `linear_init_sigma`. <br />+  `uniform` Initializes weights with random values uniformly sampled from a range specified by [-`linear_init_scale`, \+`linear_init_scale`]. <br />+  `constant` Initializes the weights to a scalar value specified by `linear_init_value`. <br />**Optional**<br />Valid values: `uniform`, `normal`, or `constant`.<br />Default value: `normal` | 
| linear\_init\_scale | Range for initialization of linear terms. Takes effect if `linear_init_method` is set to `uniform`. <br />**Optional**<br />Valid values: Non-negative float. Suggested value range: [1e-8, 512].<br />Default value: None | 
| linear\_init\_sigma | The standard deviation for initialization of linear terms. Takes effect if `linear_init_method` is set to `normal`. <br />**Optional**<br />Valid values: Non-negative float. Suggested value range: [1e-8, 512].<br />Default value: 0.01 | 
| linear\_init\_value | The initial value of linear terms. Takes effect if `linear_init_method` is set to *constant*. <br />**Optional**<br />Valid values: Float. Suggested value range: [1e-8, 512].<br />Default value: None | 
| linear\_wd | The weight decay for linear terms.<br />**Optional**<br />Valid values: Non-negative float. Suggested value range: [1e-8, 512].<br />Default value: 0.001 | 
| mini\_batch\_size | The size of mini-batch used for training. <br />**Optional**<br />Valid values: Positive integer<br />Default value: 1000 | 
| rescale\_grad | Gradient rescaling optimizer parameter. If set, multiplies the gradient with `rescale_grad` before updating. Often choose to be 1.0/`batch_size`. <br />**Optional**<br />Valid values: Float<br />Default value: None | 