Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated: FM removed need for _sparse_input hyperparameter #142

Merged
merged 1 commit into from
Dec 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@
"- `feature_dim` is set to 784, which is the number of pixels in each 28 x 28 image.\n",
"- `predictor_type` is set to 'binary_classifier' since we are trying to predict whether the image is or is not a 0.\n",
"- `mini_batch_size` is set to 200. This value can be tuned for relatively minor improvements in fit and speed, but selecting a reasonable value relative to the dataset is appropriate in most cases.\n",
"- `num_factors` is set to 10. As mentioned initially, factorization machines find a lower dimensional representation of the interactions for all features. Making this value smaller provides a more parsimonious model, closer to a linear model, but may sacrifice information about interactions. Making it larger provides a higher-dimensional representation of feature interactions, but adds computational complexity and can lead to overfitting. In a practical application, time should be invested to tune this parameter to the appropriate value.\n",
"- `_sparse_input` is set to 'false'. As mentioned previously, factorization machines are frequently used with sparse data, which is therefore what the algorithm expects. Setting this to false forces the algorithm to handle the dense recordIO-wrapped protobuf that we created above."
"- `num_factors` is set to 10. As mentioned initially, factorization machines find a lower dimensional representation of the interactions for all features. Making this value smaller provides a more parsimonious model, closer to a linear model, but may sacrifice information about interactions. Making it larger provides a higher-dimensional representation of feature interactions, but adds computational complexity and can lead to overfitting. In a practical application, time should be invested to tune this parameter to the appropriate value."
]
},
{
Expand All @@ -256,8 +255,7 @@
"fm.set_hyperparameters(feature_dim=784,\n",
" predictor_type='binary_classifier',\n",
" mini_batch_size=200,\n",
" num_factors=10,\n",
" _sparse_input='false')\n",
" num_factors=10)\n",
"\n",
"fm.fit({'train': s3_train_data})"
]
Expand Down