2 writes to NumberOfColumns
Microsoft.ML.Recommender (2)
MatrixFactorizationPredictor.cs (2)
101buffer.Get(out NumberOfRows, out NumberOfColumns, out ApproximationRank, out var leftFactorMatrix, out var rightFactorMatrix); 133NumberOfColumns = 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)); 148MatrixColumnIndexType = new KeyDataViewType(typeof(uint), NumberOfColumns); 179_host.Check(NumberOfColumns > 0, "Number of columns must be positive"); 182ctx.Writer.Write(NumberOfColumns); 185_host.Check(Utils.Size(_rightFactorMatrix) == NumberOfColumns * ApproximationRank, "Unexpected matrix size of a factor matrix (matrix Q in LIBMF paper)"); 205writer.WriteLine("# Q in R^({0} x {1}), rows correspond to X item", NumberOfColumns, ApproximationRank); 275if (srcRow == 0 || srcRow > NumberOfRows || srcCol == 0 || srcCol > NumberOfColumns) 298_host.Assert(0 <= columnIndex && columnIndex < NumberOfColumns);
Microsoft.ML.Tests (2)
TrainerEstimators\MatrixFactorizationTests.cs (2)
94Assert.Equal(rightMatrix.Count, model.Model.NumberOfColumns * model.Model.ApproximationRank); 819int n = model.Model.NumberOfColumns;