Skip to content

Commit 68640bb

Browse files
authored
Update description about key type and add one more reference (#3170)
1 parent a5f0977 commit 68640bb

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

src/Microsoft.ML.Recommender/MatrixFactorizationTrainer.cs

+11-13
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,19 @@ namespace Microsoft.ML.Trainers
3131
/// and the value at the location specified by the two indexes. For an example data structure of a tuple, one can use:
3232
/// </para>
3333
/// <code language="csharp">
34-
/// // The following variables defines the shape of a m-by-n matrix. The variable firstRowIndex indicates the integer that
35-
/// // would be mapped to the first row index. If user data uses 0-based indices for rows, firstRowIndex can be set to 0.
36-
/// // Similarly, for 1-based indices, firstRowIndex could be 1.
37-
/// const int firstRowIndex = 1;
38-
/// const int firstColumnIndex = 1;
34+
/// // The following variables defines the shape of a m-by-n matrix. Indexes start with 0; that is, our indexing system
35+
/// // is 0-based.
3936
/// const int m = 60;
4037
/// const int n = 100;
4138
///
4239
/// // A tuple of row index, column index, and rating. It specifies a value in the rating matrix.
4340
/// class MatrixElement
4441
/// {
45-
/// // Matrix column index starts from firstColumnIndex and is at most firstColumnIndex+n-1.
46-
/// // Contieuous=true means that all values from firstColumnIndex to firstColumnIndex+n-1 are allowed keys.
47-
/// // [KeyType(Contiguous = true, Count = n, Min = firstColumnIndex)]
48-
/// // public uint MatrixColumnIndex;
49-
/// // Matrix row index starts from firstRowIndex and is at most firstRowIndex+m-1.
50-
/// // Contieuous=true means that all values from firstRowIndex to firstRowIndex+m-1 are allowed keys.
51-
/// [KeyType(Contiguous = true, Count = m, Min = firstRowIndex)]
42+
/// // Matrix column index starts from 0 and is at most n-1.
43+
/// [KeyType(n)]
44+
/// public uint MatrixColumnIndex;
45+
/// // Matrix row index starts from 0 and is at most m-1.
46+
/// [KeyType(m)]
5247
/// public uint MatrixRowIndex;
5348
/// // The rating at the MatrixColumnIndex-th column and the MatrixRowIndex-th row.
5449
/// public float Value;
@@ -65,7 +60,7 @@ namespace Microsoft.ML.Trainers
6560
/// <i>R</i> is approximated by the product of <i>P</i>'s transpose and <i>Q</i>. This trainer implements
6661
/// <a href='https://www.csie.ntu.edu.tw/~cjlin/papers/libmf/mf_adaptive_pakdd.pdf'>a stochastic gradient method</a> for finding <i>P</i>
6762
/// and <i>Q</i> via minimizing the distance between<i> R</i> and the product of <i>P</i>'s transpose and Q.</para>.
68-
/// <para>For users interested in the mathematical details, please see the references below.</para>
63+
/// <para>The underlying library used in ML.NET matrix factorization can be found on <a href='https://github.com/cjlin1/libmf'>a Github repository</a>. For users interested in the mathematical details, please see the references below.</para>
6964
/// <list type = 'bullet'>
7065
/// <item>
7166
/// <description><a href='https://www.csie.ntu.edu.tw/~cjlin/papers/libmf/libmf_journal.pdf' > A Fast Parallel Stochastic Gradient Method for Matrix Factorization in Shared Memory Systems</a></description>
@@ -76,6 +71,9 @@ namespace Microsoft.ML.Trainers
7671
/// <item>
7772
/// <description><a href='https://www.csie.ntu.edu.tw/~cjlin/papers/libmf/libmf_open_source.pdf' > LIBMF: A Library for Parallel Matrix Factorization in Shared-memory Systems</a></description>
7873
/// </item>
74+
/// <item>
75+
/// <description><a href='https://www.csie.ntu.edu.tw/~cjlin/papers/one-class-mf/biased-mf-sdm-with-supp.pdf' > Selection of Negative Samples for One-class Matrix Factorization</a></description>
76+
/// </item>
7977
/// </list>
8078
/// </remarks>
8179
/// <example>

0 commit comments

Comments
 (0)