74 references to TrainUtils
Microsoft.ML.Data (74)
Commands\CrossValidationCommand.cs (13)
110
TrainUtils
.CheckTrainer(Host, args.Trainer, args.DataFile);
150
if (ImplOptions.ContinueTrain && !
TrainUtils
.TryLoadPredictor(ch, Host, ImplOptions.InputModelFile, out inputPredictor))
160
string name =
TrainUtils
.MatchNameOrDefaultOrNull(ch, loader.Schema, nameof(ImplOptions.NameColumn), ImplOptions.NameColumn, DefaultColumnNames.Name);
271
string label =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(ImplOptions.LabelColumn), ImplOptions.LabelColumn, DefaultColumnNames.Label);
272
string features =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(ImplOptions.FeatureColumn), ImplOptions.FeatureColumn, DefaultColumnNames.Features);
273
string weight =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(ImplOptions.WeightColumn), ImplOptions.WeightColumn, DefaultColumnNames.Weight);
274
string name =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(ImplOptions.NameColumn), ImplOptions.NameColumn, DefaultColumnNames.Name);
275
string group =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(ImplOptions.GroupColumn), ImplOptions.GroupColumn, DefaultColumnNames.GroupId);
277
TrainUtils
.AddNormalizerIfNeeded(env, ch, trainer, ref data, features, ImplOptions.NormalizeFeatures);
280
var customCols =
TrainUtils
.CheckAndGenerateCustomColumns(ch, ImplOptions.CustomColumns);
297
string group =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(ImplOptions.GroupColumn), ImplOptions.GroupColumn, DefaultColumnNames.GroupId);
523
var predictor =
TrainUtils
.Train(host, ch, trainData, trainer, validData,
545
TrainUtils
.SaveModel(host, ch, file, predictor, rmd, _cmd);
Commands\EvaluateCommand.cs (9)
154
string label =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.LabelColumn),
156
string group =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.GroupColumn),
158
string weight =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.WeightColumn),
160
var customCols =
TrainUtils
.CheckAndGenerateCustomColumns(ch, args.CustomColumns);
230
string label =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.LabelColumn),
232
string group =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.GroupColumn),
234
string weight =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.WeightColumn),
236
string name =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.NameColumn),
238
var customCols =
TrainUtils
.CheckAndGenerateCustomColumns(ch, ImplOptions.CustomColumns);
Commands\ScoreCommand.cs (3)
116
string feat =
TrainUtils
.MatchNameOrDefaultOrNull(ch, loader.Schema,
118
string group =
TrainUtils
.MatchNameOrDefaultOrNull(ch, loader.Schema,
120
var customCols =
TrainUtils
.CheckAndGenerateCustomColumns(ch, ImplOptions.CustomColumns);
Commands\TestCommand.cs (6)
101
string label =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(ImplOptions.LabelColumn),
103
string features =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(ImplOptions.FeatureColumn),
105
string group =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(ImplOptions.GroupColumn),
107
string weight =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(ImplOptions.WeightColumn),
109
string name =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(ImplOptions.NameColumn),
111
var customCols =
TrainUtils
.CheckAndGenerateCustomColumns(ch, ImplOptions.CustomColumns);
Commands\TrainCommand.cs (11)
101
TrainUtils
.CheckTrainer(Host, args.Trainer, args.DataFile);
145
if (ImplOptions.ContinueTrain && !
TrainUtils
.TryLoadPredictor(ch, Host, ImplOptions.InputModelFile, out inputPredictor))
152
var label =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.LabelColumn), _labelColumn, DefaultColumnNames.Label);
153
var feature =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.FeatureColumn), _featureColumn, DefaultColumnNames.Features);
154
var group =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.GroupColumn), _groupColumn, DefaultColumnNames.GroupId);
155
var weight =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.WeightColumn), _weightColumn, DefaultColumnNames.Weight);
156
var name =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.NameColumn), _nameColumn, DefaultColumnNames.Name);
158
TrainUtils
.AddNormalizerIfNeeded(Host, ch, trainer, ref view, feature, ImplOptions.NormalizeFeatures);
162
var customCols =
TrainUtils
.CheckAndGenerateCustomColumns(ch, ImplOptions.CustomColumns);
200
var predictor =
TrainUtils
.Train(Host, ch, data, trainer, validData,
204
TrainUtils
.SaveModel(Host, ch, file, predictor, data, cmd);
Commands\TrainTestCommand.cs (11)
90
TrainUtils
.CheckTrainer(Host, args.Trainer, args.DataFile);
128
if (ImplOptions.ContinueTrain && !
TrainUtils
.TryLoadPredictor(ch, Host, ImplOptions.InputModelFile, out inputPredictor))
135
string label =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.LabelColumn),
137
string features =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.FeatureColumn),
139
string group =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.GroupColumn),
141
string weight =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.WeightColumn),
143
string name =
TrainUtils
.MatchNameOrDefaultOrNull(ch, schema, nameof(Arguments.NameColumn),
146
TrainUtils
.AddNormalizerIfNeeded(Host, ch, trainer, ref trainPipe, features, ImplOptions.NormalizeFeatures);
149
var customCols =
TrainUtils
.CheckAndGenerateCustomColumns(ch, ImplOptions.CustomColumns);
186
var predictor =
TrainUtils
.Train(Host, ch, data, trainer, validData,
195
TrainUtils
.SaveModel(Host, ch, file, predictor, data, cmd);
EntryPoints\InputBase.cs (2)
83
TrainUtils
.AddNormalizerIfNeeded(host, ch, trainer, ref view, feature, input.NormalizeFeatures);
119
var predictor =
TrainUtils
.Train(host, ch, cachedRoleMappedData, trainer, calibrator, maxCalibrationExamples);
EntryPoints\PredictorModelImpl.cs (1)
86
TrainUtils
.SaveModel(env, ch, stream, Predictor, roleMappedData);
EntryPoints\TransformModelImpl.cs (1)
179
TrainUtils
.SaveDataPipe(env, rep, _chain, blankLoader: true);
Evaluators\BinaryClassifierEvaluator.cs (3)
1535
label =
TrainUtils
.MatchNameOrDefaultOrNull(host, schema,
1538
weight =
TrainUtils
.MatchNameOrDefaultOrNull(host, schema,
1541
name =
TrainUtils
.MatchNameOrDefaultOrNull(host, schema,
Evaluators\ClusteringEvaluator.cs (1)
867
string features =
TrainUtils
.MatchNameOrDefaultOrNull(host, schema,
Evaluators\RankingEvaluator.cs (1)
1093
string groupId =
TrainUtils
.MatchNameOrDefaultOrNull(host, schema,
Transforms\TrainAndScoreTransformer.cs (11)
93
string feat =
TrainUtils
.MatchNameOrDefaultOrNull(env, input.Schema,
95
string group =
TrainUtils
.MatchNameOrDefaultOrNull(env, input.Schema,
97
var customCols =
TrainUtils
.CheckAndGenerateCustomColumns(env, args.CustomColumns);
238
var customCols =
TrainUtils
.CheckAndGenerateCustomColumns(env, args.CustomColumns);
242
var predictor =
TrainUtils
.Train(host, ch, data, trainer, null,
261
feat =
TrainUtils
.MatchNameOrDefaultOrNull(ectx, schema, nameof(args.FeatureColumn), args.FeatureColumn,
263
var label =
TrainUtils
.MatchNameOrDefaultOrNull(ectx, schema, nameof(args.LabelColumn), args.LabelColumn,
265
group =
TrainUtils
.MatchNameOrDefaultOrNull(ectx, schema, nameof(args.GroupColumn), args.GroupColumn,
267
var weight =
TrainUtils
.MatchNameOrDefaultOrNull(ectx, schema, nameof(args.WeightColumn), args.WeightColumn,
269
var name =
TrainUtils
.MatchNameOrDefaultOrNull(ectx, schema, nameof(args.NameColumn), args.NameColumn,
271
var customCols =
TrainUtils
.CheckAndGenerateCustomColumns(ectx, args.CustomColumns);
Utilities\ModelFileUtils.cs (1)
321
return
TrainUtils
.CheckAndGenerateCustomColumns(env, list.ToArray());