2 writes to NumberOfRows
Microsoft.ML.Recommender (2)
MatrixFactorizationPredictor.cs (2)
101buffer.Get(out NumberOfRows, out NumberOfColumns, out ApproximationRank, out var leftFactorMatrix, out var rightFactorMatrix); 124NumberOfRows = ctx.Reader.ReadInt32();
15 references to NumberOfRows
Microsoft.ML.Recommender (13)
MatrixFactorizationPredictor.cs (13)
68/// This is two dimensional matrix with size of <see cref="NumberOfRows"/> * <see cref="ApproximationRank"/> flattened into one-dimensional matrix. 105_host.Assert(NumberOfRows == matrixRowIndexType.GetCountAsInt32(_host)); 106_host.Assert(_leftFactorMatrix.Length == NumberOfRows * ApproximationRank); 125_host.CheckDecode(NumberOfRows > 0); 131_host.CheckDecode((ulong)NumberOfRows <= ulong.MaxValue - mMin); 145_leftFactorMatrix = Utils.ReadSingleArray(ctx.Reader, checked(NumberOfRows * ApproximationRank)); 149MatrixRowIndexType = new KeyDataViewType(typeof(uint), NumberOfRows); 178_host.Check(NumberOfRows > 0, "Number of rows must be positive"); 181ctx.Writer.Write(NumberOfRows); 184_host.Check(Utils.Size(_leftFactorMatrix) == NumberOfRows * ApproximationRank, "Unexpected matrix size of a factor matrix (matrix P in LIBMF paper)"); 196writer.WriteLine("# P in R^({0} x {1}), rows correspond to Y item", NumberOfRows, ApproximationRank); 275if (srcRow == 0 || srcRow > NumberOfRows || srcCol == 0 || srcCol > NumberOfColumns) 297_host.Assert(0 <= rowIndex && rowIndex < NumberOfRows);
Microsoft.ML.Tests (2)
TrainerEstimators\MatrixFactorizationTests.cs (2)
93Assert.Equal(leftMatrix.Count, model.Model.NumberOfRows * model.Model.ApproximationRank); 818int m = model.Model.NumberOfRows;