55 references to CheckUserArg
Microsoft.ML.Data (10)
DataLoadSave\Database\DatabaseLoader.cs (1)
689
Contracts.
CheckUserArg
(KeyDataViewType.IsValidDataType(rawType), nameof(DatabaseLoader.Column.Type), "Bad item type for Key");
DataLoadSave\Text\TextSaver.cs (1)
279
Contracts.
CheckUserArg
(!string.IsNullOrEmpty(sep), nameof(Arguments.Separator), "Must specify a separator");
Model\Pfa\SavePfaCommand.cs (2)
169
Contracts.
CheckUserArg
(_loadPredictor != true,
176
Contracts.
CheckUserArg
(_loadPredictor != true,
Scorers\QuantileRegressionScorer.cs (3)
55
Contracts.
CheckUserArg
(quantiles != null, nameof(Arguments.Quantiles), "Quantiles are required");
62
Contracts.
CheckUserArg
(0 <= q && q <= 1, nameof(Arguments.Quantiles), "Quantile must be between 0 and 1.");
65
Contracts.
CheckUserArg
(quantilesArray.Length > 0, nameof(Arguments.Quantiles), "There must be at least one quantile.");
Transforms\Normalizer.cs (1)
519
Contracts.
CheckUserArg
(index >= 0 && index < Columns.Length, nameof(index), errMsg);
Utilities\TypeParsingUtils.cs (1)
61
Contracts.
CheckUserArg
(KeyDataViewType.IsValidDataType(rawType), nameof(TextLoader.Column.Type), "Bad item type for Key");
Utils\LossFunctions.cs (1)
598
Contracts.
CheckUserArg
(1 <= options.Index && options.Index <= 2, nameof(options.Index), "Must be in the range [1, 2]");
Microsoft.ML.FastTree (10)
Training\EarlyStoppingCriteria.cs (10)
145
Contracts.
CheckUserArg
(threshold >= 0, nameof(threshold), "Must be non-negative.");
153
Contracts.
CheckUserArg
(options.Threshold >= 0, nameof(options.Threshold), "Must be non-negative.");
209
Contracts.
CheckUserArg
(0 <= threshold && threshold <= 1, nameof(threshold), "Must be in range [0,1].");
210
Contracts.
CheckUserArg
(windowSize > 0, nameof(windowSize), "Must be positive.");
220
Contracts.
CheckUserArg
(0 <= threshold && threshold <= 1, nameof(threshold), "Must be in range [0,1].");
221
Contracts.
CheckUserArg
(windowSize > 0, nameof(windowSize), "Must be positive.");
315
Contracts.
CheckUserArg
(0 <= threshold && threshold <= 1, nameof(threshold), "Must be in range [0,1].");
323
Contracts.
CheckUserArg
(0 <= options.Threshold && options.Threshold <= 1, nameof(options.Threshold), "Must be in range [0,1].");
499
Contracts.
CheckUserArg
(windowSize > 0, nameof(windowSize), "Must be positive");
507
Contracts.
CheckUserArg
(options.WindowSize > 0, nameof(options.WindowSize), "Must be positive");
Microsoft.ML.ImageAnalytics (2)
ImagePixelExtractor.cs (1)
622
Contracts.
CheckUserArg
(Planes > 0, nameof(item.UseRed), "Need to use at least one color plane");
VectorToImageTransform.cs (1)
512
Contracts.
CheckUserArg
(Planes > 0, nameof(item.ContainsRed), "Need to use at least one color plane");
Microsoft.ML.LightGbm (20)
LightGbmArguments.cs (10)
49
Contracts.
CheckUserArg
(options.MinimumSplitGain >= 0, nameof(OptionsBase.MinimumSplitGain), "must be >= 0.");
50
Contracts.
CheckUserArg
(options.MinimumChildWeight >= 0, nameof(OptionsBase.MinimumChildWeight), "must be >= 0.");
51
Contracts.
CheckUserArg
(options.SubsampleFraction > 0 && options.SubsampleFraction <= 1, nameof(OptionsBase.SubsampleFraction), "must be in (0,1].");
52
Contracts.
CheckUserArg
(options.FeatureFraction > 0 && options.FeatureFraction <= 1, nameof(OptionsBase.FeatureFraction), "must be in (0,1].");
53
Contracts.
CheckUserArg
(options.L2Regularization >= 0, nameof(OptionsBase.L2Regularization), "must be >= 0.");
54
Contracts.
CheckUserArg
(options.L1Regularization >= 0, nameof(OptionsBase.L1Regularization), "must be >= 0.");
298
Contracts.
CheckUserArg
(options.TreeDropFraction > 0 && options.TreeDropFraction < 1, nameof(options.TreeDropFraction), "must be in (0,1).");
299
Contracts.
CheckUserArg
(options.SkipDropFraction >= 0 && options.SkipDropFraction < 1, nameof(options.SkipDropFraction), "must be in [0,1).");
344
Contracts.
CheckUserArg
(options.TopRate > 0 && options.TopRate < 1, nameof(Options.TopRate), "must be in (0,1).");
345
Contracts.
CheckUserArg
(options.OtherRate >= 0 && options.OtherRate < 1, nameof(Options.OtherRate), "must be in [0,1).");
LightGbmBinaryTrainer.cs (2)
196
Contracts.
CheckUserArg
(options.Sigmoid > 0, nameof(Options.Sigmoid), "must be > 0.");
197
Contracts.
CheckUserArg
(options.WeightOfPositiveExamples > 0, nameof(Options.WeightOfPositiveExamples), "must be > 0.");
LightGbmMulticlassTrainer.cs (1)
137
Contracts.
CheckUserArg
(options.Sigmoid > 0, nameof(Options.Sigmoid), "must be > 0.");
LightGbmRankingTrainer.cs (1)
179
Contracts.
CheckUserArg
(options.Sigmoid > 0, nameof(Options.Sigmoid), "must be > 0.");
LightGbmTrainerBase.cs (6)
371
Contracts.
CheckUserArg
(options.NumberOfIterations >= 0, nameof(options.NumberOfIterations), "must be >= 0.");
372
Contracts.
CheckUserArg
(options.MaximumBinCountPerFeature > 0, nameof(options.MaximumBinCountPerFeature), "must be > 0.");
373
Contracts.
CheckUserArg
(options.MinimumExampleCountPerGroup > 0, nameof(options.MinimumExampleCountPerGroup), "must be > 0.");
374
Contracts.
CheckUserArg
(options.MaximumCategoricalSplitPointCount > 0, nameof(options.MaximumCategoricalSplitPointCount), "must be > 0.");
375
Contracts.
CheckUserArg
(options.CategoricalSmoothing >= 0, nameof(options.CategoricalSmoothing), "must be >= 0.");
376
Contracts.
CheckUserArg
(options.L2CategoricalRegularization >= 0.0, nameof(options.L2CategoricalRegularization), "must be >= 0.");
Microsoft.ML.OnnxConverter (2)
SaveOnnxCommand.cs (2)
375
Contracts.
CheckUserArg
(_loadPredictor != true,
382
Contracts.
CheckUserArg
(_loadPredictor != true,
Microsoft.ML.StandardTrainers (9)
Standard\Online\AveragedLinear.cs (5)
309
Contracts.
CheckUserArg
(options.LearningRate > 0, nameof(options.LearningRate), UserErrorPositive);
310
Contracts.
CheckUserArg
(!options.ResetWeightsAfterXExamples.HasValue || options.ResetWeightsAfterXExamples > 0, nameof(options.ResetWeightsAfterXExamples), UserErrorPositive);
313
Contracts.
CheckUserArg
(0 <= options.L2Regularization && options.L2Regularization < 0.5, nameof(options.L2Regularization), "must be in range [0, 0.5)");
314
Contracts.
CheckUserArg
(options.RecencyGain >= 0, nameof(options.RecencyGain), UserErrorNonNegative);
315
Contracts.
CheckUserArg
(options.AveragedTolerance >= 0, nameof(options.AveragedTolerance), UserErrorNonNegative);
Standard\Online\LinearSvm.cs (2)
297
Contracts.
CheckUserArg
(options.Lambda > 0, nameof(options.Lambda), UserErrorPositive);
298
Contracts.
CheckUserArg
(options.BatchSize > 0, nameof(options.BatchSize), UserErrorPositive);
Standard\Online\OnlineLinear.cs (2)
265
Contracts.
CheckUserArg
(options.NumberOfIterations > 0, nameof(options.NumberOfIterations), UserErrorPositive);
266
Contracts.
CheckUserArg
(options.InitialWeightsDiameter >= 0, nameof(options.InitialWeightsDiameter), UserErrorNonNegative);
Microsoft.ML.Transforms (2)
GcnTransform.cs (1)
827
Contracts.
CheckUserArg
(0 < scale && scale < float.PositiveInfinity, nameof(scale), "scale must be a positive finite value");
RandomFourierFeaturizing.cs (1)
680
Contracts.
CheckUserArg
(rank > 0, nameof(rank), "must be positive.");