2 writes to _host
Microsoft.ML.Recommender (2)
MatrixFactorizationPredictor.cs (2)
95_host = env.Register(RegistrationName); 116_host = env.Register(RegistrationName);
30 references to _host
Microsoft.ML.Recommender (30)
MatrixFactorizationPredictor.cs (30)
96_host.Assert(matrixColumnIndexType.RawType == typeof(uint)); 97_host.Assert(matrixRowIndexType.RawType == typeof(uint)); 98_host.CheckValue(buffer, nameof(buffer)); 99_host.CheckValue(matrixColumnIndexType, nameof(matrixColumnIndexType)); 100_host.CheckValue(matrixRowIndexType, nameof(matrixRowIndexType)); 104_host.Assert(NumberOfColumns == matrixColumnIndexType.GetCountAsInt32(_host)); 105_host.Assert(NumberOfRows == matrixRowIndexType.GetCountAsInt32(_host)); 106_host.Assert(_leftFactorMatrix.Length == NumberOfRows * ApproximationRank); 107_host.Assert(_rightFactorMatrix.Length == ApproximationRank * NumberOfColumns); 125_host.CheckDecode(NumberOfRows > 0); 130_host.CheckDecode(mMin == 0); 131_host.CheckDecode((ulong)NumberOfRows <= ulong.MaxValue - mMin); 134_host.CheckDecode(NumberOfColumns > 0); 139_host.CheckDecode(nMin == 0); 140_host.CheckDecode((ulong)NumberOfColumns <= ulong.MaxValue - nMin); 143_host.CheckDecode(ApproximationRank > 0); 178_host.Check(NumberOfRows > 0, "Number of rows must be positive"); 179_host.Check(NumberOfColumns > 0, "Number of columns must be positive"); 180_host.Check(ApproximationRank > 0, "Number of latent factors must be positive"); 184_host.Check(Utils.Size(_leftFactorMatrix) == NumberOfRows * ApproximationRank, "Unexpected matrix size of a factor matrix (matrix P in LIBMF paper)"); 185_host.Check(Utils.Size(_rightFactorMatrix) == NumberOfColumns * ApproximationRank, "Unexpected matrix size of a factor matrix (matrix Q in LIBMF paper)"); 218_host.AssertValue(matrixColumnIndexGetter); 219_host.AssertValue(matrixRowIndexGetter); 246_host.Check(typeof(TMatrixColumnIndexIn) == typeof(uint), msg); 249_host.Check(typeof(TMatrixRowIndexIn) == typeof(uint), msg); 252_host.Check(typeof(TOut) == typeof(float), msg); 297_host.Assert(0 <= rowIndex && rowIndex < NumberOfRows); 298_host.Assert(0 <= columnIndex && columnIndex < NumberOfColumns);