165 references to Check
Microsoft.ML.Core (17)
CommandLine\CmdParser.cs (1)
241
env.
Check
(destinationType.IsInstanceOfType(destination));
ComponentModel\ComponentCatalog.cs (3)
268
env.
Check
((ArgType != null) == (args != null));
269
env.
Check
(Utils.Size(extra) == ExtraArgCount);
1001
env.
Check
(signatureType.BaseType == typeof(MulticastDelegate));
Data\LinkedRowRootCursorBase.cs (2)
27
Ch.
Check
(active == null || active.Length == schema.Count);
37
Ch.
Check
(column.Index < Schema.Count);
Data\ModelLoadContext.cs (2)
116
_ectx.
Check
(Reader.BaseStream.Position == FpMin + Header.FpModel);
121
_ectx.
Check
(Reader.BaseStream.Position == FpMin + Header.FpModel);
Data\ModelSaveContext.cs (1)
139
_ectx.
Check
(Writer.BaseStream.Position == FpMin + Header.FpModel);
Data\Repository.cs (8)
251
_ectx.
Check
(parent != null);
252
_ectx.
Check
(parent.StartsWith(root));
255
_ectx.
Check
(entityPath.Length > ichSplit && entityPath[ichSplit] == Path.DirectorySeparatorChar);
262
_ectx.
Check
(Utils.Size(pathEnt) > 0);
263
_ectx.
Check
(entityPath == Path.Combine(root, pathEnt));
317
ExceptionContext.
Check
(!Disposed);
414
ExceptionContext.
Check
(!Disposed);
501
ExceptionContext.
Check
(!Disposed);
Microsoft.ML.Data (63)
Data\DataViewUtils.cs (1)
128
host.
Check
(Utils.Size(inputs) > 0);
DataLoadSave\Database\DatabaseLoaderCursor.cs (2)
147
Ch.
Check
(column.Index < _bindings.Infos.Length);
161
Ch.
Check
(IsColumnActive(column));
DataLoadSave\LegacyCompositeDataLoader.cs (1)
353
h.
Check
(ctx.Reader.BaseStream.Position == ctx.FpMin + ctx.Header.FpModel);
DataLoadSave\Text\TextLoaderCursor.cs (2)
306
Ch.
Check
(column.Index < _bindings.Infos.Length);
320
Ch.
Check
(IsColumnActive(column));
DataLoadSave\Text\TextSaver.cs (2)
401
ch.
Check
(0 <= cols[i] && cols[i] < data.Schema.Count);
403
ch.
Check
(itemType is KeyDataViewType || itemType.IsStandardScalar());
DataLoadSave\TransformWrapper.cs (1)
53
_host.
Check
(transform is IRowToRowMapper);
DataView\ArrayDataViewBuilder.cs (2)
312
Ch.
Check
(column.Index < Schema.Count);
325
Ch.
Check
(column.Index < Schema.Count);
DataView\BatchDataViewMapperBase.cs (1)
142
Ch.
Check
(column.Index < _parent.SchemaBindings.AsSchema.Count);
DataView\CacheDataView.cs (1)
1207
Ch.
Check
(_colToActivesIndex[column.Index] < _getters.Length);
DataView\DataViewConstructionUtils.cs (2)
379
Host.
Check
(keyType != null);
381
Host.
Check
(typeof(TDst) == typeof(ulong) || typeof(TDst) == typeof(uint) ||
DataView\LambdaColumnMapper.cs (2)
32
env.
Check
(keyValueGetter == null || typeDst.GetItemType() is KeyDataViewType);
33
env.
Check
(slotNamesGetter == null || typeDst.IsKnownSizeVector());
DataView\RowToRowMapperTransform.cs (2)
382
Ch.
Check
(column.Index < _bindings.Schema.Count);
395
Ch.
Check
(IsColumnActive(column));
DataView\Transposer.cs (1)
1317
Ch.
Check
(IsColumnActive(column));
Dirty\ChooseColumnsByIndexTransform.cs (2)
300
Ch.
Check
(column.Index < _bindings.OutputSchema.Count);
313
Ch.
Check
(IsColumnActive(column));
EntryPoints\InputBuilder.cs (2)
73
_ectx.
Check
(!fieldInfo.IsStatic && !fieldInfo.IsInitOnly && !fieldInfo.IsLiteral);
719
_ectx.
Check
(output.GetType() == _type);
Evaluators\ClusteringEvaluator.cs (2)
433
Host.
Check
(_scores.Length == _scoresArr.Length);
473
Host.
Check
(_scores.Length == _scoresArr.Length);
Evaluators\MulticlassClassificationEvaluator.cs (1)
445
Host.
Check
(_scores.Length == _scoresArr.Length);
Prediction\Calibrator.cs (5)
326
Host.
Check
(typeof(TOut) == typeof(float));
327
Host.
Check
(typeof(TDist) == typeof(float));
669
env.
Check
(scoreType is NumberDataViewType);
1298
_host.
Check
(Utils.Size(outputNames) == 2);
1796
_host.
Check
(Utils.Size(scoreProbablityColumnNames) == 2);
Scorers\MulticlassClassificationScorer.cs (2)
578
Host.
Check
(score.Length == scoreLength);
589
Host.
Check
(score.Length == scoreLength);
Scorers\RowToRowScorerBase.cs (2)
278
Ch.
Check
(column.Index < _bindings.ColumnCount);
291
Ch.
Check
(IsColumnActive(column));
Transforms\GenerateNumberTransform.cs (2)
422
Ch.
Check
(column.Index < _bindings.ColumnCount);
435
Ch.
Check
(IsColumnActive(column));
Transforms\KeyToValue.cs (1)
260
Host.
Check
(keyMetadata.Length == keyItemType.GetKeyCountAsInt32(Host));
Transforms\KeyToVector.cs (4)
383
Host.
Check
(namesSlotSrc.Length == typeSrc.Size);
395
Host.
Check
(namesKeySrc.Length == keyCount);
527
Host.
Check
(cv == 0 || src.Length == cv);
571
Host.
Check
(lenSrc == cv || cv == 0);
Transforms\MetadataDispatcher.cs (1)
278
ectx.
Check
(0 <= index && index < _infos.Length);
Transforms\NAFilter.cs (1)
404
Ch.
Check
(IsColumnActive(column));
Transforms\NormalizeColumn.cs (6)
465
Host.
Check
(typeSrc.RawType == typeof(TFloat));
498
Host.
Check
(typeSrc.GetVectorSize() == Scale.Length);
499
Host.
Check
(typeSrc.GetItemType().RawType == typeof(TFloat));
587
Host.
Check
(typeSrc.RawType == typeof(TFloat));
618
Host.
Check
(typeSrc.GetVectorSize() == Mean.Length);
619
Host.
Check
(typeSrc.GetItemType().RawType == typeof(TFloat));
Transforms\NormalizeColumnDbl.cs (3)
1088
Host.
Check
(dst.Length == Mean.Length);
1302
Host.
Check
(dst.Length == _binUpperBounds.Length);
1934
Host.
Check
(buffer.Length == size);
Transforms\NormalizeColumnSng.cs (3)
1248
Host.
Check
(dst.Length == Mean.Length);
1463
Host.
Check
(dst.Length == _binUpperBounds.Length);
2097
Host.
Check
(buffer.Length == size);
Transforms\PerGroupTransformBase.cs (1)
280
Ch.
Check
(column.Index < _parent.GetBindings().ColumnCount);
Transforms\RangeFilter.cs (2)
319
Ch.
Check
(0 <= column.Index && column.Index < Schema.Count);
320
Ch.
Check
(IsColumnActive(column));
Transforms\TransformBase.cs (2)
899
Ch.
Check
(IsColumnActive(column));
920
Ch.
Check
(column.Index < _bindings.ColumnCount);
Transforms\ValueMapping.cs (1)
717
env.
Check
(termLookupModel || CheckModelVersion(ctx, GetVersionInfo()));
Microsoft.ML.Ensemble (18)
EntryPoints\CreateEnsemble.cs (1)
383
ch.
Check
(dataSerialized.Length == Utils.Size(entries));
OutputCombiners\BaseStacking.cs (2)
133
ch.
Check
(BasePredictorType != null);
162
ch.
Check
(data.Schema.Label.Value.Type is KeyDataViewType);
Trainer\EnsembleDistributionModelParameters.cs (7)
142
Host.
Check
(typeof(TIn) == typeof(VBuffer<Single>));
143
Host.
Check
(typeof(TOut) == typeof(Single));
154
Host.
Check
(src.Length == _inputType.Size);
178
Host.
Check
(typeof(TIn) == typeof(VBuffer<Single>));
179
Host.
Check
(typeof(TOut) == typeof(Single));
180
Host.
Check
(typeof(TDist) == typeof(Single));
192
Host.
Check
(src.Length == _inputType.Size);
Trainer\EnsembleModelParameters.cs (3)
132
Host.
Check
(typeof(TIn) == typeof(VBuffer<Single>));
133
Host.
Check
(typeof(TOut) == typeof(Single));
146
Host.
Check
(src.Length == _inputType.Size);
Trainer\EnsembleModelParametersBase.cs (1)
33
Host.
Check
(weights == null || weights.Length == models.Length);
Trainer\Multiclass\EnsembleMulticlassModelParameters.cs (4)
112
Host.
Check
(typeof(TIn) == typeof(VBuffer<Single>));
113
Host.
Check
(typeof(TOut) == typeof(VBuffer<Single>));
131
Host.
Check
(src.Length == _inputType.Size);
146
Host.
Check
(predictions[i].Length == _mappers[i].OutputType.GetVectorSize());
Microsoft.ML.FastTree (12)
FastTree.cs (9)
2913
Host.
Check
(typeof(TIn) == typeof(VBuffer<float>));
2914
Host.
Check
(typeof(TOut) == typeof(float));
2924
Host.
Check
(src.Length == inputVectorSize);
2926
Host.
Check
(src.Length > MaxSplitFeatIdx);
2933
Host.
Check
(typeof(TSrc) == typeof(VBuffer<float>));
2934
Host.
Check
(typeof(TDst) == typeof(VBuffer<float>));
2952
Host.
Check
(src.Length == inputVectorSize);
2954
Host.
Check
(src.Length > MaxSplitFeatIdx);
3041
Host.
Check
(Utils.Size(outputNames) >= 1);
GamModelParameters.cs (1)
636
ch.
Check
(len == _pred._numInputFeatures);
RandomForestRegression.cs (2)
236
Host.
Check
(src.Length == inputVectorSize);
238
Host.
Check
(src.Length > MaxSplitFeatIdx);
Microsoft.ML.ImageAnalytics (1)
ImagePixelExtractor.cs (1)
348
Host.
Check
(src.Height == height && src.Width == width);
Microsoft.ML.KMeansClustering (2)
KMeansModelParameters.cs (2)
149
Host.
Check
(typeof(TIn) == typeof(VBuffer<float>));
150
Host.
Check
(typeof(TOut) == typeof(VBuffer<float>));
Microsoft.ML.Parquet (6)
PartitionedFileLoader.cs (4)
422
Ch.
Check
(IsColumnActive(column));
449
Ch.
Check
(column.Index < Schema.Count);
609
Ch.
Check
(col >= 0 && col < SubColumnCount);
626
Ch.
Check
(col >= 0 && col < _colValues.Length);
PartitionedPathParser.cs (2)
166
_host.
Check
(col.TryUnparse(sb));
279
_host.
Check
(col.TryUnparse(sb));
Microsoft.ML.PCA (4)
PcaTrainer.cs (3)
619
Host.
Check
(typeof(TIn) == typeof(VBuffer<float>));
620
Host.
Check
(typeof(TOut) == typeof(float));
625
Host.
Check
(src.Length == _dimension);
PcaTransformer.cs (1)
589
ectx.
Check
(src.Length == transformInfo.Dimension);
Microsoft.ML.StandardTrainers (16)
LdSvm\LdSvmModelParameters.cs (3)
270
Host.
Check
(typeof(TIn) == typeof(VBuffer<float>));
271
Host.
Check
(typeof(TOut) == typeof(float));
276
Host.
Check
(src.Length == InputType.GetVectorSize());
Optimizer\L1Optimizer.cs (2)
38
Env.
Check
(biasCount >= 0);
39
Env.
Check
(l1weight >= 0);
Standard\LinearModelParameters.cs (1)
139
Host.
Check
(Utils.Size(outputs) >= 1);
Standard\LogisticRegression\MulticlassLogisticRegression.cs (1)
775
Host.
Check
(src.Length == NumberOfFeatures);
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (2)
412
Host.
Check
(typeof(TIn) == typeof(VBuffer<float>));
413
Host.
Check
(typeof(TOut) == typeof(VBuffer<float>));
Standard\MulticlassClassification\OneVersusAllTrainer.cs (2)
450
Host.
Check
(typeof(TIn) == typeof(VBuffer<float>));
451
Host.
Check
(typeof(TOut) == typeof(VBuffer<float>));
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (3)
460
Host.
Check
(typeof(TIn) == typeof(VBuffer<float>));
461
Host.
Check
(typeof(TOut) == typeof(VBuffer<float>));
472
Host.
Check
(src.Length == _inputType.Size);
Standard\Simple\SimpleTrainers.cs (2)
361
Host.
Check
(!float.IsNaN(prob));
406
Host.
Check
(Utils.Size(outputs) >= 3);
Microsoft.ML.TimeSeries (2)
SequentialTransformerBase.cs (2)
1041
Ch.
Check
(column.Index < _bindings.Schema.Count);
1054
Ch.
Check
(IsColumnActive(column));
Microsoft.ML.Transforms (22)
Dracula\CountTableTransformer.cs (1)
316
ectx.
Check
(keyNames.Length == labelCardinality);
ExpressionTransformer.cs (3)
79
_host.
Check
(columns.All(col => !string.IsNullOrWhiteSpace(col.Expression)));
80
_host.
Check
(columns.All(col => !string.IsNullOrWhiteSpace(col.Name)));
81
_host.
Check
(columns.All(col => Utils.Size(col.InputColumnNames) > 0));
GroupTransform.cs (2)
374
_ectx.
Check
(0 <= col && col < GroupColumnIndexes.Length + KeepColumnIndexes.Length);
483
ctx.
Check
(typeof(T) == typeof(VBuffer<TValue>));
HashJoiningTransform.cs (2)
547
Host.
Check
(src.Length == expectedSrcLength);
595
Host.
Check
(src.Length == expectedSrcLength);
KeyToVectorMapping.cs (2)
299
Host.
Check
(namesSlotSrc.Length == srcVectorSize);
399
Host.
Check
(src.Length == cv || cv == 0);
MissingValueIndicatorTransform.cs (2)
139
Host.
Check
(type.GetValueCount() < int.MaxValue / 2);
297
ectx.
Check
(0 <= size && size < int.MaxValue / 2);
MissingValueReplacing.cs (1)
700
Host.
Check
(src.Length == repArray.Length);
OptionalColumnTransform.cs (2)
465
Ch.
Check
(column.Index < _bindings.ColumnCount);
478
Ch.
Check
(IsColumnActive(column));
StatefulCustomMappingTransformer.cs (2)
314
Ch.
Check
(IsColumnActive(column));
332
Ch.
Check
(column.Index < _parent._bindings.Schema.Count);
SvmLight\SvmLightSaver.cs (1)
116
_host.
Check
(col < data.Schema.Count);
Text\NgramTransform.cs (1)
535
Host.
Check
(unigramNames.Length == keyCount);
Text\TextFeaturizingEstimator.cs (2)
385
host.
Check
(Enum.IsDefined(typeof(Language), parent.OptionalSettings.Language));
386
host.
Check
(Enum.IsDefined(typeof(CaseMode), parent.OptionalSettings.CaseMode));
UngroupTransform.cs (1)
601
Ch.
Check
(column.Index < _ungroupBinding.InputColumnCount);
Microsoft.ML.Vision (2)
ImageClassificationTrainer.cs (2)
1475
Host.
Check
(typeof(TSrc) == typeof(VBuffer<byte>));
1476
Host.
Check
(typeof(TDst) == typeof(VBuffer<float>));