2 writes to _host
Microsoft.ML.StandardTrainers (2)
FactorizationMachine\FactorizationMachineTrainer.cs (2)
225
_host
= env.Register(LoadName);
257
_host
= env.Register(LoadName);
25 references to _host
Microsoft.ML.StandardTrainers (25)
FactorizationMachine\FactorizationMachineTrainer.cs (25)
280
_host
.CheckUserArg(options.LatentDimension > 0, nameof(options.LatentDimension), "Must be positive");
281
_host
.CheckUserArg(options.LambdaLinear >= 0, nameof(options.LambdaLinear), "Must be non-negative");
282
_host
.CheckUserArg(options.LambdaLatent >= 0, nameof(options.LambdaLatent), "Must be non-negative");
283
_host
.CheckUserArg(options.LearningRate > 0, nameof(options.LearningRate), "Must be positive");
284
_host
.CheckUserArg(options.NumberOfIterations >= 0, nameof(options.NumberOfIterations), "Must be non-negative");
307
var rng =
_host
.Rand;
411
_host
.AssertValue(ch);
412
_host
.AssertValue(pch);
422
_host
.Assert(!col.IsHidden);
427
_host
.Assert(vectorType.Size > 0);
441
_host
.Assert(fieldCount == validFeatureColumns.Count);
446
_host
.Assert(featCol.Name == validFeatCol.Name);
447
_host
.Assert(featCol.Type == validFeatCol.Type);
456
var rng = shuffle ?
_host
.Rand : null;
550
return new FieldAwareFactorizationMachineModelParameters(
_host
, _norm, fieldCount, totalFeatureCount, _latentDim, linearWeights, latentWeightsAligned);
555
_host
.CheckValue(context, nameof(context));
557
_host
.CheckParam(context.InitialPredictor == null || initPredictor != null, nameof(context),
560
using (var ch =
_host
.Start("Training"))
561
using (var pch =
_host
.StartProgressChannel("Training"))
605
using (var ch =
_host
.Start("Training"))
606
using (var pch =
_host
.StartProgressChannel("Training"))
611
return new FieldAwareFactorizationMachinePredictionTransformer(
_host
, model, trainData.Schema, FeatureColumns.Select(x => x.Name).ToArray());
624
_host
.CheckValue(inputSchema, nameof(inputSchema));
630
throw
_host
.ExceptSchemaMismatch(nameof(inputSchema), columnRole, column.Name);
633
throw
_host
.ExceptSchemaMismatch(nameof(inputSchema), columnRole, column.Name,