-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Train FieldAwareFactorizationMachines without providing arguments #2931
Changes from 3 commits
f233c90
dbcd0f0
2b12747
5fd2e6c
fe892c0
14a46f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,29 @@ namespace Microsoft.ML | |
/// </summary> | ||
public static class FactorizationMachineExtensions | ||
{ | ||
/// <summary> | ||
/// Predict a target using a field-aware factorization machine algorithm. | ||
/// </summary> | ||
/// <param name="catalog">The binary classification catalog trainer object.</param> | ||
/// <param name="featureColumnName">The name of the feature column.</param> | ||
/// <param name="labelColumnName">The name of the label column.</param> | ||
/// <param name="exampleWeightColumnName">The name of the example weight column (optional).</param> | ||
/// <example> | ||
/// <format type="text/markdown"> | ||
/// <![CDATA[ | ||
/// [!code-csharp[FieldAwareFactorizationMachine](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/FieldAwareFactorizationMachine.cs)] | ||
/// ]]></format> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this sample illustrate this API, or one of the other ones below? This first one and the second are failry similar, but the third API is a bit different; idk if it will get confusing. #Resolved |
||
/// </example> | ||
public static FieldAwareFactorizationMachineBinaryClassificationTrainer FieldAwareFactorizationMachine(this BinaryClassificationCatalog.BinaryClassificationTrainers catalog, | ||
string featureColumnName = DefaultColumnNames.Features, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A test please. #Resolved |
||
string labelColumnName = DefaultColumnNames.Label, | ||
string exampleWeightColumnName = null) | ||
{ | ||
Contracts.CheckValue(catalog, nameof(catalog)); | ||
var env = CatalogUtils.GetEnvironment(catalog); | ||
return new FieldAwareFactorizationMachineBinaryClassificationTrainer(env, new string[] { featureColumnName }, labelColumnName, exampleWeightColumnName); | ||
} | ||
|
||
/// <summary> | ||
/// Predict a target using a field-aware factorization machine algorithm. | ||
/// </summary> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add
Note that because there is only one feature column, the underlying model is equivalent to standard factorization machine
. #Resolved