2 writes to NumberOfColumns
Microsoft.ML.Recommender (2)
MatrixFactorizationPredictor.cs (2)
101
buffer.Get(out NumberOfRows, out
NumberOfColumns
, out ApproximationRank, out var leftFactorMatrix, out var rightFactorMatrix);
133
NumberOfColumns
= ctx.Reader.ReadInt32();
15 references to NumberOfColumns
Microsoft.ML.Recommender (13)
MatrixFactorizationPredictor.cs (13)
78
/// This is two dimensional matrix with size of <see cref="ApproximationRank"/> * <see cref="
NumberOfColumns
"/> flattened into one-dimensional matrix.
104
_host.Assert(
NumberOfColumns
== matrixColumnIndexType.GetCountAsInt32(_host));
107
_host.Assert(_rightFactorMatrix.Length == ApproximationRank *
NumberOfColumns
);
134
_host.CheckDecode(
NumberOfColumns
> 0);
140
_host.CheckDecode((ulong)
NumberOfColumns
<= ulong.MaxValue - nMin);
146
_rightFactorMatrix = Utils.ReadSingleArray(ctx.Reader, checked(
NumberOfColumns
* ApproximationRank));
148
MatrixColumnIndexType = new KeyDataViewType(typeof(uint),
NumberOfColumns
);
179
_host.Check(
NumberOfColumns
> 0, "Number of columns must be positive");
182
ctx.Writer.Write(
NumberOfColumns
);
185
_host.Check(Utils.Size(_rightFactorMatrix) ==
NumberOfColumns
* ApproximationRank, "Unexpected matrix size of a factor matrix (matrix Q in LIBMF paper)");
205
writer.WriteLine("# Q in R^({0} x {1}), rows correspond to X item",
NumberOfColumns
, ApproximationRank);
275
if (srcRow == 0 || srcRow > NumberOfRows || srcCol == 0 || srcCol >
NumberOfColumns
)
298
_host.Assert(0 <= columnIndex && columnIndex <
NumberOfColumns
);
Microsoft.ML.Tests (2)
TrainerEstimators\MatrixFactorizationTests.cs (2)
94
Assert.Equal(rightMatrix.Count, model.Model.
NumberOfColumns
* model.Model.ApproximationRank);
819
int n = model.Model.
NumberOfColumns
;