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);