88 references to CheckParam
Microsoft.ML.Core (4)
Data\ModelSaveContext.cs (1)
223_ectx.CheckParam(!string.IsNullOrEmpty(str), nameof(str));
Data\Repository.cs (3)
238_ectx.CheckParam(dir == null || !dir.Contains(".."), nameof(dir)); 239_ectx.CheckParam(!string.IsNullOrWhiteSpace(name), nameof(name)); 240_ectx.CheckParam(!name.Contains(".."), nameof(name));
Microsoft.ML.Data (40)
Commands\CrossValidationCommand.cs (3)
405env.CheckParam(args.NumFolds > 1, nameof(args.NumFolds)); 412env.CheckParam(args.MaxCalibrationExamples > 0, nameof(args.MaxCalibrationExamples)); 413env.CheckParam(getValidationDataView == null || applyTransformsToValidationData != null, nameof(applyTransformsToValidationData));
Commands\TrainCommand.cs (1)
322ch.CheckParam(output != null && output.CanWrite, nameof(output));
Data\DataViewUtils.cs (3)
260provider.CheckParam(batchSize >= 0, nameof(batchSize)); 1112Ch.CheckParam(column.Index < _colToActive.Length, nameof(column)); 1303Ch.CheckParam(column.Index < _colToActive.Length, nameof(column));
Data\RowCursorUtils.cs (2)
572Ch.CheckParam(column.Index < Schema.Count, nameof(column)); 589Ch.CheckParam(column.Index < Schema.Count, nameof(column));
DataLoadSave\Binary\BinaryLoader.cs (1)
1969Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column));
DataLoadSave\LegacyCompositeDataLoader.cs (1)
605_host.CheckParam(0 <= col && col < Schema.Count, nameof(col));
DataLoadSave\Transpose\TransposeLoader.cs (3)
639_host.CheckParam(0 <= col && col < _header.ColumnCount, nameof(col)); 646_host.CheckParam(0 <= col && col < _header.ColumnCount, nameof(col)); 871Ch.CheckParam(column.Index <= _colToActivesIndex.Length, nameof(column));
DataView\AppendRowsDataView.cs (1)
61env.CheckParam(sources.All(s => s != null), nameof(sources));
DataView\ArrayDataViewBuilder.cs (8)
69_host.CheckParam(type != null && type.RawType == typeof(T), nameof(type)); 86_host.CheckParam(keyCount > 0, nameof(keyCount)); 100_host.CheckParam(itemType != null && itemType.RawType == typeof(T), nameof(itemType)); 113_host.CheckParam(itemType != null && itemType.RawType == typeof(T), nameof(itemType)); 125_host.CheckParam(itemType != null && itemType.RawType == typeof(T), nameof(itemType)); 138_host.CheckParam(itemType != null && itemType.RawType == typeof(T), nameof(itemType)); 149_host.CheckParam(itemType != null && itemType.RawType == typeof(T), nameof(itemType)); 161_host.CheckParam(itemType != null && itemType.RawType == typeof(T), nameof(itemType));
DataView\CacheDataView.cs (1)
1186Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column));
DataView\Transposer.cs (6)
235_host.CheckParam(0 <= col && col < _view.Schema.Count, nameof(col)); 1429_host.CheckParam(0 <= col && col < data.Schema.Count, nameof(col)); 1489Ch.CheckParam(column.Index == 0, nameof(column)); 1502Ch.CheckParam(column.Index == 0, nameof(column)); 1550Ch.CheckParam(column.Index == 0, nameof(column)); 1563Ch.CheckParam(column.Index == 0, nameof(column));
Evaluators\EvaluatorUtils.cs (5)
170ectx.CheckParam(0 <= colScore && colScore < schema.Count, nameof(colScore)); 219ectx.CheckParam(0 <= col && col < schema.Count, nameof(col)); 394env.CheckParam(curFold >= 0, nameof(curFold)); 435env.CheckParam(curFold >= 0, nameof(curFold)); 436env.CheckParam(numFolds > 0, nameof(numFolds));
Scorers\PredictionTransformer.cs (1)
87Host.CheckParam(model is IPredictor, nameof(model));
Transforms\GenerateNumberTransform.cs (1)
395Ch.CheckParam(active == null || active.Length == bindings.ColumnCount, nameof(active));
Transforms\RowShufflingTransformer.cs (2)
671Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column)); 714Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column));
Transforms\TransformBase.cs (1)
780Host.CheckParam(0 <= col && col < _bindings.ColumnCount, nameof(col));
Microsoft.ML.Ensemble (8)
Selector\SubsetSelector\BaseSubsetSelector.cs (1)
46Host.CheckParam(size > 0, nameof(size));
Trainer\Binary\EnsembleTrainer.cs (3)
78Host.CheckParam(predictionKind == PredictionKind.BinaryClassification, nameof(PredictionKind)); 98Host.CheckParam(models.All(m => m is TDistPredictor), nameof(models)); 103Host.CheckParam(models.All(m => m is TScalarPredictor), nameof(models));
Trainer\Multiclass\MulticlassDataPartitionEnsembleTrainer.cs (2)
85Host.CheckParam(predictionKind == PredictionKind.MulticlassClassification, nameof(PredictionKind)); 98Host.CheckParam(models.All(m => m is TVectorPredictor), nameof(models));
Trainer\Regression\RegressionEnsembleTrainer.cs (2)
73Host.CheckParam(predictionKind == PredictionKind.Regression, nameof(PredictionKind)); 86Host.CheckParam(models.All(m => m is TScalarPredictor), nameof(models));
Microsoft.ML.FastTree (2)
GamModelParameters.cs (2)
235Host.CheckParam(features.Length == _numInputFeatures, nameof(features)); 236Host.CheckParam(Utils.Size(bins) == NumberOfShapeFunctions, nameof(bins));
Microsoft.ML.Mkl.Components (1)
SymSgdClassificationTrainer.cs (1)
253Host.CheckParam(weights.Length > 0, nameof(weights));
Microsoft.ML.OnnxConverter (1)
OnnxContextImpl.cs (1)
246_host.CheckParam(IsVariableDefined(variableName), nameof(variableName));
Microsoft.ML.Parquet (3)
ParquetLoader.cs (3)
491Ch.CheckParam(IsColumnActive(Schema[col]), nameof(col)); 539Ch.CheckParam(IsColumnActive(Schema[col]), nameof(col)); 627Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column));
Microsoft.ML.StandardTrainers (16)
Standard\LogisticRegression\LbfgsPredictorBase.cs (1)
433Host.CheckParam(context.InitialPredictor == null || context.InitialPredictor is IPredictor, nameof(context.InitialPredictor));
Standard\ModelStatistics.cs (1)
462Env.CheckParam(paramCountCap >= 0, nameof(paramCountCap));
Standard\SdcaBinary.cs (7)
1527Host.CheckParam(Utils.Size(weights) == 1, nameof(weights)); 1528Host.CheckParam(Utils.Size(bias) == 1, nameof(bias)); 1529Host.CheckParam(weights[0].Length > 0, nameof(weights)); 1815Host.CheckParam(Utils.Size(weights) == 1, nameof(weights)); 1816Host.CheckParam(Utils.Size(bias) == 1, nameof(bias)); 1817Host.CheckParam(weights[0].Length > 0, nameof(weights)); 2219Host.CheckParam(weights.Length > 0, nameof(weights));
Standard\SdcaMulticlass.cs (4)
558Host.CheckParam(weights.Length > 0, nameof(weights)); 559Host.CheckParam(weights.Length == bias.Length, nameof(weights)); 655Host.CheckParam(weights.Length > 0, nameof(weights)); 656Host.CheckParam(weights.Length == bias.Length, nameof(weights));
Standard\SdcaRegression.cs (3)
146Host.CheckParam(Utils.Size(weights) == 1, nameof(weights)); 147Host.CheckParam(Utils.Size(bias) == 1, nameof(bias)); 148Host.CheckParam(weights[0].Length > 0, nameof(weights));
Microsoft.ML.TimeSeries (2)
PredictionEngine.cs (2)
88env.CheckParam(!string.IsNullOrEmpty(modelPath), nameof(modelPath)); 111env.CheckParam(stream != null, nameof(stream));
Microsoft.ML.Transforms (11)
CountFeatureSelection.cs (1)
297env.CheckParam(Utils.Size(columns) > 0, nameof(columns));
GroupTransform.cs (1)
568Ch.CheckParam(column.Index < _active.Length, nameof(column));
OptionalColumnTransform.cs (1)
445Ch.CheckParam(active == null || active.Length == bindings.ColumnCount, nameof(active));
ProduceIdTransform.cs (3)
193Ch.CheckParam(column.Index < _bindings.ColumnCount, nameof(column)); 211Ch.CheckParam(column.Index < _bindings.ColumnCount, nameof(column)); 212Ch.CheckParam(IsColumnActive(column), nameof(column.Index));
SvmLight\SvmLightLoader.cs (2)
481Ch.CheckParam(column.Index == 0, nameof(column)); 503Ch.CheckParam(column.Index == 0, nameof(column));
Text\TextFeaturizingEstimator.cs (2)
419_host.CheckParam(source.Any(), nameof(source)); 420_host.CheckParam(!source.Any(string.IsNullOrWhiteSpace), nameof(source));
UngroupTransform.cs (1)
614Ch.CheckParam(column.Index < _ungroupBinding.InputColumnCount, nameof(column));