You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Microsoft.ML.StandardTrainers/FactorizationMachine/FactorizationMachineCatalog.cs
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -14,19 +14,19 @@ namespace Microsoft.ML
14
14
publicstaticclassFactorizationMachineExtensions
15
15
{
16
16
/// <summary>
17
-
/// Predict a target using a field-aware factorization machine algorithm.
17
+
/// Create <see cref="FieldAwareFactorizationMachineTrainer"/>, which predicts a target using a field-aware factorization machine trained over boolean label data.
18
18
/// </summary>
19
19
/// <remarks>
20
20
/// Note that because there is only one feature column, the underlying model is equivalent to standard factorization machine.
/// <param name="featureColumnName">The name of the feature column.</param>
24
-
/// <param name="labelColumnName">The name of the label column.</param>
23
+
/// <param name="labelColumnName">The name of the label column. The column data must be <see cref="System.Boolean"/>.</param>
24
+
/// <param name="featureColumnName">The name of the feature column. The column data must be a known-sized vector of <see cref="System.Single"/>.</param>
25
25
/// <param name="exampleWeightColumnName">The name of the example weight column (optional).</param>
@@ -40,11 +40,11 @@ public static FieldAwareFactorizationMachineTrainer FieldAwareFactorizationMachi
40
40
}
41
41
42
42
/// <summary>
43
-
/// Predict a target using a field-aware factorization machine algorithm.
43
+
/// Create <see cref="FieldAwareFactorizationMachineTrainer"/>, which predicts a target using a field-aware factorization machine trained over boolean label data.
/// <param name="featureColumnNames">The name(s) of the feature columns.</param>
47
-
/// <param name="labelColumnName">The name of the label column.</param>
46
+
/// <param name="labelColumnName">The name of the label column. The column data must be <see cref="System.Boolean"/>.</param>
47
+
/// <param name="featureColumnNames">The names of the feature columns. The column data must be a known-sized vector of <see cref="System.Single"/>.</param>
48
48
/// <param name="exampleWeightColumnName">The name of the example weight column (optional).</param>
49
49
/// <example>
50
50
/// <format type="text/markdown">
@@ -63,10 +63,10 @@ public static FieldAwareFactorizationMachineTrainer FieldAwareFactorizationMachi
63
63
}
64
64
65
65
/// <summary>
66
-
/// Predict a target using a field-aware factorization machine algorithm.
66
+
/// Create <see cref="FieldAwareFactorizationMachineTrainer"/> using advanced options, which predicts a target using a field-aware factorization machine trained over boolean label data.
/// The <see cref="IEstimator{TTransformer}"/> to predict a target using a field-aware factorization machine model trained using a stochastic gradient method.
/// To create this trainer, use [FieldAwareFactorizationMachine](xref:Microsoft.ML.FactorizationMachineExtensions.FieldAwareFactorizationMachine(Microsoft.ML.BinaryClassificationCatalog.BinaryClassificationTrainers,System.String,System.String,System.String))
/// or [FieldAwareFactorizationMachine(Options)](xref:Microsoft.ML.FactorizationMachineExtensions.FieldAwareFactorizationMachine(Microsoft.ML.BinaryClassificationCatalog.BinaryClassificationTrainers,Microsoft.ML.Trainers.FieldAwareFactorizationMachineTrainer.Options)).
42
+
///
43
+
/// In contrast to other binary classifiers which can only support one feature column, field-aware factorization machine can consume multiple feature columns.
44
+
/// Each column is viewed as a container of some features and such a container is called a field.
45
+
/// Note that all feature columns must be float vectors but their dimensions can be different.
46
+
/// The motivation of splitting features into different fields is to model features from different distributions independently.
47
+
/// For example, in online game store, features created from user profile and those from game profile can be assigned to two different fields.
/// | Required NuGet in addition to Microsoft.ML | None |
56
+
///
57
+
/// ### Background
58
+
/// Factorization machine family is a powerful model group for supervised learning problems.
59
+
/// It was first introduced in Steffen Rendle's [Factorization Machines](http://ieeexplore.ieee.org/document/5694074/?reload=true) paper in 2010.
60
+
/// Later, one of its generalized versions, field-aware factorization machine, became an important predictive module in recent recommender systems and click-through rate prediction contests.
61
+
/// For examples, see winning solutions in Steffen Rendle's KDD-Cup 2012 ([Track 1](http://www.kdd.org/kdd-cup/view/kdd-cup-2012-track-1) and [Track 2](http://www.kdd.org/kdd-cup/view/kdd-cup-2012-track-2)),
62
+
/// [Criteo's](https://www.kaggle.com/c/criteo-display-ad-challenge), [Avazu's](https://www.kaggle.com/c/avazu-ctr-prediction), and [Outbrain's](https://www.kaggle.com/c/outbrain-click-prediction) click prediction challenges on Kaggle.
63
+
///
64
+
/// Factorization machines are especially powerful when feature conjunctions are extremely correlated to the signal you want to predict.
65
+
/// An example of feature pairs which can form important conjunctions is user ID and music ID in music recommendation.
66
+
/// When a dataset consists of only dense numerical features, usage of factorization machine is not recommended or some featurizations should be performed.
67
+
///
68
+
/// ### Scoring Function
69
+
/// Field-aware factorization machine is a scoring function which maps feature vectors from different fields to a scalar score.
70
+
/// Assume that all $m$ feature columns are concatenated into a long feature vector $\boldsymbol{x}\in {\mathbb R}^n$ and ${\mathcal F}(j)$ denotes the $j$-th feature's field indentifier.
/// where $\left\langle \cdot, \cdot \right\rangle$ is the inner product operator, $\boldsymbol{w}\in{\mathbb R}^n$ stores the linear coefficients, and $\boldsymbol{v}_{j, f}\in {\mathbb R}^k$ is the $j$-th feature's representation in the $f$-th field's latent space.
73
+
/// Note that $k$ is the latent dimension specified by the user.
74
+
/// The predicted label is the sign of $\hat{y}$. If $\hat{y} > 0$, this model predicts true. Otherwise, it predicts false.
75
+
/// For a systematic introduction to field-aware factorization machine, please see [this paper](https://www.csie.ntu.edu.tw/~cjlin/papers/ffm.pdf)
76
+
///
77
+
/// ### Training Algorithm Details
78
+
/// The implemented algorithm in <see cref="FieldAwareFactorizationMachineTrainer"/> is based on [a stochastic gradient method](http://jmlr.org/papers/volume12/duchi11a/duchi11a.pdf).
79
+
/// Algorithm details is described in Algorithm 3 in [a online document](https://github.com/wschin/fast-ffm/blob/master/fast-ffm.pdf).
80
+
/// The minimized loss function is [logistic loss](https://en.wikipedia.org/wiki/Loss_functions_for_classification), so the trained model can be viewed as a non-linear logistic regression.
0 commit comments