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"); 307var 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); 456var rng = shuffle ? _host.Rand : null; 550return 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), 560using (var ch = _host.Start("Training")) 561using (var pch = _host.StartProgressChannel("Training")) 605using (var ch = _host.Start("Training")) 606using (var pch = _host.StartProgressChannel("Training")) 611return new FieldAwareFactorizationMachinePredictionTransformer(_host, model, trainData.Schema, FeatureColumns.Select(x => x.Name).ToArray()); 624_host.CheckValue(inputSchema, nameof(inputSchema)); 630throw _host.ExceptSchemaMismatch(nameof(inputSchema), columnRole, column.Name); 633throw _host.ExceptSchemaMismatch(nameof(inputSchema), columnRole, column.Name,