Amazon SageMaker
Developer Guide

Factorization Machines Hyperparameters

Parameter Name Description
feature_dim

Dimension of the input feature space. This could be very high with sparse input. Required.

Valid values: Positive integer. Suggested value range: [10000,10000000]

Default value: -

num_factors

Dimensionality of factorization. Required.

Valid values: Positive integer. Suggested value range: [2,1000]

Default value: -

predictor_type

Type of predictor. Required.

Valid values: String: binary_classifier or regressor

Default value: -

mini_batch_size

Size of mini-batch used for training.

Valid values: positive integer

Default value: 1000

epochs

Number of training epochs to run.

Valid values: positive integer

Default value: 1

clip_gradient

Optimizer parameter. Clip the gradient by projecting onto the box [-clip_gradient, +clip_gradient].

Valid values: float

Default value: -

eps

Optimizer parameter. Small value to avoid division by 0.

Valid values: float

Default value: -

rescale_grad

Optimizer parameter. If set, multiplies the gradient with rescale_grad before updating. Often choose to be 1.0/batch_size.

Valid values: float

Default value: -

bias_lr

Learning rate for the bias term.

Valid values: Non-negative float. Suggested value range: [1e-8, 512].

Default value: 0.1

linear_lr

Learning rate for linear terms.

Valid values: Non-negative float. Suggested value range: [1e-8, 512].

Default value: 0.001

factors_lr

Learning rate for factorization terms.

Valid values: Non-negative float. Suggested value range: [1e-8, 512].

Default value: 0.0001

bias_wd

Weight decay for the bias term.

Valid values: Non-negative float. Suggested value range: [1e-8, 512].

Default value: 0.01

linear_wd

Weight decay for linear terms.

Valid values: Non-negative float. Suggested value range: [1e-8, 512].

Default value: 0.001

factors_wd

Weight decay for factorization terms.

Valid values: Non-negative float. Suggested value range: [1e-8, 512].

Default value: 0.00001

bias_init_method

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.

  • uniform: Initializes weights with random values uniformly sampled from a range specified by [-bias_init_scale, +bias_init_scale].

  • constant: Initializes the weights to a scalar value specified by bias_init_value.

Valid values: uniform, normal, or constant

Default value: normal

bias_init_scale

Range for initialization of the bias term. Takes effect if bias_init_method is set to uniform.

Valid values: Non-negative float. Suggested value range: [1e-8, 512].

Default value: -

bias_init_sigma

Standard deviation for initialization of the bias term. Takes effect if bias_init_method is set to normal.

Valid values: Non-negative float. Suggested value range: [1e-8, 512].

Default value: 0.01

bias_init_value

Initial value of the bias term. Takes effect if bias_init_method is set to constant.

Valid values: Float. Suggested value range: [1e-8, 512]/

Default value: -

linear_init_method

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.

  • uniform Initializes weights with random values uniformly sampled from a range specified by [-linear_init_scale, +linear_init_scale].

  • constant Initializes the weights to a scalar value specified by linear_init_value.

Valid values: uniform, normal, or constant.

Default value: normal

linear_init_scale

Range for initialization of linear terms. Takes effect if linear_init_method is set to uniform.

Valid values: Non-negative float. Suggested value range: [1e-8, 512].

Default value: -

linear_init_sigma

Standard deviation for initialization of linear terms. Takes effect if linear_init_method is set to normal.

Valid values: Non-negative float. Suggested value range: [1e-8, 512].

Default value: 0.01

linear_init_value

Initial value of linear terms. Takes effect if linear_init_method is set to constant.

Valid values: Float. Suggested value range: [1e-8, 512].

Default value: -

factors_init_method

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.

  • uniform: Initializes weights with random values uniformly sampled from a range specified by [-factors_init_scale, +factors_init_scale].

  • constant: Initializes the weights to a scalar value specified by factors_init_value.

Valid values: uniform, normal, or constant.

Default value: normal

factors_init_scale

Range for initialization of factorization terms. Takes effect if factors_init_method is set to uniform.

Valid values: Non-negative float. Suggested value range: [1e-8, 512].

Default value: -

factors_init_sigma

Standard deviation for initialization of factorization terms. Takes effect if factors_init_method is set to normal.

Valid values: Non-negative float. Suggested value range: [1e-8, 512].

Default value: 0.001

factors_init_value

Initial value of factorization terms. Takes effect if factors_init_method is set to constant.

Valid values: Float. Suggested value range: [1e-8, 512].

Default value: -